Skip to content

Commit

Permalink
Ethers v6 (#184)
Browse files Browse the repository at this point in the history
* Updating deps for ethers v6

* Migrating to ethers-v6 wip

* Fixing remaing type errors

* hardhat tests running now

* wip 2

* wip 3

* Updating ethers v6.13.0 and github actions

* expect nonces to return bigints

* Gas estimation should be bigint

* Fixing test wallet deployment

* Fixing bigint in LibBytes test

* Fixing bigint in MainModule test

* Fixing sig hash of interface functions

* Fixing remaining tests

* Updating github actions for node 20

* Fixing bench tests

* Revert "Fixing bench tests"

This reverts commit 436be02.

* SequenceWallet deploy should just return ContractTransactionResponse
  • Loading branch information
corbanbrook authored Jul 3, 2024
1 parent 145b79a commit d58a16e
Show file tree
Hide file tree
Showing 25 changed files with 2,055 additions and 1,523 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: pnpm build
- run: pnpm benchmark
Expand All @@ -16,7 +16,7 @@ jobs:
name: Typescript lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: pnpm lint:ts

Expand Down Expand Up @@ -53,12 +53,12 @@ jobs:
name: Huff tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Huff
uses: huff-language/huff-toolchain@v2
uses: huff-language/huff-toolchain@v3
with:
version: nightly

Expand All @@ -79,7 +79,7 @@ jobs:
version: nightly

- name: Install Huff
uses: huff-language/huff-toolchain@v2
uses: huff-language/huff-toolchain@v3
with:
version: nightly

Expand All @@ -90,7 +90,7 @@ jobs:
name: Foundry tests (long arrays)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -100,7 +100,7 @@ jobs:
version: nightly

- name: Install Huff
uses: huff-language/huff-toolchain@v2
uses: huff-language/huff-toolchain@v3
with:
version: nightly

Expand Down
12 changes: 6 additions & 6 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { HardhatUserConfig, task } from 'hardhat/config'
import { networkConfig } from './utils/config-loader'

import '@nomicfoundation/hardhat-ethers'
import '@nomicfoundation/hardhat-verify'
import '@nomiclabs/hardhat-truffle5'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-web3'
import '@nomiclabs/hardhat-etherscan'
import "@tenderly/hardhat-tenderly"
import '@tenderly/hardhat-tenderly'

import 'hardhat-gas-reporter'
import 'solidity-coverage'
Expand All @@ -23,7 +23,7 @@ const config: HardhatUserConfig = {
settings: {
optimizer: {
enabled: true,
runs: 500000,
runs: 500000
}
}
},
Expand Down Expand Up @@ -64,8 +64,8 @@ const config: HardhatUserConfig = {
showTimeSpent: true
},
tenderly: {
project: "horizon/sequence-dev-1",
username: "Agusx1211-horizon",
project: 'horizon/sequence-dev-1',
username: 'Agusx1211-horizon'
}
}

Expand Down
22 changes: 22 additions & 0 deletions networks/hardhat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"contractName": "WalletFactory",
"address": "0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A"
},
{
"contractName": "MainModule",
"address": "0xE1846F966D116B86d65481Fe81886219D698b60D"
},
{
"contractName": "MainModuleUpgradable",
"address": "0xB39E1ed61caC9E8eE8CDD3218765cF6a7fE390db"
},
{
"contractName": "GuestModule",
"address": "0x28Ec0675C7b40ed78EBcBBbDF39e5652c0787B18"
},
{
"contractName": "SequenceUtils",
"address": "0x4817Fe9f2352E88991A7c84E4385708Ccff05704"
}
]
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"build": "pnpm compile && pnpm adapter",
"compile": "hardhat --max-memory 4096 compile",
"clean": "rimraf artifacts && rimraf cache",
"typecheck": "tsc --noEmit",
"test": "hardhat test",
"benchmark": "BENCHMARK=true pnpm test",
"coverage": "COVERAGE=true NET_ID=1 hardhat coverage",
"deploy": "hardhat run utils/deploy-contracts.ts --network",
"deploy": "hardhat run utils/deploy-contracts.ts --network hardhat",
"verify": "hardhat verify --network",
"release": "pnpm publish src",
"lint": "pnpm lint:ts && pnpm lint:sol",
Expand All @@ -20,7 +21,7 @@
"lint:ts": "eslint -c .eslintrc.js \"./**/*.ts\"",
"lint:ts:fix": "eslint -c .eslintrc.js --fix \"./**/*.ts\"",
"format": "prettier --write ./**/*.ts",
"adapter": "typechain --target ethers-v5 --out-dir gen/typechain \"./artifacts/contracts/**/*[^dbg].json\"",
"adapter": "typechain --target ethers-v6 --out-dir gen/typechain \"./artifacts/contracts/**/*[^dbg].json\"",
"prepare": "husky"
},
"types": "gen/typechain/index.ts",
Expand All @@ -36,9 +37,9 @@
}
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@nomiclabs/hardhat-truffle5": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-verify": "^2.0.4",
"@nomiclabs/hardhat-truffle5": "^2.0.7",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@tenderly/hardhat-tenderly": "^1.0.11",
"@types/chai-as-promised": "^7.1.0",
Expand All @@ -61,7 +62,7 @@
"ethereum-waffle": "^3.4.4",
"ganache-cli": "6.12.2",
"hardhat": "^2.20.1",
"hardhat-gas-reporter": "1.0.4",
"hardhat-gas-reporter": "1.0.10",
"husky": "^9.0.11",
"ora": "^5.4.1",
"rimraf": "^3.0.2",
Expand All @@ -70,7 +71,7 @@
"solidity-coverage": "0.8.3",
"threads": "^1.7.0",
"ts-node": "^10.9.1",
"typechain": "^8.1.0",
"typechain": "^8.3.2",
"typescript": "^4.7.4",
"yesno": "^0.3.1"
},
Expand All @@ -84,8 +85,8 @@
"extra": ""
},
"dependencies": {
"@typechain/ethers-v5": "^7.0.1",
"ethers": "^5.7.2",
"@typechain/ethers-v6": "^0.5.1",
"ethers": "^6.13.0",
"keccak256": "^1.0.6"
}
}
Loading

0 comments on commit d58a16e

Please sign in to comment.