Based on a guide from Pinata
Understanding the relationship between NFT contract, asset files and metadata.
Notes:
- asset file and metadata.json file are uploaded separately.
- NFT (ERC721) contract references a
uri
that is pointing to themetadata.json
. The metadata file then points to the asset file in itsimage
key - same process in ethereum or polygon, just switch network configurations.
- after deploying and updating uri, check NFT contract on polygonscan -> call
tokenURI()
-> getipfs://QmQ3ayz3G45ztZR3L2s2Vjfcy9CmYr1kKpQmhhkXWYafDs
-> get"image"
attribute -> get asset file / folder