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

Invariant Monitor contract #1017

Merged
merged 43 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fba0c91
refactor broker tests to reuse functions
julianmrodri Nov 29, 2023
f4517dc
add invariant monitor contract
julianmrodri Nov 29, 2023
7de5436
add facade invariant local tests
julianmrodri Nov 29, 2023
f60cfe6
fix lint
julianmrodri Nov 30, 2023
b8d1666
integration tests initial draft
julianmrodri Nov 30, 2023
cbfec26
add aave v3 logic and immutables
julianmrodri Dec 8, 2023
1f208c0
make contract upgradeable and simplify Aavev3 logic
julianmrodri Dec 11, 2023
76cd987
improve compoundv2 interfaces for testing
julianmrodri Dec 11, 2023
55d1e2f
adapt tests for upgradeability and complete integration tests
julianmrodri Dec 11, 2023
d931ba7
change fork block number
julianmrodri Dec 11, 2023
51b6153
Merge branch '3.1.0' into feat-invariantmonitor
julianmrodri Dec 11, 2023
14295b2
fix lint
julianmrodri Dec 11, 2023
e609c62
Merge branch 'feat-invariantmonitor' of github.com:reserve-protocol/p…
julianmrodri Dec 11, 2023
46225dc
try older block
julianmrodri Dec 11, 2023
76be066
fix block
julianmrodri Dec 11, 2023
734ac93
add aave v2 address
julianmrodri Dec 12, 2023
05d36fd
add compound v3
julianmrodri Dec 12, 2023
1f3ab22
rename to facadeMonitor
julianmrodri Dec 12, 2023
c6b5363
fix lint
julianmrodri Dec 12, 2023
a93e38d
deployment script
julianmrodri Dec 12, 2023
84bbbb7
improve deployment task
julianmrodri Dec 12, 2023
b14e666
fix issue in ci
julianmrodri Dec 12, 2023
1f8c3e9
try sample test in ci
julianmrodri Dec 12, 2023
c65dd4b
remove test
julianmrodri Dec 12, 2023
e1d2164
move tests to own ci tasks
julianmrodri Dec 13, 2023
1a8a9b3
fix ci
julianmrodri Dec 13, 2023
beedc5c
fix ci
julianmrodri Dec 13, 2023
1a671ac
try with hh reset
julianmrodri Dec 13, 2023
99c85a5
add stargate check
julianmrodri Dec 18, 2023
fcbacfd
transfer ownership test
julianmrodri Dec 19, 2023
3341113
add deployed address
julianmrodri Dec 20, 2023
b3335e6
fix compound v2 logic
julianmrodri Dec 20, 2023
c43ca16
add flux logic
julianmrodri Dec 21, 2023
fc538f7
add flux basic check
julianmrodri Dec 21, 2023
1ea2089
update implementation in oz file
julianmrodri Dec 21, 2023
2182f18
try with infura
julianmrodri Dec 21, 2023
742f238
avoid conflict in proxy deployment
julianmrodri Dec 21, 2023
aac6ffb
add base deployment
julianmrodri Dec 21, 2023
65ce483
add FacadeMonitor address
julianmrodri Dec 21, 2023
f0cc100
initial monitoring doc
julianmrodri Dec 22, 2023
a72e618
fix lint
julianmrodri Dec 22, 2023
7f8f3a6
add morpho checks
julianmrodri Jan 15, 2024
f66b2ac
register new implementations
julianmrodri Jan 15, 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
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,30 @@ jobs:
TS_NODE_SKIP_IGNORE: true
MAINNET_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/${{ secrets.ALCHEMY_MAINNET_KEY }}
FORK_NETWORK: mainnet

monitor-tests:
name: 'Monitor Tests (Mainnet)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --immutable
- name: 'Cache hardhat network fork'
uses: actions/cache@v3
with:
path: cache/hardhat-network-fork
key: hardhat-network-fork-${{ runner.os }}-${{ hashFiles('test/integration/fork-block-numbers.ts') }}
restore-keys: |
hardhat-network-fork-${{ runner.os }}-
hardhat-network-fork-
- run: npx hardhat test ./test/monitor/*.test.ts
env:
NODE_OPTIONS: '--max-old-space-size=8192'
TS_NODE_SKIP_IGNORE: true
MAINNET_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/${{ secrets.ALCHEMY_MAINNET_KEY }}
FORK_NETWORK: mainnet
FORK: 1
PROTO_IMPL: 1
184 changes: 184 additions & 0 deletions .openzeppelin/base_8453.json
Original file line number Diff line number Diff line change
Expand Up @@ -3144,6 +3144,190 @@
}
}
}
},
"83264eb95f2f9ab0055f3cdf3d195b52003b35099a624ee29920f6a83be6b884": {
"address": "0xD45a441F334f6f27CDDA3728414FD26Cc5798E66",
"txHash": "0xcce3cfb75dad5e947efeab8a30cd981ca578d96f7a8bee1512a86b2849a0fa24",
"layout": {
"solcVersion": "0.8.19",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "51",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211"
},
{
"label": "__gap",
"offset": 0,
"slot": "151",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
},
"07b40b651527d3b3c3f0d1fb77a991853411f5b7fd564a45478bb03e177adcae": {
"address": "0x69c20aD99eb1054cd7Da2809572205186975dA17",
"txHash": "0x05c19fbc6774d5e85aadba888cc56e0764a104c1da7e3fa9f0774dfba8a46215",
"layout": {
"solcVersion": "0.8.19",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "51",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211"
},
{
"label": "__gap",
"offset": 0,
"slot": "151",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
Loading