Hi, guys!
The finished smart contract found on GitHub contains an implementation of the ERC1155 contract. The purpose of the contract is to mint many NFTs at once and then use a front-end to display the NFTs generated. I'm not sure though how to handle metadata of the NFTs that I will mint using this contract by copying it and deploying it on Rinkeby.
Let me explain what my thought-process to generate many NFTs was. I wanted to mint 5 unique NFTs, so I called the function mintBatch as follows:
mintBatch("0xf23s...", [0,1,2,3,4],[1,1,1,1,1])
Awesome, they were created as the transaction went through. Now that I have my NFTs, I want to display them to the user in the front-end. The thing is that I do not know where to give a token URI to each of the NFTs created so that I can access their metadata and display their images to the user in the front-end.
The only function the contract has concerning the uris is the mint()
function (but for that I would need to generate the 5 unique NFTs in 5 different transactions, right?) and the function below.
The uri()
function from the ERC1155 implementation is not overridden anywhere as well.
So, the question is: is my thought-process right for creating multiple NFTs at once and not having a way to display them to the user, UNLESS I modify the mintBatch()
function and also override the uri()
function from ERC1155 allowing that to happen?