TGViewer
Solidity Treasures Solidity Treasures @soliditypedia · 4.28K subscribers
Post #584 440
Skip the enumerable mapping: batch-mint NFTs without per-token storage writes

Most ERC-721 batch mints loop _mint, paying a fresh SSTORE for every token's owner slot. On a 20-item mint that's 20 cold writes just for ownership.

ERC721F takes the ERC721A-style approach: on a batch it writes the owner slot once, for the first id in the run, and leaves the rest empty. ownerOf(id) then walks backward to the nearest set slot to resolve the real owner.

The trade-off is explicit: minting gets cheap, but ownerOf and the first transfer of a token in a batch cost more (the read-time walk, plus initializing the slot on transfer). It also drops on-chain enumeration by default. Good default for large drops, wrong one if your contract reads ownership in hot paths.

github.com/FrankNFT-labs/ERC721F
@soliditypedia
GitHub GitHub - FrankNFT-labs/ERC721F: The goal of ERC721F is to provide a simple extension of IERC721 with significant gas savings for… The goal of ERC721F is to provide a simple extension of IERC721 with significant gas savings for minting multiple and single NFTs in a single transaction. - FrankNFT-labs/ERC721F
  • 👍 1
More from @soliditypedia
  1. Sep 22, 2026Deploy at the same address on every chain, without shipping initcode. Plain CREATE2 ties t…
  2. Sep 18, 2026An on-chain guard for AI-agent transactions moves the trust to whoever signs the attestati…
  3. Sep 16, 2026A generalized MEV bot beat the attacker to the rsETH exploit in the same block When the ex…
  4. Sep 15, 2026Public-mempool gas sponsorship can't have all three: no locked money, no off-chain trust,…
  5. Sep 13, 2026A QEMU/KVM sandbox is not a boundary for a cyber-capable agent Trail of Bits gave a fronti…
  6. Sep 12, 2026This week in Solidity Allbridge halted its core bridge after a $1.65M exploit: a $1.12M Ka…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →