NFT ERC-721 Drop with Performance Testing
๐ญ Overview
A production-ready ERC-721 NFT drop smart contract system with whitelist mechanics, time-gated public mint, royalty support, and a full test suite including Artillery-based API load testing for the minting backend.
๐ ๏ธ What I Built
๐ Smart Contract (Solidity + OpenZeppelin)
- ๐จ ERC-721 with metadata URI management and on-chain/off-chain hybrid reveal
- โฐ Time-gated minting phases: whitelist mint window โ public mint window, enforced by block timestamp
- ๐ Whitelist mechanics: merkle tree-based allowlist with per-address mint limit
- ๐ Royalty support: ERC-2981 on-chain royalty standard for marketplace compatibility
- ๐ฆ Supply management: configurable max supply, per-wallet limits, reserve for team allocation
- ๐ฅ Role-based admin controls: MINTER_ROLE, ADMIN_ROLE via OpenZeppelin AccessControl
๐งช Hardhat Test Suite
- โฐ Phase transition tests: whitelist โ public mint boundary conditions
- ๐ณ Merkle proof validation: valid proof, invalid proof, expired proof, address not in tree
- ๐ฆ Supply cap enforcement: minting at exactly max supply, attempting to exceed
- ๐ Royalty calculation tests: ERC-2981 royaltyInfo correctness for various sale prices
- โฝ Gas optimization tests: batch minting scenarios
๐ Artillery Performance Testing
- ๐งช Load test suite for the minting API backend using Artillery
- ๐ Simulates concurrent mint requests at varying concurrency levels (10, 50, 100, 500 rps)
- โ Validates API response times, error rates, and throughput under load
- ๐ Tests both whitelist mint and public mint endpoints with realistic wallet distributions
๐ Metadata Pipeline
- ๐ง TypeScript scripts for generating generative metadata from trait layers
- ๐ค IPFS upload pipeline via Pinata for decentralized metadata storage
- ๐ฆ Bulk metadata generation supporting 10k+ item collections
โญ Key Highlights
- ๐งช Artillery performance testing integrated into the CI pipeline for regression detection
- ๐ณ Merkle tree whitelist system with on-chain proof verification
- ๐ ERC-2981 royalty standard for cross-marketplace royalty enforcement
- ๐ Complete metadata pipeline from trait generation to IPFS deployment