NFT Art NFT Minting and Smart Contracts 2 — Questions and Answers
Question 1: What is 'lazy minting' in the context of NFT art?
- Minting NFTs slowly over a long period
- Deferring the on-chain minting until the NFT is purchased (Correct answer)
- Minting without adding metadata
- Creating NFTs with low-resolution images
Correct answer: Deferring the on-chain minting until the NFT is purchased
Lazy minting defers the actual blockchain transaction until a buyer purchases the NFT, so creators avoid upfront gas fees.
Question 2: Which ERC standard introduced the ability to represent both fungible and non-fungible tokens in a single contract?
- ERC-20
- ERC-721
- ERC-1155 (Correct answer)
- ERC-998
Correct answer: ERC-1155
ERC-1155 is a multi-token standard that allows a single contract to manage both fungible and non-fungible tokens.
Question 3: What does the 'tokenURI' function in an ERC-721 contract typically return?
- The owner's wallet address
- A URL pointing to the NFT's metadata JSON file (Correct answer)
- The token's sale price
- The contract's ABI
Correct answer: A URL pointing to the NFT's metadata JSON file
The tokenURI function returns a URI (often an IPFS or HTTP URL) that points to a JSON file containing the NFT's metadata.
Question 4: An artist wants to ensure their NFT artwork metadata cannot be changed after minting. Which storage approach best achieves this?
- Centralized server with HTTPS
- IPFS with content-addressed hashing (Correct answer)
- Google Drive with public sharing
- Amazon S3 with versioning enabled
Correct answer: IPFS with content-addressed hashing
IPFS uses content-addressed storage where the CID (hash) changes if content changes, making original metadata tamper-evident.
Question 5: What is a 'royalty' in an NFT smart contract context?
- A fee paid to the blockchain network
- A percentage of secondary sales automatically paid to the original creator (Correct answer)
- The initial minting price
- A tax imposed by the marketplace
Correct answer: A percentage of secondary sales automatically paid to the original creator
NFT royalties are percentages of resale prices that smart contracts (often using EIP-2981) automatically direct to the original creator.
Question 6: During NFT minting, what is the primary purpose of the 'approve' function in ERC-721?
- To approve the NFT's artwork quality
- To allow another address to transfer a specific token on the owner's behalf (Correct answer)
- To confirm the minting transaction
- To set the royalty percentage
Correct answer: To allow another address to transfer a specific token on the owner's behalf
The approve function grants a specific address permission to transfer one particular token, enabling marketplace escrow mechanics.
Question 7: What problem does 'on-chain' metadata storage solve compared to off-chain storage?
- It makes NFTs cheaper to mint
- It ensures metadata persists even if external servers go offline (Correct answer)
- It speeds up transaction confirmation
- It reduces the size of the smart contract
Correct answer: It ensures metadata persists even if external servers go offline
Storing metadata directly on the blockchain ensures it remains accessible permanently, even if external hosting services shut down.
What is 'lazy minting' in the context of NFT art?