Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/migration npm deps to forge #382

Merged
merged 27 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4be5008
forge install: aave-v3-core
parth-15 Jan 22, 2024
07127cd
add foundry dependency
parth-15 Jan 23, 2024
9923a86
update config files
parth-15 Jan 24, 2024
497fd14
update deps from npm to forge - deployment working
parth-15 Jan 24, 2024
af5db83
update package.json
parth-15 Jan 26, 2024
90658c2
add openzeppelin deps
parth-15 Jan 26, 2024
3f0c5d9
add aave-v3-core deps
parth-15 Jan 26, 2024
58cc954
update deps
parth-15 Jan 29, 2024
c3114ca
fix: Remove unnecesary npm dependencies
miguelmtzinf Feb 15, 2024
55d6856
fix: Remove duplicated founry remappings
miguelmtzinf Feb 15, 2024
5fae4cb
fix: Fix imports for gho_gsm_inverse certora rule
miguelmtzinf Feb 16, 2024
550fc5b
fix: Fix certora config
miguelmtzinf Feb 16, 2024
f5a1bc4
fix: Fix certora config
miguelmtzinf Feb 16, 2024
248ca80
fix: Fix certora config
miguelmtzinf Feb 16, 2024
d0792ff
fix: Fix certora conifig
miguelmtzinf Feb 16, 2024
ec5bd09
fix: Fix test and config files
miguelmtzinf Feb 19, 2024
5e3e080
ci: Fix certora ci config files
miguelmtzinf Feb 19, 2024
d18114e
ci: Fix certora ci config files
miguelmtzinf Feb 19, 2024
3d432d1
fix: Use hardhat-founry instead of preprocessor
miguelmtzinf Feb 19, 2024
effd361
fix: Add combined coverage script
miguelmtzinf Feb 20, 2024
85877bf
fix: Fix package scripts and remove combined-coverage
miguelmtzinf Feb 20, 2024
be87176
fix: Fix node CI build
miguelmtzinf Feb 20, 2024
192cab1
fix: Fix build ci
miguelmtzinf Feb 20, 2024
1c53afc
fix: Fix prettierignore
miguelmtzinf Feb 20, 2024
448d53f
fix: Add env for fork tests
miguelmtzinf Feb 20, 2024
00a6cb7
Merge branch 'main' into chore/migration-npm-deps-to-forge
miguelmtzinf Feb 20, 2024
fbcee68
fix: Fix ci:clean script
miguelmtzinf Feb 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/certora-gho-505.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ jobs:
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc8.10

- name: Install node dependencies
run: |
npm i

- name: Verify rule ${{ matrix.rule }}
run: |
cd certora/gho
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/certora-gho.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
jobs:
verify:
runs-on: ubuntu-latest
# group: larger

steps:
- uses: actions/checkout@v2
Expand All @@ -37,10 +36,6 @@ jobs:
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc8.10

- name: Install node dependencies
run: |
npm i

- name: Verify rule ${{ matrix.rule }}
run: |
cd certora/gho
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/certora-gsm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Check key
env:
Expand All @@ -39,10 +42,6 @@ jobs:
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc8.10

- name: Install node dependencies
run: |
npm i

- name: Verify rule ${{ matrix.rule }}
run: |
echo "key length" ${#CERTORAKEY}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
group: larger
env:
ALCHEMY_KEY: '${{secrets.ALCHEMY_KEY}}'
ETH_RPC_URL: 'https://eth-mainnet.g.alchemy.com/v2/${{secrets.ALCHEMY_KEY}}'
strategy:
matrix:
node-version:
Expand All @@ -18,7 +19,11 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x.x
node-version: 18.x.x
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: npm ci
- name: Compilation
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/cache
/cache_forge
/out
/artifacts
/.env
Expand All @@ -14,9 +15,9 @@
/src/contracts/hardhat-dependency-compiler

.DS_Store
forge-cache

/report
lcov.info
combined-lcov.info

broadcast/
/broadcast
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,18 @@
[submodule "lib/solidity-utils"]
path = lib/solidity-utils
url = https://github.com/bgd-labs/solidity-utils
[submodule "lib/aave-v3-core"]
path = lib/aave-v3-core
url = https://github.com/aave/aave-v3-core
[submodule "lib/aave-token"]
path = lib/aave-token
url = https://github.com/aave/aave-token
[submodule "lib/aave-v3-periphery"]
path = lib/aave-v3-periphery
url = https://github.com/aave/aave-v3-periphery
[submodule "lib/safety-module"]
path = lib/safety-module
url = https://github.com/aave/safety-module
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ node_modules
types
out
deployments
temp-artifacts
lib
coverage
forge-cache
cache_forge
2 changes: 1 addition & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
skipFiles: [],
skipFiles: ['./script', './test'],
mocha: {
enableTimeouts: false,
},
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Clone the repository and run the following command to install dependencies:

```sh
npm i
forge i
```

If you need to interact with GHO in the Goerli testnet, provide your Alchemy API key and mnemonic in the `.env` file:
Expand Down
13 changes: 9 additions & 4 deletions certora/GSM/conf/non-4626/Alex-gho-gsm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"parametric_contracts": [ "GsmHarness"],
"assert_autofinder_success": true,
Expand Down
13 changes: 9 additions & 4 deletions certora/GSM/conf/non-4626/Alex-gho-gsm_inverse.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"certora/GSM/harness/ERC20Helper.sol",
"src/contracts/gho/GhoToken.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol"
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness"
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness"
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"files": [
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol"
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
14 changes: 10 additions & 4 deletions certora/GSM/conf/non-4626/Martin-gho-gsm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
"src/contracts/gho/GhoToken.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:UNDERLYING_ASSET=DummyERC20B"
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:UNDERLYING_ASSET=DummyERC20B"
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"parametric_contracts": [ "GsmHarness"],
"assert_autofinder_success": true,
Expand Down
7 changes: 6 additions & 1 deletion certora/GSM/conf/non-4626/antti-optimality.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
"rule_sanity" : "basic",
Expand Down
15 changes: 10 additions & 5 deletions certora/GSM/conf/non-4626/balances-buy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
"certora/GSM/harness/DummyERC20B.sol",
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"certora/GSM/harness/DiffHelper.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
"src/contracts/gho/GhoToken.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
15 changes: 10 additions & 5 deletions certora/GSM/conf/non-4626/balances-sell.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
"certora/GSM/harness/DummyERC20B.sol",
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"certora/GSM/harness/DiffHelper.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
"src/contracts/gho/GhoToken.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
15 changes: 10 additions & 5 deletions certora/GSM/conf/non-4626/fees-buy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
"certora/GSM/harness/DummyERC20B.sol",
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"certora/GSM/harness/DiffHelper.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
"src/contracts/gho/GhoToken.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
15 changes: 10 additions & 5 deletions certora/GSM/conf/non-4626/fees-sell.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
"certora/GSM/harness/DummyERC20B.sol",
"certora/GSM/harness/FixedPriceStrategyHarness.sol",
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"src/contracts/gho/GhoToken.sol",
"certora/GSM/harness/DiffHelper.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
"src/contracts/gho/GhoToken.sol",
],
"link": [
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
"GsmHarness:GHO_TOKEN=GhoToken",
"GsmHarness:PRICE_STRATEGY=FixedPriceStrategyHarness",
"GsmHarness:_feeStrategy=FixedFeeStrategyHarness",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
7 changes: 6 additions & 1 deletion certora/GSM/conf/non-4626/otakar-FixedFeeStrategy.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"files": [
"certora/GSM/harness/FixedFeeStrategyHarness.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
7 changes: 6 additions & 1 deletion certora/GSM/conf/non-4626/otakar-OracleSwapFreezer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"files": [
"certora/GSM/harness/OracleSwapFreezerHarness.sol",
"src/contracts/facilitators/gsm/swapFreezer/OracleSwapFreezer.sol",
"node_modules/@openzeppelin/contracts/utils/math/Math.sol",
],
"packages": [
"@aave/core-v3/=lib/aave-v3-core",
"@aave/periphery-v3/=lib/aave-v3-periphery",
"@aave/=lib/aave-token",
"@openzeppelin/=lib/openzeppelin-contracts",
],
"assert_autofinder_success": true,
"optimistic_loop":true,
Expand Down
Loading
Loading