Skip to content

Commit 9af0e43

Browse files
authored
Update to v1.4 (#171)
update to 1.4
1 parent cd03062 commit 9af0e43

File tree

8 files changed

+2320
-654
lines changed

8 files changed

+2320
-654
lines changed

package-lock.json

Lines changed: 2302 additions & 636 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"prettier-package-json": "^2.6.3",
9393
"prettier-plugin-solidity": "^1.0.0-beta.13",
9494
"seaport": "ProjectOpenSea/seaport#76e508657888e3ec84039e1da269c822826991ef",
95-
"seaport_v1_2": "ProjectOpenSea/seaport#1.2",
95+
"seaport_v1_4": "ProjectOpenSea/seaport#1.4",
9696
"sinon": "^13.0.1",
9797
"sinon-chai": "^3.7.0",
9898
"solhint": "^3.3.7",

src/__tests__/utils/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const describeWithFixture = (
3838
);
3939

4040
const Seaportv12Factory = await ethers.getContractFactory(
41-
"seaport_v1_2/contracts/Seaport.sol:Seaport"
41+
"seaport_v1_4/contracts/Seaport.sol:Seaport"
4242
);
4343

4444
const ConduitControllerFactory = await ethers.getContractFactory(
@@ -75,7 +75,7 @@ export const describeWithFixture = (
7575
contractAddress: seaportv12Contract.address,
7676
domainRegistryAddress: domainRegistry.address,
7777
},
78-
seaportVersion: "1.2",
78+
seaportVersion: "1.4",
7979
});
8080

8181
const TestERC721 = await ethers.getContractFactory("TestERC721");

src/abi/Seaport_v1_2.ts renamed to src/abi/Seaport_v1_4.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const SeaportABIv12 = [
1+
const SeaportABIv14 = [
22
{
33
inputs: [
44
{
@@ -2812,4 +2812,4 @@ const SeaportABIv12 = [
28122812
},
28132813
];
28142814

2815-
export { SeaportABIv12 };
2815+
export { SeaportABIv14 };

src/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { BigNumber } from "ethers";
22

33
export const SEAPORT_CONTRACT_NAME = "Seaport";
44
export const SEAPORT_CONTRACT_VERSION = "1.1";
5-
export const SEAPORT_CONTRACT_VERSION_V1_2 = "1.2";
5+
export const SEAPORT_CONTRACT_VERSION_V1_4 = "1.4";
66
export const OPENSEA_CONDUIT_KEY =
77
"0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000";
88
export const OPENSEA_CONDUIT_ADDRESS =
@@ -120,8 +120,8 @@ export const KNOWN_CONDUIT_KEYS_TO_CONDUIT = {
120120
export const CROSS_CHAIN_SEAPORT_ADDRESS =
121121
"0x00000000006c3852cbef3e08e8df289169ede581";
122122

123-
export const CROSS_CHAIN_SEAPORT_V1_2_ADDRESS =
124-
"0x00000000000006c7676171937C444f6BDe3D6282";
123+
export const CROSS_CHAIN_SEAPORT_V1_4_ADDRESS =
124+
"0x00000000000001ad428e4906aE43D8F9852d0dD6";
125125

126126
export const DOMAIN_REGISTRY_ADDRESS =
127127
"0x000000000DaD0DE04D2B2D4a5A74581EBA94124A";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.17;
33

4-
import "seaport_v1_2/contracts/Seaport.sol";
4+
import "seaport_v1_4/contracts/Seaport.sol";

src/seaport.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import {
1010
import { _TypedDataEncoder } from "ethers/lib/utils";
1111
import { DomainRegistryABI } from "./abi/DomainRegistry";
1212
import { SeaportABI } from "./abi/Seaport";
13-
import { SeaportABIv12 } from "./abi/Seaport_v1_2";
13+
import { SeaportABIv14 } from "./abi/Seaport_v1_4";
1414
import {
1515
SEAPORT_CONTRACT_NAME,
1616
SEAPORT_CONTRACT_VERSION,
17-
SEAPORT_CONTRACT_VERSION_V1_2,
17+
SEAPORT_CONTRACT_VERSION_V1_4,
1818
EIP_712_ORDER_TYPE,
1919
KNOWN_CONDUIT_KEYS_TO_CONDUIT,
2020
MAX_INT,
@@ -23,7 +23,7 @@ import {
2323
OrderType,
2424
CROSS_CHAIN_SEAPORT_ADDRESS,
2525
DOMAIN_REGISTRY_ADDRESS,
26-
CROSS_CHAIN_SEAPORT_V1_2_ADDRESS,
26+
CROSS_CHAIN_SEAPORT_V1_4_ADDRESS,
2727
} from "./constants";
2828
import type {
2929
SeaportConfig,
@@ -131,10 +131,10 @@ export class Seaport {
131131

132132
this.contract = new Contract(
133133
overrides?.contractAddress ??
134-
(seaportVersion === "1.2"
135-
? CROSS_CHAIN_SEAPORT_V1_2_ADDRESS
134+
(seaportVersion === "1.4"
135+
? CROSS_CHAIN_SEAPORT_V1_4_ADDRESS
136136
: CROSS_CHAIN_SEAPORT_ADDRESS),
137-
seaportVersion === "1.2" ? SeaportABIv12 : SeaportABI,
137+
seaportVersion === "1.4" ? SeaportABIv14 : SeaportABI,
138138
this.multicallProvider
139139
) as SeaportContract;
140140

@@ -448,8 +448,8 @@ export class Seaport {
448448
return {
449449
name: SEAPORT_CONTRACT_NAME,
450450
version:
451-
this.config.seaportVersion === "1.2"
452-
? SEAPORT_CONTRACT_VERSION_V1_2
451+
this.config.seaportVersion === "1.4"
452+
? SEAPORT_CONTRACT_VERSION_V1_4
453453
: SEAPORT_CONTRACT_VERSION,
454454
chainId,
455455
verifyingContract: this.contract.address,

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type SeaportConfig = {
2929
conduitKeyToConduit?: Record<string, string>;
3030

3131
// The Seaport version to use
32-
seaportVersion?: "1.1" | "1.2";
32+
seaportVersion?: "1.1" | "1.4";
3333

3434
overrides?: {
3535
contractAddress?: string;

0 commit comments

Comments
 (0)