public-awesome / cw-nfts

Examples and helpers to build NFT contracts on CosmWasm
Apache License 2.0
188 stars 180 forks source link

feat: upgrade to cosmwasm-std 2.0 #160

Open PFC-developer opened 5 months ago

PFC-developer commented 5 months ago

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 (https://github.com/larry0x/cw-plus-plus/pull/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 commented 5 months ago

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.

PFC-developer commented 5 months ago

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

NoahSaso commented 2 months ago

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

taitruong commented 2 months ago

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

PFC-developer commented 2 months ago

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