NFT Skills 3 — Questions and Answers
Question 1: What distinguishes the ERC-1155 standard from ERC-721?
- ERC-1155 supports both fungible and non-fungible tokens in a single contract (Correct answer)
- ERC-1155 cannot store metadata
- ERC-1155 only works on Bitcoin
- ERC-1155 removes the concept of ownership
Correct answer: ERC-1155 supports both fungible and non-fungible tokens in a single contract
ERC-1155 is a multi-token standard allowing fungible, semi-fungible, and non-fungible tokens within one contract.
Question 2: Which tool would a developer use to connect a web front-end to the Ethereum blockchain and a user's wallet?
- ethers.js or web3.js (Correct answer)
- Photoshop
- Postman only
- FTP client
Correct answer: ethers.js or web3.js
Libraries like ethers.js and web3.js let dApps interact with smart contracts and wallets in the browser.
Question 3: What is a 'reentrancy' vulnerability in smart contract development?
- A bug where gas runs out
- An attack where an external call re-enters the contract before state updates complete (Correct answer)
- A compiler warning about unused variables
- A way to speed up minting
Correct answer: An attack where an external call re-enters the contract before state updates complete
Reentrancy occurs when a malicious contract calls back into the original function before its state changes finalize, draining funds.
Question 4: Which pattern helps prevent reentrancy attacks in Solidity?
- Checks-Effects-Interactions (Correct answer)
- Lazy minting
- Proxy upgrade
- Gas golfing
Correct answer: Checks-Effects-Interactions
The checks-effects-interactions pattern updates state before making external calls, mitigating reentrancy.
Question 5: What does 'gas' represent when deploying or interacting with an NFT contract?
- The contract's storage capacity
- The unit measuring computational work and its fee on Ethereum (Correct answer)
- The number of tokens minted
- The contract's version number
Correct answer: The unit measuring computational work and its fee on Ethereum
Gas measures computational effort, and users pay a gas fee to execute transactions on Ethereum.
Question 6: What is 'lazy minting' in NFT development?
- Minting slowly to save bandwidth
- Deferring on-chain minting until the moment of purchase to shift gas costs to the buyer (Correct answer)
- Minting only on weekends
- Minting without metadata
Correct answer: Deferring on-chain minting until the moment of purchase to shift gas costs to the buyer
Lazy minting delays the actual on-chain mint until a buyer purchases, so the creator avoids upfront gas costs.
Question 7: Which file format is standard for NFT metadata that platforms like OpenSea parse?
- XML
- JSON (Correct answer)
- CSV
- YAML
Correct answer: JSON
NFT metadata is conventionally stored as a JSON object containing name, description, image, and attributes.
What distinguishes the ERC-1155 standard from ERC-721?