NFT Minting and Burning Mechanics 3 — Questions and Answers
Question 1: In ERC-1155, which function mints a quantity of a fungible token id to an address?
- _mint(to, id, amount, data) (Correct answer)
- _mint(to, tokenId)
- safeTransferFrom(from, to, id)
- _burnBatch(from, ids, amounts)
Correct answer: _mint(to, id, amount, data)
ERC-1155 _mint takes an id, an amount, and a data parameter for batched/semi-fungible tokens.
Question 2: What is the main gas advantage of ERC-1155 _mintBatch over multiple ERC-721 mints?
- Multiple token ids are minted in a single transaction (Correct answer)
- It skips emitting any events
- It removes the need for approvals forever
- It avoids storing balances on-chain
Correct answer: Multiple token ids are minted in a single transaction
Batch minting creates several token ids in one call, saving per-transaction overhead.
Question 3: Which event does ERC-1155 emit for a single burn operation?
- TransferSingle with the 'to' field as the zero address (Correct answer)
- Transfer with tokenId
- BurnSingle
- ApprovalForAll
Correct answer: TransferSingle with the 'to' field as the zero address
ERC-1155 burns emit TransferSingle with the destination set to address(0).
Question 4: In ERC-1155, what must hold true for _burn(from, id, amount) to succeed?
- The 'from' balance for that id must be at least 'amount' (Correct answer)
- The token must be non-fungible
- The caller must be the contract deployer
- The amount must equal one
Correct answer: The 'from' balance for that id must be at least 'amount'
Burning reverts if the holder's balance for the id is less than the amount being burned.
Question 5: When using lazy minting, when is the NFT actually written to the blockchain?
- At the time of the first purchase or claim (Correct answer)
- At the moment of contract deployment
- When metadata is uploaded to IPFS
- Never; it stays off-chain permanently
Correct answer: At the time of the first purchase or claim
Lazy minting defers the on-chain mint until a buyer triggers it, shifting gas to the buyer.
Question 6: What signed data structure typically authorizes a lazy mint via voucher?
- An EIP-712 typed signature from the creator (Correct answer)
- A raw private key embedded in the contract
- A Merkle root with no signature
- A plaintext password hash
Correct answer: An EIP-712 typed signature from the creator
Lazy mint vouchers are commonly authorized with EIP-712 typed-data signatures.
Question 7: Why is _mintBatch's array length validation important?
- The ids and amounts arrays must be equal length to map correctly (Correct answer)
- It determines the token's resale price
- It sets the royalty percentage
- It encrypts the metadata
Correct answer: The ids and amounts arrays must be equal length to map correctly
Mismatched ids and amounts array lengths would corrupt balance assignment, so they must match.
In ERC-1155, which function mints a quantity of a fungible token id to an address?