-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[move-examples] post-mint reveal example #5821
Conversation
e4d4d4a
to
ee2c243
Compare
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
Can you add some comments or PR's desc for:
|
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
bf5b113
to
fd79906
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good first start!
so my thoughts would be to use a bit vector to track what has been claimed and not claimed. then we have a table that is indexed by its sequential inclusion... so table[0], table[1]... the bit vector starts as all 0 and as indexes in the table are selected, the bit vector is set to 1... then the problem is to create a randomizer that iterates on the bit vector until it finds a 0.
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
fd79906
to
c4ce83c
Compare
Actually, I find Chloe's method is simpler. She uses big vector to record URI. Each mint removes a used URI. The index of the URI to be removed is generated by the pseudo-random number generated by timestamp mod by the remaining length. This approach doesn't need an extra bit vector. |
c4ce83c
to
a829987
Compare
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
a829987
to
34dc712
Compare
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
34dc712
to
79a0eb5
Compare
e949dc6
to
ef01640
Compare
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
aptos-move/move-examples/post_mint_reveal_nft/sources/minting.move
Outdated
Show resolved
Hide resolved
ef01640
to
5b1cd38
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
49337b1
to
5b37ee6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5b37ee6
to
40fe516
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Co-authored-by: chloeqjz <[email protected]>
Description
Test Plan