SeaDrop is a contract for primary NFT drops on EVM chains.
SeaDrop runs primary NFT drops: public drops, allow lists, server-side signed mints and token-gated mints. A token contract configures its drop through SeaDrop, and minters mint through SeaDrop.
This branch is SeaDrop v1, which powers OpenSea's ERC-721 drops. SeaDrop v2 adds ERC-1155 tokens, ERC-20 payments and several public stages per token, and powers OpenSea's ERC-1155 open collections.
SeaDrop 1.0 is at 0x00005EA00Ac477B1030CE78506496e8C2dE24bf5 on Ethereum and most networks OpenSea supports. Deployments lists every network, the clone factories and the legacy contracts, and SeaDrop Deployment covers a new network.
flowchart LR
creator([Creator]) -->|"drop settings"| token["ERC721SeaDrop<br/>token"]
token --> seadrop["SeaDrop"]
minter([Minter]) -->|"mint + payment"| seadrop
seadrop -->|"mintSeaDrop()"| token
seadrop -->|"fee"| fee["Fee recipient"]
seadrop -->|"payout"| payout["Creator payout<br/>address"]
seadrop -.->|"events"| indexer["Indexers"]
The creator configures a drop by calling the token, for example updatePublicDrop() or multiConfigure(), and the token forwards the settings to SeaDrop. A minter calls SeaDrop with the payment, through mintPublic(), mintSigned(), mintAllowList() or mintAllowedTokenHolder(). SeaDrop checks the stage, the wallet limit and the max supply, pays the fee recipient and the creator's payout address, and calls mintSeaDrop() on the token. Every mint names a fee recipient, which can't be the zero address. When a drop restricts fee recipients, it must be one the token allows. The fee itself can be zero.
- Deployments
- SeaDrop Deployment
- SeaDrop Token Deployment
- Bring Your Own Token Contract
- Provenance Hash
- Upgradeable Contracts
git clone --recurse-submodules https://github.com/ProjectOpenSea/seadrop && cd seadrop
forge build
forge testDevelopment covers installing Foundry, coverage, gas snapshots, linting, size checks and what a pull request needs.
Spearbit audited SeaDrop. Read the report.
Contributions to SeaDrop are welcome by anyone interested in writing more tests, improving readability, optimizing for gas efficiency, or extending the protocol with new features.
When making a pull request, ensure that:
- All tests pass.
- Code coverage remains at 100%.
- All new code adheres to the style guide:
- All lint checks pass.
- Code is thoroughly commented with natspec where relevant.
- If making a change to the contracts:
- Gas snapshots are provided and demonstrate an improvement (or an acceptable deficit given other improvements).
- Reference contracts are modified correspondingly if relevant.
- New Foundry tests are included for all new features or code paths.
- A descriptive summary of the PR has been provided.
MIT Copyright 2022 Ozone Networks, Inc.
