erc721r / ERC721R

An ERC721 base contract that mints tokens in a pseudo-random order. Because the token is revealed in the same transaction as the mint itself, this contract creates a fun but not fully secure experience.
MIT License
96 stars 22 forks source link

Great! #2

Open coeuscrypto opened 2 years ago

coeuscrypto commented 2 years ago

Hi,

Is it possible to integrate this without needing to include this erc721R file; could you make an example which just indicates that to add to a typical erc721 contract?

I want to use your approach, although I might tailor it to use a VRF2 random number for the shuffle as that would improve fairness.

I also notice you added a means for the owner to claim a specific id from the collection; this is perfect, as there are a few NFT I wish to handpick as prizes.

This is a godsend to me, I just need a little assistance implementing it; feel free to message @coeus_crypto on Telegram!

coeuscrypto commented 2 years ago

Also note; ERC721R seems to be a proposed name for a refundable ERC721 spec...

RogerPodacter commented 2 years ago

If you don't want to include ERC721r try the CryptoPhunks V2 approach. they implemented the randomization in their contract while including the OZ ERC721 (Enumerable in that case). ERC721r was extracted from Phunks in the first place.

Note that the Phunks approach uses more gas for minting multiple tokens as it updates the minter's balance for every token instead of once in the end.