NFT Guide 3 — Questions and Answers
Question 1: Which interface detection standard lets contracts advertise that they support ERC-721?
- ERC-165 (Correct answer)
- ERC-721
- ERC-2981
- ERC-1271
Correct answer: ERC-165
ERC-165 provides supportsInterface, which contracts use to declare ERC-721 compliance.
Question 2: What is a common reason to use a Merkle tree in an NFT mint contract?
- To compress images
- To gate an allowlist efficiently on-chain (Correct answer)
- To generate random token IDs
- To store metadata
Correct answer: To gate an allowlist efficiently on-chain
A Merkle root lets the contract verify allowlist membership without storing every address.
Question 3: Why is using block.timestamp or blockhash for NFT trait randomness considered insecure?
- It is too slow
- Miners or validators can influence or predict it (Correct answer)
- It costs too much gas
- It is not supported in Solidity
Correct answer: Miners or validators can influence or predict it
On-chain values like blockhash are predictable or manipulable, so a service like Chainlink VRF is preferred.
Question 4: What does 'lazy minting' refer to in NFT development?
- Minting only on weekends
- Deferring the on-chain mint and gas cost until the first sale (Correct answer)
- Minting without metadata
- Minting all tokens at deployment
Correct answer: Deferring the on-chain mint and gas cost until the first sale
Lazy minting creates the token on-chain only when it is purchased, shifting gas costs to the buyer.
Question 5: In the ERC-721 metadata JSON, which field conventionally holds the displayed picture link?
- image (Correct answer)
- owner
- supply
- hash
Correct answer: image
The metadata standard uses an 'image' field containing a URL to the asset.
Question 6: What is the benefit of making baseURI updatable but then renouncing or freezing it?
- It lowers gas forever
- It allows a reveal then guarantees metadata permanence (Correct answer)
- It enables infinite minting
- It hides the owner
Correct answer: It allows a reveal then guarantees metadata permanence
A mutable baseURI supports a delayed reveal, and freezing it afterward assures collectors metadata won't change.
Question 7: Which function must be called to let a marketplace transfer your NFT on your behalf?
- mint
- approve or setApprovalForAll (Correct answer)
- burn
- tokenURI
Correct answer: approve or setApprovalForAll
approve grants per-token access while setApprovalForAll grants collection-wide access to an operator.
Which interface detection standard lets contracts advertise that they support ERC-721?