Skip to content

Commit

Permalink
v3: upgrade to ethers v6 (#435)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ryanio authored Dec 7, 2023
1 parent 9540efd commit 815df09
Show file tree
Hide file tree
Showing 47 changed files with 8,289 additions and 21,786 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
20.10.0
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Instantiate your instance of seaport using your ethers provider:
import { Seaport } from "@opensea/seaport-js";
import { ethers } from "ethers";

const provider = new ethers.providers.Web3Provider(window.ethereum);
const provider = new ethers.BrowserProvider(window.ethereum);

const seaport = new Seaport(provider);
```
Expand All @@ -57,7 +57,7 @@ const seaport = new Seaport(provider);
import { Seaport } from "@opensea/seaport-js";
import { ethers } from "ethers";

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

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

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

Expand Down Expand Up @@ -104,7 +104,7 @@ const { executeAllActions } = await seaport.createOrder(
],
consideration: [
{
amount: ethers.utils.parseEther("10").toString(),
amount: ethers.parseEther("10").toString(),
recipient: offerer,
},
],
Expand Down Expand Up @@ -154,7 +154,7 @@ const order = await executeAllActions();
const { executeAllActions: executeAllFulfillActions } =
await seaport.fulfillOrder({
order,
accountAddress: fulfiller.address,
accountAddress: fulfiller,
});

const transaction = executeAllFulfillActions();
Expand Down
7 changes: 2 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import * as dotenv from "dotenv";

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "solidity-coverage";

dotenv.config();

Expand Down Expand Up @@ -40,7 +37,7 @@ const config: HardhatUserConfig = {
},
typechain: {
outDir: "src/typechain-types",
target: "ethers-v5",
target: "ethers-v6",
},
paths: {
tests: "test",
Expand Down
Loading

0 comments on commit 815df09

Please sign in to comment.