Seaport is a marketplace contract for safely and efficiently creating and fulfilling orders for ERC721 and ERC1155 items.
Seaport is a marketplace contract for safely and efficiently creating and fulfilling orders for ERC721 and ERC1155 items. Each order contains an arbitrary number of items that the offerer is willing to give (the "offer") along with an arbitrary number of items that must be received along with their respective receivers (the "consideration").
See the documentation, the interface, and the full interface documentation for more information on Seaport.
Seaport deployment addresses:
Network | Address |
---|---|
Ethereum Mainnet | 0x00000000006CEE72100D161c57ADA5Bb2be1CA79 |
Polygon Mainnet | 0x00000000006CEE72100D161c57ADA5Bb2be1CA79 |
Goerli | 0x00000000006CEE72100D161c57ADA5Bb2be1CA79 |
Rinkeby | 0x00000000006CEE72100D161c57ADA5Bb2be1CA79 |
Conduit Controller deployment addresses:
Network | Address |
---|---|
Ethereum Mainnet | 0x00000000006cE100a8b5eD8eDf18ceeF9e500697 |
Polygon Mainnet | 0x00000000006cE100a8b5eD8eDf18ceeF9e500697 |
Goerli | 0x00000000006cE100a8b5eD8eDf18ceeF9e500697 |
Rinkeby | 0x00000000006cE100a8b5eD8eDf18ceeF9e500697 |
To install dependencies and compile contracts:
git clone https://github.com/ProjectOpenSea/seaport && cd seaport
yarn install
yarn build
To run hardhat tests written in javascript:
yarn test
yarn coverage
Note: artifacts and cache folders may occasionally need to be removed between standard and coverage test runs.
To run hardhat tests against reference contracts:
yarn test:ref
yarn coverage:ref
To profile gas usage:
yarn profile
Seaport also includes a suite of fuzzing tests written in solidity with Foundry.
To install Foundry (assuming a Linux or macOS system):
curl -L https://foundry.paradigm.xyz | bash
This will download foundryup. To start Foundry, run:
foundryup
To install dependencies:
forge install
To run tests:
forge test
The following modifiers are also available:
- Level 2 (-vv): Logs emitted during tests are also displayed.
- Level 3 (-vvv): Stack traces for failing tests are also displayed.
- Level 4 (-vvvv): Stack traces for all tests are displayed, and setup traces for failing tests are displayed.
- Level 5 (-vvvvv): Stack traces and setup traces are always displayed.
forge test -vv
For more information on foundry testing and use, see Foundry Book installation instructions.
To run lint checks:
yarn lint:check
Lint checks utilize prettier, prettier-plugin-solidity, and solhint.
"prettier": "^2.5.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
Contributions to Seaport are welcome by anyone interested in writing more tests, improving readability, optimizing for gas efficiency, or extending the protocol via new zone contracts or other features.
When making a pull request, ensure that:
- All tests pass.
- Code coverage remains at 100% (coverage tests must currently be written in hardhat).
- 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 tests (ideally via foundry) are included for all new features or code paths.
- If making a modification to third-party dependencies,
yarn audit
passes. - A descriptive summary of the PR has been provided.
MIT Copyright 2022 Ozone Networks, Inc.