Is it mandatory to use IPFS for file storage and use its hash in metadata for NFT, What if file is stored on s3 and we save its sha256 or md5 in metadata?

Hash will be same until file content is ditto, in case of file changed, hash will be changed and we can verify by hash saved in metadata.


No, it isn't mandatory to use IPFS on ERC721 - as you already know, other than the token URI, typically, very little data about the asset is stored in the token on the blockchain, and the actual content linked to the token (i.e. MetaData and Image) can be served from anywhere on the internet.

However, IPFS is often used on NFTs to further the spirit of immutability / good faith. IPFS' content addressing scheme prevents changes to the data (since an attempt to update the image or metadata json would result in a new, different address).

Without a tamperproofing mechanism like IPFS CID, it is trivial for an NFT minter to change the metadata json or image content after the token has been minted or transferred onwards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.