I’m working on a NFT project using ERC721 smart contract (with ERC721URIStorage extension) where user can mint unique NFTs.
I have uploaded NFT’s json metadata’s (used for TokenURIs) to IPFS.
In the dapp (using react), there will be a mint button where the user clicks on it to mint a random NFT. I’m struggling though with developing the logic of minting random NFT. I have uploaded to IPFS a text file containing all the TokenURIs, and then reading this file in the mint function in my dapp where a random TokenURI is fetched and then minted. The issue here is that I couldn’t find a way to put a flag on the selected TokenURI on IPFS so next time mint function is called it will not get this TokenURI at all.
I’m not sure if this is the right way to accomplish what I need (mint unique NFTs)
Any help or hint here will be much appreciated.