Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to cosmwasm-std 2.0 #160

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

PFC-developer
Copy link

@PFC-developer PFC-developer commented Apr 17, 2024

This PR attempts to bring cw-nfts the latest cosmwasm-std version.

there are some breaking changes.

  1. migrating from v16 NFTs is not supported
  2. relies on a un-merged PR for cw-ownable (use v2 of cosmwasm-std larry0x/cw-plus-plus#22)
  3. changes some lifetimes in storing key names from 'a to 'static
  4. implementing a cw-util function parse_instantiate_reply_data which is no longer in the core package (and uses a deprecated 'data' field)

the bulk of the work is in the testing modules due to the ordering inside the tests (due to it requiring well from bech32 addresses, and the use of deps.api.addr_make()

Thanks!

@PFC-developer
Copy link
Author

I'm going to leave the PR here for the moment.
I'm not sure why the multi-tests aren't being used (I didn't modify anything here)
and upgrading to a more recent cosmwasm-check requires a rust upgrade, and if you have a reason to stay on 1.65 or not.

contracts/cw2981-royalties/Cargo.toml Outdated Show resolved Hide resolved
contracts/cw2981-royalties/src/lib.rs Outdated Show resolved Hide resolved
contracts/cw2981-royalties/src/query.rs Outdated Show resolved Hide resolved
contracts/cw721-base/src/query.rs Outdated Show resolved Hide resolved
@PFC-developer
Copy link
Author

thanks for the review @webmaster128 .. I hope I got all the addr_makes's

@NoahSaso
Copy link

bump, we're blocked on this over at DAO DAO. is there anything i can do to push this forward?

@taitruong
Copy link
Collaborator

@PFC-developer could u pls resolve conflicts? Regarding linter u dont need to worry. @jhernandezb will have a look at it.

# Conflicts:
#	.circleci/config.yml
#	Cargo.lock
#	Cargo.toml
#	contracts/cw2981-royalties/schema/cw2981-royalties.json
#	contracts/cw721-base/Cargo.toml
#	contracts/cw721-base/schema/cw721-base.json
#	contracts/cw721-base/src/lib.rs
#	contracts/cw721-base/src/multi_tests.rs
#	contracts/cw721-base/src/query.rs
#	contracts/cw721-base/src/state.rs
#	contracts/cw721-base/src/upgrades/mod.rs
#	contracts/cw721-base/src/upgrades/v0_17.rs
#	contracts/cw721-expiration/schema/cw721-expiration.json
#	contracts/cw721-expiration/src/contract_tests.rs
#	contracts/cw721-expiration/src/lib.rs
#	contracts/cw721-expiration/src/state.rs
#	contracts/cw721-fixed-price/schema/cw721-fixed-price.json
#	contracts/cw721-fixed-price/src/contract.rs
#	contracts/cw721-metadata-onchain/Cargo.toml
#	contracts/cw721-metadata-onchain/schema/cw721-metadata-onchain.json
#	contracts/cw721-metadata-onchain/src/lib.rs
#	contracts/cw721-receiver-tester/schema/cw721-receiver-tester.json
#	packages/cw721/src/testing/contract_tests.rs
@PFC-developer
Copy link
Author

THIS IS A WIP.
2 major issues

  1. cw_ownable relies on a unmerged PR. (OwnershipStore?)
  2. something changed in the contract wrapper and the compile is failing.

I'm sure there are other issues, but it's not compiling due to these (and hence untested)

if you want to do start from scratch, I suggest you first remove the deprecated functions and use api_addr_make in pure v019, and then try to move things across to cosmwasm2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants