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

Update minter and collection ownership #603

Closed
wants to merge 4 commits into from
Closed

Conversation

shanev
Copy link
Member

@shanev shanev commented Aug 15, 2023

There's confusion over collection owners and minters right now. To clarify it, I propose we move to this solution:

  • Replace the minter admin with cw-ownable
  • Make collections read-only
  • Only minters can write / update collections
  • Collections only have minters as owners

So now collection administration is passed through from the minter. We don't have to check creator in CollectionInfo anymore.

So now:

  • Minters have a transferrable owner that can be an EOA, multisig, or DAO
  • Collections are always "owned" by minters
  • Collection update have to pass through minters

TODO:

  • Replace admin in ConfigExtension with cw-ownable.
  • Add a migration to to minters to migrate admin to cw-ownable.
  • UpdateCollectionInfo {} and others can be added to the minter as well

NOTE:
Here's how to do extend cw721 execute messages the "proper" way: https://github.com/public-awesome/core/pull/16/files#diff-b5b5b8636528b3755dac1ab0e2d1c015b3fbcf730232bdc68e6fd81352a3a3e1R61

@github-actions
Copy link

Cosm-Orc Gas Usage

No gas diff larger than 0.5%

Raw Report for 9c54e53
Contract Op Name Gas Used Gas Wanted File
vending_factory Instantiate__factory_inst 187123 257618 e2e/src/helpers/helper.rs:35
vending_factory Execute__factory_exec_minter_inst_w_trading_time 3857517 5763078 e2e/src/tests/factory_test.rs:244
vending_factory Store__Store 3051621 4554287 e2e/src/helpers/chain.rs:78
vending_factory Execute__factory_exec_minter_inst 34037315 51032766 e2e/src/tests/factory_test.rs:98
multiple_contracts Execute__minter_batch_exec_mint_token_w_trading_time 3108041 4639193 e2e/src/tests/open_edition_factory_and_mint_tests.rs:491
multiple_contracts Execute__minter_batch_exec_mint_token 18805222 28208616 e2e/src/tests/factory_test.rs:164
base_factory Store__Store 2665631 3975306 e2e/src/helpers/chain.rs:78
base_minter Store__Store 6994957 10469235 e2e/src/helpers/chain.rs:78
open_edition_factory Store__Store 3427964 5118806 e2e/src/helpers/chain.rs:78
open_edition_factory Execute__factory_exec_minter_inst 541539 789183 e2e/src/tests/open_edition_minter_executes_tests.rs:59
open_edition_factory Instantiate__factory_inst 186484 256608 e2e/src/helpers/open_edition_minter_helpers.rs:39
open_edition_factory Execute__factory_exec_minter_inst_w_trading_time 542254 790256 e2e/src/tests/open_edition_factory_and_mint_tests.rs:405
open_edition_minter Store__Store 8399048 12575372 e2e/src/helpers/chain.rs:78
sg721_base Store__Store 8352677 12505815 e2e/src/helpers/chain.rs:78
sg721_metadata_onchain Store__Store 8830375 13222362 e2e/src/helpers/chain.rs:78
sg721_nt Store__Store 7779182 11645573 e2e/src/helpers/chain.rs:78
sg721_updatable Store__Store 9139619 13686228 e2e/src/helpers/chain.rs:78
sg_whitelist Store__Store 3582092 5349998 e2e/src/helpers/chain.rs:78
sg_whitelist_flex Store__Store 3519952 5256788 e2e/src/helpers/chain.rs:78
vending_minter Store__Store 8757783 13113474 e2e/src/helpers/chain.rs:78
vending_minter_wl_flex Store__Store 8928811 13370016 e2e/src/helpers/chain.rs:78
whitelist_immutable Store__Store 2195122 3269543 e2e/src/helpers/chain.rs:78
minter Execute__minter_exec_mint_to_token 363943 522794 e2e/src/tests/open_edition_minter_executes_tests.rs:180
minter Execute__minter_exec_purge 139023 185468 e2e/src/tests/open_edition_minter_executes_tests.rs:281
minter Execute__minter_exec_update_per_addr_limit 209126 290571 e2e/src/tests/open_edition_minter_executes_tests.rs:216
minter Execute__minter_exec_update_trading_time 271313 383850 e2e/src/tests/open_edition_minter_executes_tests.rs:99

@shanev shanev mentioned this pull request Sep 15, 2023
2 tasks
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.

3 participants