← All NFT Flashcard Decks

Gas Optimization for NFTs 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 Gas Optimization for NFTs flashcards as text
  1. Which ERC standard is more gas-efficient when minting large quantities of fungible or semi-fungible tokens?

    Answer: ERC-1155

    ERC-1155 allows batch minting of multiple token types in a single transaction, significantly reducing per-token gas costs compared to ERC-721.

  2. What is 'lazy minting' in NFT development?

    Answer: Deferring on-chain minting until the first purchase or claim

    Lazy minting defers the actual on-chain transaction until a buyer claims the NFT, so the creator avoids upfront gas costs.

  3. Which storage approach costs the least gas for associating large data with an NFT?

    Answer: Storing only a content-addressed URI pointing to off-chain storage

    Storing only a URI (e.g., pointing to IPFS) on-chain is far cheaper than storing raw data in contract storage slots.

  4. What does the ERC-721A standard optimize compared to standard ERC-721?

    Answer: Lowering gas costs for batch minting sequential token IDs

    ERC-721A by Azuki writes batch ownership data once instead of per-token, dramatically cutting gas for minting multiple tokens in one transaction.

  5. Which Solidity technique reduces gas costs by skipping overflow/underflow checks for a counter known to be safe?

    Answer: using unchecked {} blocks

    Wrapping arithmetic in `unchecked {}` skips Solidity 0.8's built-in overflow checks, saving gas when the developer can guarantee no overflow.

  6. Why is packing multiple small variables into a single storage slot beneficial in NFT contracts?

    Answer: It reduces the number of SSTORE operations, lowering gas costs

    Each Ethereum storage slot is 32 bytes; packing variables like `uint128` together means fewer slots are written, reducing expensive SSTORE costs.