Blockchain Developer Token Standards and NFTs 2 — Questions and Answers
Question 1: Which ERC standard introduced a single contract capable of managing multiple token types, both fungible and non-fungible?
- ERC-721
- ERC-1155 (Correct answer)
- ERC-20
- ERC-777
Correct answer: ERC-1155
ERC-1155 is the multi-token standard allowing one contract to handle fungible, non-fungible, and semi-fungible tokens.
Question 2: In ERC-721, what function returns the owner of a specific token ID?
- balanceOf
- ownerOf (Correct answer)
- tokenURI
- approve
Correct answer: ownerOf
ownerOf(tokenId) returns the address that owns the given NFT.
Question 3: What does the ERC-721 metadata function tokenURI typically return?
- The token's price
- A URI pointing to a JSON metadata file (Correct answer)
- The owner's address
- The contract's bytecode
Correct answer: A URI pointing to a JSON metadata file
tokenURI returns a URI that resolves to JSON metadata describing the asset (name, image, attributes).
Question 4: Why is ERC-1155 considered more gas-efficient than deploying many ERC-721 contracts?
- It uses no storage
- It supports batch transfers of multiple token types in one call (Correct answer)
- It removes the need for a blockchain
- It eliminates approvals entirely
Correct answer: It supports batch transfers of multiple token types in one call
ERC-1155's safeBatchTransferFrom moves multiple token IDs and amounts in a single transaction, reducing gas.
Question 5: Which interface detection standard do ERC-721 contracts implement so others can query supported interfaces?
- ERC-165 (Correct answer)
- ERC-20
- ERC-1820
- ERC-4626
Correct answer: ERC-165
ERC-165 defines supportsInterface, used to advertise which interfaces (like ERC-721) a contract implements.
Question 6: In ERC-1155, what does the balanceOf function require as arguments?
- Only an address
- An address and a token ID (Correct answer)
- Only a token ID
- A URI
Correct answer: An address and a token ID
Because one contract holds many token types, balanceOf(account, id) needs both the holder and the specific id.
Question 7: What is a key risk of storing NFT metadata at a centralized HTTP URL rather than on IPFS?
- Higher gas fees
- The metadata/image can change or disappear, breaking the NFT (Correct answer)
- It prevents transfers
- It increases token supply
Correct answer: The metadata/image can change or disappear, breaking the NFT
Centralized URLs are mutable and can go offline, so the referenced image or data may change or vanish.
Which ERC standard introduced a single contract capable of managing multiple token types, both fungible and non-fungible?