-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
When calling lock_collection the function will get the CollectionInfo for the specified collection_id and will set the max field to the field nfts_count. Since the max is now set to nfts_count the issuer can no longer mint anymore NFTs within the collection. However, if an NFT owner were to call burn_nft then the Collection issuer can now call mint_nft and be able to mint an NFT is a locked Collection.
Possible solutions:
- When locking a collection, the
issuerof the collection is set to a burner address that is inaccessible. This prevents anyone from minting new NFTs. - Instead of setting the
maxfield tonfts_count, setmaxto0. This prevents a new mint no matter the case as the check here should prevent a new mint:
rmrk-substrate/pallets/rmrk-core/src/functions.rs
Lines 349 to 352 in 405af24
| // Prevent minting when nfts_count is greater than the collection max. | |
| if let Some(max) = collection.max { | |
| ensure!(collection.nfts_count < max, Error::<T>::CollectionFullOrLocked); | |
| } |
rmrk-substrate/pallets/rmrk-core/src/functions.rs
Lines 433 to 435 in 405af24
| if let Some(max) = collection.max { | |
| ensure!(collection.nfts_count < max, Error::<T>::CollectionFullOrLocked); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels