0PricingLogin
Web3 & DApp Development Fundamentals · Lesson

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

  1. The ERC-721 Standard
  2. Minting NFTs
  3. Token Metadata
  4. Marketplaces
← Back to Web3 & DApp Development Fundamentals