Token Metadata
tokenURI and JSON.
What Is Token Metadata?
Metadata describes what an NFT actually represents: its name, description, image, and attributes. While ownership is stored on-chain, the descriptive data usually lives off-chain in a JSON file.
The link between them is the tokenURI.
The tokenURI Function
The metadata extension defines tokenURI(tokenId), which returns a URL pointing to the JSON metadata for that specific token.
<code>function tokenURI(uint256 tokenId) external view returns (string memory);</code>All lessons in this course
- The ERC-721 Standard
- Minting NFTs
- Token Metadata
- Marketplaces