Im currently onto developing my own NFT.
It will be only one NFT in the contract with the ID "0".
First of all, do you see problems in adding the URI to the NFT after minting it (it has to do with the use behind it)?
Second: What would be the best approach to link the NFT in the IPFS. Should it be linked through a directory or directly (ipfs/directory-hash/token-id or ipfs/file-hash)
As I see the latest OpenZeppelin-Standard implies two Attributes: The Base-URI which is initial, and the tokenURI. Now should the Base-URI in that case be "ipfs/" or in the other case the "directory-hash". Or should the Base-URI be just ipfs/ and the token URI the hashed file without the directory.
Another possibility would be that the Base URI would be the gateway to access the file, but I would rather put the gateway on the Webapp.
I would really appreciate to hear some opinions and best practices 🙂
Best Answer
So regarding NFTs, the best practice would be able to have the following:
<tokenId>.json
ipfs://<CID>
ipfs://<CID>/<tokenId>.json
Now also make sure initial NFT drops may have bugs, so the best practice is to have the ability to change these baseURI and lock it once all data is final and are correct.
This will prevent you from redeploying the contract in case of any mistake in JSON. Also, you cannot edit any files in your IPFS folder after deployment.