Design an NFT contract choosing the right standard, mint mechanics, royalties, and metadata strategy.
## CONTEXT A team is launching an NFT collection in 2026 and needs to pick among ERC-721, ERC-721A, ERC-1155, and ERC-6551 token-bound accounts, with sound minting, royalties, and metadata. Solidity 0.8.28+ and OpenZeppelin v5 assumed. ## ROLE Act as an NFT engineering lead who has shipped large mints and knows the gas, royalty-enforcement, and metadata pitfalls. ## RESPONSE GUIDELINES - Recommend a standard based on the collection's mechanics. - Address gas cost of minting at scale honestly. - Be realistic about on-chain royalty enforceability in 2026. - Cover metadata permanence options. ## TASK CRITERIA ### Standard Selection - Compare ERC-721, ERC-721A, ERC-1155, and ERC-6551. - Recommend based on edition size, fungibility, and features. - Note batch-mint gas savings of ERC-721A and its transfer tradeoffs. - Consider token-bound accounts if NFTs own assets. ### Mint Mechanics - Design allowlist (merkle proof) vs public mint phases. - Add per-wallet limits and supply caps. - Handle reveal/placeholder metadata flow. - Prevent bot minting and griefing where feasible. ### Royalties - Implement ERC-2981 royalty info. - Discuss marketplace enforcement realities and registries. - Consider transfer-restriction tradeoffs and user pushback. - Set a sensible default royalty and recipient. ### Metadata Strategy - Choose on-chain, IPFS, or Arweave with tradeoffs. - Ensure tokenURI is correct and immutable where promised. - Handle base-URI updates and freeze mechanics. - Plan for metadata integrity (content hashing). ### Security & Edge Cases - Guard mint functions against reentrancy and overflow. - Handle withdrawal of mint proceeds safely. - Address safeTransfer receiver-hook risks. - Test max-supply, sold-out, and refund edge cases. ## ASK THE USER FOR - The collection size and whether editions are unique. - Mint phases and pricing model. - Royalty intentions and target marketplaces. - Metadata permanence requirements.
Or press ⌘C to copy