Skip to content

Commit 815df09

Browse files
authored
v3: upgrade to ethers v6 (#435)
* update package.json version to v3 upgrade hardhat to v6 remove multicall dependency * dep upgrades, fixes * progress * more progress * progress * progress * progress * move sinon types to devdep * update package.json * updates * simplify * fixes * progress * fix * fix compile warnings * try to fix ci error * fix ci * fix package.json lint
1 parent 9540efd commit 815df09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+8289
-21786
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.19.0
1+
20.10.0

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Instantiate your instance of seaport using your ethers provider:
4646
import { Seaport } from "@opensea/seaport-js";
4747
import { ethers } from "ethers";
4848

49-
const provider = new ethers.providers.Web3Provider(window.ethereum);
49+
const provider = new ethers.BrowserProvider(window.ethereum);
5050

5151
const seaport = new Seaport(provider);
5252
```
@@ -57,7 +57,7 @@ const seaport = new Seaport(provider);
5757
import { Seaport } from "@opensea/seaport-js";
5858
import { ethers } from "ethers";
5959

60-
const provider = new ethers.providers.JsonRpcProvider(
60+
const provider = new ethers.JsonRpcProvider(
6161
"https://<network>.alchemyapi.io/v2/YOUR-API-KEY",
6262
);
6363

@@ -71,7 +71,7 @@ import { Seaport } from "@opensea/seaport-js";
7171
import { ethers } from "ethers";
7272

7373
// Provider must be provided to the signer when supplying a custom signer
74-
const provider = new ethers.providers.JsonRpcProvider(
74+
const provider = new ethers.JsonRpcProvider(
7575
"https://<network>.alchemyapi.io/v2/YOUR-API-KEY",
7676
);
7777

@@ -104,7 +104,7 @@ const { executeAllActions } = await seaport.createOrder(
104104
],
105105
consideration: [
106106
{
107-
amount: ethers.utils.parseEther("10").toString(),
107+
amount: ethers.parseEther("10").toString(),
108108
recipient: offerer,
109109
},
110110
],
@@ -154,7 +154,7 @@ const order = await executeAllActions();
154154
const { executeAllActions: executeAllFulfillActions } =
155155
await seaport.fulfillOrder({
156156
order,
157-
accountAddress: fulfiller.address,
157+
accountAddress: fulfiller,
158158
});
159159

160160
const transaction = executeAllFulfillActions();

hardhat.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import * as dotenv from "dotenv";
2-
32
import { HardhatUserConfig } from "hardhat/config";
3+
import "@nomicfoundation/hardhat-toolbox";
44
import "@typechain/hardhat";
5-
import "@nomiclabs/hardhat-ethers";
6-
import "@nomiclabs/hardhat-waffle";
7-
import "solidity-coverage";
85

96
dotenv.config();
107

@@ -40,7 +37,7 @@ const config: HardhatUserConfig = {
4037
},
4138
typechain: {
4239
outDir: "src/typechain-types",
43-
target: "ethers-v5",
40+
target: "ethers-v6",
4441
},
4542
paths: {
4643
tests: "test",

0 commit comments

Comments
 (0)