Overview
A complete NFT project with an ERC-721 collection, decentralized marketplace, and EIP-2981 royalty standard. Includes IPFS for metadata storage and Blockscout for browsing.Quick Start
Generated Files
my-nft
dokrypt.yaml
foundry.toml
README.md
contracts
NFTCollection.sol
Marketplace.sol
Royalty.sol
test
NFTCollection.t.sol
Marketplace.t.sol
Royalty.t.sol
scripts
deploy-nft.js
upload-metadata.js
Configuration
Contracts
NFTCollection.sol (ERC-721)
Full standalone ERC-721 implementation with minting and metadata. Constructor:
Minting Logic:
- Payment must equal
mintPrice - Cannot exceed
maxSupply - Token IDs are sequential starting from 1
IERC721, IERC721Metadata, IERC721Receiver
Marketplace.sol
Decentralized NFT marketplace with listings, offers, and platform fees. Fee: 2.5% platform fee (250 basis points) on all sales. Functions:
Events:
ItemListed, ItemSold, ItemCanceled, OfferMade, OfferAccepted
Listing struct:
Royalty.sol (EIP-2981)
EIP-2981 royalty standard implementation for NFT secondary sales. Functions:
Constraints:
- Maximum royalty: 10% (1000 basis points)
- Per-token royalties override the default
- Calculation:
royaltyAmount = salePrice * basisPoints / 10000
IPFS Metadata
Upload Metadata
Metadata Format
Deployment
- Collection name, symbol
- Base URI (IPFS CID)
- Max supply
- Mint price (in wei)