NFT ERC-721 vs. ERC-1155 Standards 3 — Questions and Answers
Question 1: How does ERC-1155 typically handle metadata URIs to support many tokens?
- A unique hardcoded URI per token
- A single URI template with an {id} substitution placeholder (Correct answer)
- No metadata is allowed
- URIs stored only on-chain as strings
Correct answer: A single URI template with an {id} substitution placeholder
ERC-1155 uses a URI template where {id} is replaced with the hex token ID, avoiding per-token storage.
Question 2: In ERC-721, which event is emitted when ownership of a token changes?
- TransferSingle
- Transfer (Correct answer)
- URI
- ApprovalForAll
Correct answer: Transfer
ERC-721 emits a Transfer event with from, to, and tokenId on ownership change.
Question 3: Which event does ERC-1155 emit for a single token transfer?
- Transfer
- TransferSingle (Correct answer)
- TransferBatch
- Approval
Correct answer: TransferSingle
ERC-1155 emits TransferSingle for one token type and TransferBatch for many.
Question 4: A game wants gold coins, potions, and unique swords in one contract. Which standard fits best?
- ERC-721
- ERC-1155 (Correct answer)
- ERC-20
- ERC-165
Correct answer: ERC-1155
ERC-1155 handles fungible coins/potions and unique swords together in a single contract.
Question 5: What does ERC-1155's balanceOfBatch allow callers to do?
- Query one balance only
- Query multiple owner/ID balance pairs in one call (Correct answer)
- Mint tokens
- Burn tokens in bulk
Correct answer: Query multiple owner/ID balance pairs in one call
balanceOfBatch returns balances for arrays of owners and token IDs in a single query.
Question 6: Which standard's balanceOf takes only an address and returns a count of owned tokens?
- ERC-1155
- ERC-721 (Correct answer)
- ERC-165
- ERC-1820
Correct answer: ERC-721
ERC-721 balanceOf(owner) returns how many tokens an address owns; ERC-1155 also needs a token ID.
Question 7: What is a key risk of using transfer instead of safeTransfer to an unaware contract?
- Higher gas refunds
- Tokens may become permanently locked (Correct answer)
- Automatic burning
- Faster confirmation
Correct answer: Tokens may become permanently locked
Sending to a contract that cannot handle tokens without the safe variant can permanently lock them.
How does ERC-1155 typically handle metadata URIs to support many tokens?