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

lock-collection logic needs fixed #10

Closed
bmacer opened this issue Dec 10, 2021 · 1 comment · Fixed by #32
Closed

lock-collection logic needs fixed #10

bmacer opened this issue Dec 10, 2021 · 1 comment · Fixed by #32
Milestone

Comments

@bmacer
Copy link
Contributor

bmacer commented Dec 10, 2021

lock collection sets max to currently-minted. so someone could then burn and re-mint, which doesn't lock.
perhaps set max to one less than the currently-minted, then add a check when burning so if currently_minted < max (and not zero) then burning is not allowed.

@ilionic ilionic added this to the rmrk-core milestone Dec 14, 2021
@HashWarlock
Copy link
Contributor

HashWarlock commented Dec 20, 2021

Correct me if I'm misinterpreting this, but we wouldn't decrement the amount of minted NFTs when we burn an NFT within a collection, right? At least that is what I ran into with RMRK 1.0 Collections before. Burning would only destroy the NFT, but the NFTs minted in the collection count would remain the same.

So in this case would it make sense to check the NextNftId value be a way to determine if we have hit the max value? For example, I minted an NFT in a collection and Burn that NFT, but the NextNftId returns 1:
image

Then I go and mint a new NFT which would have 1 active NFT in the collection, but the NextNftId will still increment to 2 seen here:
image

This would make it where if we were to check the NextNftId and compare that to the collection's max value then if they are equal, we would not perform the minting of a new NFT.

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 a pull request may close this issue.

3 participants