0
0
Blockchain / Solidityprogramming~5 mins

Token metadata and URI in Blockchain / Solidity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is token metadata in blockchain?
Token metadata is information that describes a token's properties, such as its name, symbol, description, image, and other attributes that help users and applications understand the token.
Click to reveal answer
beginner
What does URI stand for and what is its role in token metadata?
URI stands for Uniform Resource Identifier. In token metadata, it points to the location where the token's metadata JSON file is stored, often on IPFS or a web server.
Click to reveal answer
intermediate
Why is storing token metadata off-chain common practice?
Because storing large amounts of data on the blockchain is expensive and inefficient, token metadata is usually stored off-chain (like on IPFS or centralized servers) and linked via a URI.
Click to reveal answer
intermediate
What is a typical structure of a token metadata JSON file?
A typical token metadata JSON includes fields like 'name', 'description', 'image' (URL or IPFS hash), and sometimes 'attributes' or 'properties' describing traits of the token.
Click to reveal answer
intermediate
How does a smart contract use the token URI?
The smart contract provides a function (like tokenURI in ERC-721) that returns the URI pointing to the token's metadata, allowing wallets and marketplaces to fetch and display token details.
Click to reveal answer
What does the token URI usually point to?
AThe token owner's wallet address
BThe token's smart contract code
CA JSON file containing token metadata
DThe blockchain network address
Why is token metadata often stored off-chain?
ABecause blockchain storage is costly and limited
BBecause metadata is not important
CBecause smart contracts cannot access metadata
DBecause off-chain data is more secure
Which of these is NOT typically part of token metadata JSON?
ADescription
BToken name
CImage URL
DToken owner's private key
What standard function returns the token URI in an ERC-721 contract?
AownerOf
BtokenURI
CgetMetadata
DtransferFrom
Which protocol is commonly used to store token metadata off-chain?
AIPFS
BHTTP only
CFTP
DSMTP
Explain what token metadata is and why it is important in blockchain tokens.
Think about how metadata helps describe a token beyond just its ID.
You got /3 concepts.
    Describe how a token URI works and how it connects a smart contract to token metadata.
    Consider how the smart contract tells apps where to find token details.
    You got /3 concepts.