I'm writing a solidity smart contract and I'm trying to decide which
This is based on a NFT marketplace
Option 1:
Mint 10,000 NFTs to my wallet, and then transfer each NFT to a buyers wallet on purchase
Option 2:
Mint directly to the buyers wallet on purchase
Assumptions:
Questions:
Let me answer all the questions,
Answer : Minting cost will be higher than transfer. Because on minting function you will push a new value to the storage. mapping(uint256 => address) which you update address non-zero from zero, so it costs much more than non-zero to non-zero.
Answer : With batch minting it can be efficient because some checks (value, amount etc.) done once at the beginning of transaction.
Answer : You can use merkle-proofs for initial owners. But that approach usually used for whitelist, but i think it can be fit on that situation as well. There some other standarts like ERC721-A which is more gas efficient and ERC1155 which is more gas efficient on batch transactions. Maybe there is new standarts too...
Answer : I dont think there is a connection between ipfs base uri and batch minting. The only thing you have to care about is wont let users see collection image order before minting. To hide this use a hidden NFT and assign that uri to all NFT's until all get minted and revealed.