This is some initial thoughts on what the airdrop and NFT contracts might look like based on previous design and some other considerations. I've marked it "draft" since it's just some rough code I threw together as of right now.
Basic Structure: The NFT contract must be deployed before the AirdropNFT contract since the latter takes the former's address as an arg. The AirdropNFT contract should allow an airdropped Lobster to mint an NFT. Owners are also able to mint NFTs.
The contract follows a URI structure where tokenURI
returns the baseURI
+ tokenId
. As such, metadata should be set with a base IPFS directory in which each metadata JSON matches a tokenId
- in other words, the metadata should be in JSONs named 1.json
, 2.json
, etc. This way when the NFTs are going to be revealed, the owner can call setBaseUri
and point the base URI to the directory with all the JSONs, and nothing else will need to be set.
tokenId
s auto-increment using an OZ counter, there is no need to pass in tokenId
s to mint.
There is an implementation of permit
based on Amxx's singleton implementation for approval-less transfers. This is my first time playing around with this, so caution is advised.