Skip to content

Commit

Permalink
Update Node and Hardhat (#174)
Browse files Browse the repository at this point in the history
Why:
* Some package updates and a bit of maintenance was needed

How:
* Changing the node version in `tool-versions` to `20.11.1`
* Changing the `hardhat` version in `package.json` to `2.20.1`
* Adding the `hardhat-foundry` dev package so we can start migrating out
  of Hardhat in favor of Foundry
* Updating the CI node version
* Removing the reviewpad action
* Adding Foundry to the contracts-test workflow
  • Loading branch information
DavideSilva authored Feb 27, 2024
1 parent b4699e8 commit 9393505
Show file tree
Hide file tree
Showing 11 changed files with 473 additions and 319 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contracts-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: actions/[email protected]
with:
node-version: "16"
node-version: "20"

- run: yarn install

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/contracts-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -34,7 +38,7 @@ jobs:
- uses: actions/[email protected]
with:
node-version: "16"
node-version: "20"

- uses: actions/setup-python@v2
with:
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/reviewpad.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/web-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14.17.0'
node-version: '20.11.1'
registry-url: 'https://npm.pkg.github.com'

- name: Setup module dependencies cache
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 16.14.0
nodejs 20.11.1
3 changes: 2 additions & 1 deletion packages/contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ cache
node_modules
src/types
deployments/localhost
*.csv
*.csv
cache_forge
11 changes: 5 additions & 6 deletions packages/contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[default]

# hardhat compatibility
[profile.default]
src = 'contracts'
libs = ['lib', 'node_modules']

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
2 changes: 2 additions & 0 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import "hardhat-gas-reporter";
import "./src/tasks";
import { networks } from "./src/hardhat";

require("@nomicfoundation/hardhat-foundry");

const config = {
solidity: {
version: "0.8.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/lib/forge-std
Submodule forge-std updated 56 files
+1 −0 .gitattributes
+134 −0 .github/workflows/ci.yml
+29 −0 .github/workflows/sync.yml
+0 −26 .github/workflows/tests.yml
+2 −0 .gitignore
+1 −1 LICENSE-APACHE
+1 −1 LICENSE-MIT
+9 −5 README.md
+21 −0 foundry.toml
+1 −1 lib/ds-test
+16 −0 package.json
+635 −0 scripts/vm.py
+35 −0 src/Base.sol
+27 −0 src/Script.sol
+376 −0 src/StdAssertions.sol
+248 −0 src/StdChains.sol
+817 −0 src/StdCheats.sol
+15 −0 src/StdError.sol
+107 −0 src/StdInvariant.sol
+183 −0 src/StdJson.sol
+43 −0 src/StdMath.sol
+378 −0 src/StdStorage.sol
+333 −0 src/StdStyle.sol
+226 −0 src/StdUtils.sol
+32 −627 src/Test.sol
+1,109 −68 src/Vm.sol
+406 −386 src/console2.sol
+105 −0 src/interfaces/IERC1155.sol
+12 −0 src/interfaces/IERC165.sol
+43 −0 src/interfaces/IERC20.sol
+190 −0 src/interfaces/IERC4626.sol
+164 −0 src/interfaces/IERC721.sol
+73 −0 src/interfaces/IMulticall3.sol
+216 −0 src/mocks/MockERC20.sol
+221 −0 src/mocks/MockERC721.sol
+13,248 −0 src/safeconsole.sol
+0 −365 src/test/StdAssertions.t.sol
+0 −173 src/test/StdCheats.t.sol
+0 −200 src/test/StdMath.t.sol
+0 −277 src/test/StdStorage.t.sol
+1,015 −0 test/StdAssertions.t.sol
+216 −0 test/StdChains.t.sol
+610 −0 test/StdCheats.t.sol
+15 −19 test/StdError.t.sol
+212 −0 test/StdMath.t.sol
+315 −0 test/StdStorage.t.sol
+110 −0 test/StdStyle.t.sol
+342 −0 test/StdUtils.t.sol
+15 −0 test/Vm.t.sol
+10 −0 test/compilation/CompilationScript.sol
+10 −0 test/compilation/CompilationScriptBase.sol
+10 −0 test/compilation/CompilationTest.sol
+10 −0 test/compilation/CompilationTestBase.sol
+187 −0 test/fixtures/broadcast.log.json
+441 −0 test/mocks/MockERC20.t.sol
+721 −0 test/mocks/MockERC721.t.sol
3 changes: 2 additions & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ethereum-waffle": "^3.4.0",
"ethers": "^5.6.0",
"fast-csv": "^4.3.6",
"hardhat": "^2.9.2",
"hardhat": "^2.20.1",
"hardhat-deploy": "^0.11.4",
"hardhat-gas-reporter": "^1.0.8",
"mocha": "^9.2.1",
Expand All @@ -45,6 +45,7 @@
"lint": "solhint contracts/**/*.sol && prettier --check . contracts/**/*.sol"
},
"devDependencies": {
"@nomicfoundation/hardhat-foundry": "^1.1.1",
"@openzeppelin/test-helpers": "^0.5.15"
}
}
Loading

0 comments on commit 9393505

Please sign in to comment.