You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 issuer of the collection is set to a burner address that is inaccessible. This prevents anyone from minting new NFTs.
Instead of setting the max field to nfts_count, set max to 0. This prevents a new mint no matter the case as the check here should prevent a new mint:
#215 implements the second proposed solution, which is much simpler than the first. unless there's some other use/value for the max variable, i thinking setting it to 0 is the ideal solution for this issue.
When calling
lock_collection
the function will get theCollectionInfo
for the specifiedcollection_id
and will set themax
field to the fieldnfts_count
. Since themax
is now set tonfts_count
theissuer
can no longer mint anymore NFTs within the collection. However, if an NFT owner were to callburn_nft
then the Collectionissuer
can now callmint_nft
and be able to mint an NFT is a locked Collection.Possible solutions:
issuer
of the collection is set to a burner address that is inaccessible. This prevents anyone from minting new NFTs.max
field tonfts_count
, setmax
to0
. 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
rmrk-substrate/pallets/rmrk-core/src/functions.rs
Lines 433 to 435 in 405af24
The text was updated successfully, but these errors were encountered: