Project · Intermediate · about 16 hours
An NFT collection with an allowlist mint
Build an ERC-721 collection with a Merkle-proof allowlist, a public mint phase, royalties metadata and withdrawals, fully tested in Foundry.
Skills:Blockchain fundamentals, Smart contracts and Solidity, Automated testing
Part of: Blockchain Developer
Data and licences
Brief
NFT drops combine several patterns every contract developer should know: Merkle proofs, phased sales, supply limits and safe withdrawals. Use a local Anvil chain and, when you deploy publicly, a testnet such as Sepolia with free test ether from a faucet. Never use real funds or a wallet that holds any, and never paste a private key into code or a website.
What to build
Write an ERC-721 contract with a maximum supply, an owner-controlled phase switch and a per-wallet mint limit
Implement the allowlist phase with a Merkle root stored on chain and proofs supplied by minters
Write a TypeScript or Python script that builds the tree from a CSV of addresses and outputs proofs
Add ERC-2981 royalty information and token metadata on IPFS or another content-addressed store
Test each phase, the limits, wrong proofs and the owner withdrawal, and deploy to Anvil with a script
Deliverables
Repository with
src/,test/,scripts/merkle/, metadata andREADME.md
How it is graded
Reviewers mint with a wrong proof, exceed the wallet limit and mint past the cap, and check each fails with a clear error.
Stretch
Add a reveal step where metadata is hidden until a set time, and explain the trust assumptions.
Deliverables
- An ERC-721 contract on OpenZeppelin with allowlist and public mint phases, a supply cap and per-wallet limits
- A script that builds the Merkle tree of allowlisted addresses and produces proofs
- Metadata served from content-addressed storage, with ERC-2981 royalty information
- Tests for every phase, limit and revert, plus a fuzz test on the per-wallet limit
How a reviewer grades it
| Criterion | Weight | What good looks like |
|---|---|---|
| Mint phases, caps and limits are enforced correctly | 30% | |
| Merkle allowlist is correct and cheap to verify | 25% | |
| Tests cover every phase and revert | 30% | |
| Metadata, royalties and documentation | 15% |