Token Standards (ERC-721/1155) Flashcards
6 cards from real NFT practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Token Standards (ERC-721/1155) flashcards as text
A blockchain game developer needs to create a smart contract to manage a variety of in-game assets. This includes unique, legendary swords (non-fungible), stacks of identical potions (fungible), and limited-edition event tickets that are interchangeable before the event but become unique collectibles after (semi-fungible). Which token standard would be the most efficient and appropriate for this scenario?
Answer: ERC-1155, as it can manage fungible, non-fungible, and semi-fungible tokens within a single contract.
The ERC-1155 standard is specifically designed as a multi-token standard, capable of managing fungible, non-fungible, and semi-fungible tokens within a single smart contract. This makes it highly efficient for applications like gaming, as it reduces deployment costs and simplifies asset management by avoiding the need for multiple contracts.
What is a primary advantage of using the ERC-1155 standard over ERC-721 for transferring multiple, distinct NFTs to a single recipient?
Answer: ERC-1155 offers significantly lower gas costs through batch transfer functionality.
ERC-1155's key innovation is the ability to perform batch operations, including `safeBatchTransferFrom`. This allows multiple token IDs (both fungible and non-fungible) to be transferred in a single transaction, which drastically reduces gas fees compared to the ERC-721 standard, where each token transfer requires a separate transaction.
An artist is launching a prestigious collection of 50 one-of-a-kind digital art pieces. Each piece is entirely unique, has its own rich metadata, and is expected to be traded individually as a high-value collector's item. Which token standard is the most suitable and conventional choice for this project?
Answer: ERC-721, because it is designed specifically for unique, non-fungible assets and is the established standard for digital art.
ERC-721 is the original and most established standard for non-fungible tokens, where each token is distinct and has a unique ID and metadata. It is the ideal choice for collections of unique digital art, as its structure emphasizes the individuality and singular ownership of each piece, which aligns perfectly with the high-value, one-of-a-kind nature of the assets.
Which of the following functions is a key feature of the ERC-1155 standard that is NOT present in the ERC-721 standard?
Answer: safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data)
The `safeBatchTransferFrom` function is unique to the ERC-1155 standard. It allows for the transfer of multiple different token types (specified by the `ids` array) and their respective quantities (specified by the `amounts` array) in a single transaction, a core feature that distinguishes it from ERC-721. The other functions exist in some form in both standards, but batch operations are native to ERC-1155.
A developer is examining the differences between ERC-721 and ERC-1155. In the context of the `balanceOf` function, how does the implementation differ between the two standards?
Answer: In ERC-721, `balanceOf` returns the count of unique tokens an address owns; in ERC-1155, it requires both an address and a token ID to return the quantity of a specific token.
In the ERC-721 standard, `balanceOf(address owner)` returns the total number of NFTs an address holds within that contract. In contrast, the ERC-1155 `balanceOf(address account, uint256 id)` function requires two arguments: the address and the specific token ID. This is because a single ERC-1155 contract can manage many different types of tokens, so you must specify which token ID you are querying the balance for.
Which statement accurately describes the contract deployment model for creating multiple distinct collections of NFTs using ERC-721 versus ERC-1155?
Answer: ERC-721 requires a separate smart contract for each collection, whereas ERC-1155 can manage multiple collections or token types within a single contract.
The standard approach for ERC-721 is to deploy one smart contract per collection of tokens (e.g., one contract for CryptoPunks, another for Bored Apes). The ERC-1155 standard was designed to overcome this limitation by allowing a single smart contract to mint and manage an unlimited number of different token types (fungible or non-fungible), each identified by a unique ID.