Skip to content

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

License

Notifications You must be signed in to change notification settings

adonesky1/seaport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seaport

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").

For more information and a deeper dive on how Seaport works, check out the repo's Docs file, or the full Seaport Documentation.

Table of Contents

Install

Seaport uses several libraries for testing.

Install dependencies and compile:

yarn install
yarn build

Usage

To run hardhat tests written in javascript:

yarn test
yarn coverage

To profile gas usage (note that gas usage is mildly non-deterministic at the moment due to random inputs in tests):

yarn profile

Foundry Tests

Seaport also includes several 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.

Contributing

Contributions to Seaport are welcome by anyone. If you're interested in writing more tests, creating zones, improving readability, or increasing gas efficiency then we would love to see a Pull Request from you!

When making a pull request, please make sure:

  • Everything adheres to the style guide.
  • If making a change to the contracts, you've run gas profiling so we know the change is an improvement.
  • Follow the PR template

Linting

You can lint the repo any time with:

yarn lint:check

We use prettier, and prettier-plugin-solidity.

"prettier": "^2.5.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",

License

MIT Copyright 2022 Ozone Networks, Inc.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Solidity 66.2%
  • TypeScript 32.6%
  • JavaScript 1.2%