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

SG-645 Update cw-nfts version #539

Merged
merged 31 commits into from
Jun 4, 2023
Merged

Conversation

humanalgorithm
Copy link
Contributor

@humanalgorithm humanalgorithm commented Apr 1, 2023

Update 4-24-2023: This is now using the inherited migrations from cw_721 base per larry engineer PR: public-awesome/cw-nfts#119

Updating to the latest cw-nfts 0.17 and the necessary changes.

Notes:

  1. In order to update to cw 0.17 need to update the Rust version to 1.67.1. You will see this reflected in the changes to the config.yml build script.

  2. The MintMsg has been removed and folded into ExecuteMsg for cw721-base. Therefore we now need to put the variant for Mint { } in each relevant msg module.

  3. Need to use a NftParams enum for nft data passed to mint function. This is such as to not have too many parameters passed to the function. Would use a regular struct but need to be able to plug into the T extension parameter.

@github-actions
Copy link

github-actions bot commented Apr 1, 2023

Cosm-Orc Gas Usage

Contract Op Name Gas Used Old Gas Used Gas Diff File
multiple_contracts Execute__minter_batch_exec_mint_token_w_trading_time 1951291 1936836 +0.7463% e2e/src/tests/factory_test.rs:314
sg721_base Store__Store 8350194 7989509 +4.5145% e2e/src/helpers/chain.rs:78
sg721_metadata_onchain Store__Store 8868361 8353990 +6.1572% e2e/src/helpers/chain.rs:78
sg721_nt Store__Store 7823369 7513111 +4.1296% e2e/src/helpers/chain.rs:78
sg721_updatable Store__Store 8866866 8648375 +2.5264% e2e/src/helpers/chain.rs:78
Raw Report for 7f9f9a5
Contract Op Name Gas Used Gas Wanted File
vending_factory Instantiate__factory_inst 187243 257748 e2e/src/helpers/helper.rs:35
vending_factory Execute__factory_exec_minter_inst_w_trading_time 3853353 5756832 e2e/src/tests/factory_test.rs:244
vending_factory Execute__factory_exec_minter_inst 34033150 51026519 e2e/src/tests/factory_test.rs:98
vending_factory Store__Store 3046089 4545993 e2e/src/helpers/chain.rs:78
multiple_contracts Execute__minter_batch_exec_mint_token_w_trading_time 1951291 2894139 e2e/src/tests/factory_test.rs:314
multiple_contracts Execute__minter_batch_exec_mint_token 18805408 28188417 e2e/src/tests/factory_test.rs:164
base_factory Store__Store 2667815 3978582 e2e/src/helpers/chain.rs:78
base_minter Store__Store 6999832 10476548 e2e/src/helpers/chain.rs:78
sg721_base Store__Store 8350194 12502091 e2e/src/helpers/chain.rs:78
sg721_metadata_onchain Store__Store 8868361 13279341 e2e/src/helpers/chain.rs:78
sg721_nt Store__Store 7823369 11711853 e2e/src/helpers/chain.rs:78
sg721_updatable Store__Store 8866866 13277099 e2e/src/helpers/chain.rs:78
sg_whitelist Store__Store 3587344 5357876 e2e/src/helpers/chain.rs:78
sg_whitelist_flex Store__Store 3522240 5260220 e2e/src/helpers/chain.rs:78
vending_minter Store__Store 8753909 13107663 e2e/src/helpers/chain.rs:78
vending_minter_wl_flex Store__Store 8954727 13408886 e2e/src/helpers/chain.rs:78
whitelist_immutable Store__Store 2195122 3269543 e2e/src/helpers/chain.rs:78

@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Patch coverage: 34.86% and project coverage change: -0.56 ⚠️

Comparison is base (f5f5310) 57.59% compared to head (7f9f9a5) 57.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
- Coverage   57.59%   57.04%   -0.56%     
==========================================
  Files          72       72              
  Lines        3415     3476      +61     
==========================================
+ Hits         1967     1983      +16     
- Misses       1448     1493      +45     
Impacted Files Coverage Δ
contracts/collections/sg721-base/src/lib.rs 100.00% <ø> (ø)
contracts/collections/sg721-base/src/msg.rs 80.76% <ø> (ø)
contracts/collections/sg721-base/src/state.rs 83.33% <ø> (ø)
...acts/collections/sg721-metadata-onchain/src/lib.rs 0.00% <0.00%> (ø)
...tracts/collections/sg721-updatable/src/contract.rs 65.21% <0.00%> (+11.64%) ⬆️
contracts/minters/base-minter/src/contract.rs 85.08% <ø> (-0.13%) ⬇️
...cts/minters/vending-minter-wl-flex/src/contract.rs 0.00% <ø> (ø)
contracts/minters/vending-minter/src/contract.rs 84.96% <ø> (-0.03%) ⬇️
packages/sg721/src/lib.rs 100.00% <ø> (ø)
contracts/collections/sg721-nt/src/lib.rs 40.00% <34.78%> (-12.64%) ⬇️
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@shanev shanev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to re-think ownership and hardcoding upgrade versions.

NftInfo {
token_id: String,
},
#[returns(NftInfoResponse<Empty>)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check this works for sg721-metadata-onchain

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to double check? Do you mean after merge?

@humanalgorithm
Copy link
Contributor Author

Update 4-24-2023: This is now using the inherited migrations from cw_721 base per larry0x PR: public-awesome/cw-nfts#119

@shanev @larry0x

@shanev shanev merged commit bb57b28 into main Jun 4, 2023
@shanev shanev deleted the humanalgorihtm/update-cw-nfts-version branch June 4, 2023 21:26
@yubrew yubrew changed the title Update cw-nfts version SG-645 Update cw-nfts version Jul 26, 2023
@linear
Copy link

linear bot commented Jul 26, 2023

SG-645 Upgrade NFT contracts to cw-nfts v0.17

This gives us some new features like transferring ownership that creators have been asking for.

@yubrew
Copy link
Contributor

yubrew commented Jul 26, 2023

Updated title so linear catches issue

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.

5 participants