• Stars
    star
    2,141
  • Rank 21,556 (Top 0.5 %)
  • Language
    Solidity
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Seaport is a marketplace protocol for safely and efficiently buying and selling NFTs.

Seaport

Version Test CI Code Coverage License Docs Discussions JS Library Discord

Seaport

Seaport is a marketplace protocol for safely and efficiently buying and selling NFTs.

Table of Contents

Background

Seaport is a marketplace protocol for safely and efficiently buying and selling NFTs. Each listing 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.

Deployments

Canonical Cross-chain Deployment Addresses

Contract Canonical Cross-chain Deployment Address
Seaport 1.1 0x00000000006c3852cbEf3e08E8dF289169EdE581
Seaport 1.2 0x00000000000006c7676171937C444f6BDe3D6282
Seaport 1.3 0x0000000000000aD24e80fd803C6ac37206a45f15
Seaport 1.4 0x00000000000001ad428e4906aE43D8F9852d0dD6
Seaport 1.5 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC
ConduitController 0x00000000F9490004C11Cef243f5400493c00Ad63
SeaportValidator 0x00e5F120f500006757E984F1DED400fc00370000
SeaportNavigator 0x0000f00000627D293Ab4Dfb40082001724dB006F

Note: Seaport 1.2 and Seaport 1.3 both contain known limitations; proceed with caution if interacting with them, particularly when utilizing restricted or contract orders.

Deployments By EVM Chain

Network Seaport 1.5 Seaport 1.4 Seaport 1.1 ConduitController SeaportValidator SeaportNavigator
Ethereum

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Goerli

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Sepolia

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Polygon

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Mumbai

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Optimism

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Optimistic Goerli

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Arbitrum

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Arbitrum Goerli

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Arbitrum Nova

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Base Goerli

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

Not deployed

Not deployed

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Avalanche C-Chain

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Avalanche Fuji

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Gnosis Chain

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

Chiado

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

Not deployed

Not deployed

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

BSC

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

BSC Testnet

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Klaytn

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Baobab

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

0x00e5F120f500006757E984F1DED400fc00370000

0x0000f00000627D293Ab4Dfb40082001724dB006F

Moonbeam

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

Not deployed

Not deployed

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

Moonriver

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

Not deployed

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

Canto

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

0x00000000000001ad428e4906aE43D8F9852d0dD6

0x00000000006c3852cbEf3e08E8dF289169EdE581

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

Fantom

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

Not deployed

Not deployed

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

Celo

0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC

Not deployed

Not deployed

0x00000000F9490004C11Cef243f5400493c00Ad63

Not deployed

Not deployed

To be deployed on other EVM chains, such as:

  • RSK
  • Boba
  • Aurora

To deploy to a new EVM chain, follow the steps outlined here.

Diagram

graph TD
    Offer & Consideration --> Order
    zone & conduitKey --> Order

    subgraph Seaport[ ]
    Order --> Fulfill & Match
    Order --> Validate & Cancel
    end

    Validate --> Verify
    Cancel --> OrderStatus

    Fulfill & Match --> OrderCombiner --> OrderFulfiller

    OrderCombiner --> BasicOrderFulfiller --> OrderValidator
    OrderCombiner --> FulfillmentApplier

    OrderFulfiller --> CriteriaResolution
    OrderFulfiller --> AmountDeriver
    OrderFulfiller --> OrderValidator

    OrderValidator --> ZoneInteraction
    OrderValidator --> Executor --> TokenTransferrer
    Executor --> Conduit --> TokenTransferrer
    Executor --> Verify

    subgraph Verifiers[ ]
    Verify --> Time & Signature & OrderStatus
    end

For a more thorough flowchart see Seaport diagram.

Docs

Install

To install dependencies and compile contracts:

git clone --recurse-submodules https://github.com/ProjectOpenSea/seaport && cd seaport
yarn install
yarn build

Usage

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 open the generated Hardhat coverage report locally after running yarn coverage or yarn coverage:ref:

open coverage/index.html

To profile gas usage:

yarn profile

Foundry Tests

Seaport also includes a suite of fuzzing tests written in Solidity with Foundry.

Before running these tests, you will need to compile an optimized build by running:

FOUNDRY_PROFILE=optimized forge build

This should create an optimized-out/ directory in your project root.

To run tests with full traces and debugging with source, create an .env file with the following line:

FOUNDRY_PROFILE=debug

You may then run tests with forge test, optionally specifying a level of verbosity (anywhere from one to five v's, eg, -vvv)

This will compile tests and contracts without via-ir enabled, which is much faster, but will not exactly match the deployed bytecode.

To run tests against the actual bytecode intended to be deployed on networks, you will need to pre-compile the contracts, and remove the FOUNDRY_PROFILE variable from your .env file. Note that informative error traces may not be available, and the Forge debugger will not show the accompanying source code.

FOUNDRY_PROFILE=optimized forge build
FOUNDRY_PROFILE=reference forge build

To run Forge coverage tests and open the generated coverage report locally:

brew install lcov
SEAPORT_COVERAGE=true forge coverage --report summary --report lcov && lcov -o lcov.info --remove lcov.info --rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 "test/*" "script/*" && genhtml lcov.info -o html --branch
open html/index.html

When working on the test suite based around FuzzEngine.sol, using FOUNDRY_PROFILE=moat_debug will cut compile times roughly in half.

Note that Forge does not yet ignore specific filepaths when running coverage tests.

For information on Foundry, including installation and testing, see the Foundry Book.

Linting

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",

Audits

OpenSea engaged Trail of Bits to audit the security of Seaport. From April 18th to May 12th 2022, a team of Trail of Bits consultants conducted a security review of Seaport. The audit did not uncover significant flaws that could result in the compromise of a smart contract, loss of funds, or unexpected behavior in the target system. Their full report is available here.

Contributing

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.

License

MIT Copyright 2023 Ozone Networks, Inc.

More Repositories

1

opensea-js

TypeScript SDK for the OpenSea marketplace
TypeScript
2,278
star
2

opensea-creatures

Example non-fungible collectible, to demonstrate OpenSea integration
JavaScript
1,167
star
3

opensea-erc1155

Example semi-fungible collectible, to demonstrate OpenSea integration for an ERC-1155 contract
JavaScript
605
star
4

embeddable-nfts

Easily embed OpenSea listings in your website!
TypeScript
329
star
5

operator-filter-registry

Solidity
311
star
6

seadrop

Smart contracts for primary drops on EVM chains
Solidity
290
star
7

seaport-js

A TypeScript library to interface with the Seaport marketplace.
TypeScript
255
star
8

opensea-whitelabel

Easily whitelabel an OpenSea marketplace for your own website
TypeScript
226
star
9

metadata-api-nodejs

Sample metadata API for crypto collectibles, written in Node.js
JavaScript
193
star
10

stream-js

A TypeScript SDK to receive pushed updates from OpenSea over websocket.
TypeScript
166
star
11

seaport-gossip

A peer-to-peer network for sharing Seaport orders.
TypeScript
125
star
12

metadata-api-python

Simple API for serving ERC721 metadata
Python
117
star
13

nft-tutorial

A very basic NFT tutorial repository for absolute beginners in the world of Web3 and smart contracts
JavaScript
96
star
14

marketplace-benchmarks

A comparison supported features and respective gas overhead for NFT marketplaces
Solidity
70
star
15

meta-transactions

Solidity
49
star
16

seaport-order-validator

Seaport Order Validator provides a simple method for validating and diagnosing Seaport orders
Solidity
48
star
17

shipyard-core

Solidity
48
star
18

seaport-core

Core Seaport smart contracts
Solidity
45
star
19

SIPs

The Seaport Improvement Proposal repository
31
star
20

ethmoji-contracts

Ethmoji smart contracts
JavaScript
22
star
21

seaport.py

Python
21
star
22

seaport-sol

Solidity helpers for working with Seaport on and off-chain using Forge scripts
Solidity
21
star
23

ships-log

An example dapp listing recent auctions and bids on OpenSea, with the ability to buy items or accept offers right from the page.
JavaScript
20
star
24

seaport-1.6

A unified repo containing the core Seaport contracts, types, tools, and tests to facilitate Seaport 1.6 development
Solidity
20
star
25

ethmoji-js

SDK for Ethmoji blockchain avatars
JavaScript
19
star
26

opensea-stream-discord-webhook

A sample repo showing how a developer using the OpenSea Stream API might be able to connect a Discord webhook to send messages whenever new events occur for a collection
TypeScript
18
star
27

0x-fee-wrapper

Solidity
16
star
28

shipyard

Template Repo for OpenSea smart contract development
Solidity
13
star
29

redeemables

EVM smart contracts for redeemables and dynamic traits
Solidity
12
star
30

seaport-types

Standalone structs and interfaces related to Seaport
Solidity
12
star
31

tstorish

Use TSTORE in contracts deployed to multiple chains with varying opcode support
Solidity
11
star
32

ethdenver-workshop

Devcon 5 workshop
JavaScript
10
star
33

seaport-generic-adapter

A proof of concept Seaport app that enables fulfilling non-Seaport listings through Seaport.
Solidity
10
star
34

seaport-deploy

A utility for deploying Seaport to local chains for use in testing.
Solidity
9
star
35

seaport-hooks

A collection of various Seaport Hooks (zone hooks, contract hooks, and item hooks): https://docs.opensea.io/docs/seaport-hooks
5
star
36

ethmoji-js-demo

JavaScript
5
star
37

jellyfish

Build UIs as state machines using Compose.
Kotlin
5
star
38

buy-sell-opensea-sdk-demo

https://docs.opensea.io/docs/buy-sell-nfts
TypeScript
3
star
39

vercel-repros

TypeScript
1
star