ProjectOpenSea / seaport-deploy

A utility for deploying Seaport to local chains for use in testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

seaport-deploy

A utility for deploying Seaport v1.6 and related contracts to local chains for use in testing.

Include this repo as a submodule in your forge project:

$ forge install ProjectOpenSea/seaport-deploy

Then, you can use it like so:

pragma solidity ^0.8.24;

import {Vm} from "forge-std/Vm.sol";
import {Test} from "forge-std/Test.sol";
import {SeaportDeployer} from "seaport-deploy/src/SeaportDeployer.sol";

contract MyTest is Test {
    using SeaportDeployer for Vm;

    function setUp() public {
        // To just deploy Seaport + related contracts:
        vm.deploySeaport();

        // Or, to also deploy and configure the OpenSea canonical conduit:
        vm.deploySeaportAndConfigureConduit();
    }

    // tests here... they can now utilize Seaport 1.6 + related contracts locally
}

Be advised that you may need to manually set evm_version='cancun' or evm_version='shanghai' in your foundry.toml as Seaport v1.6 requires PUSH0 support.

About

A utility for deploying Seaport to local chains for use in testing.


Languages

Language:Solidity 100.0%