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

merge dev into m2-mainnet branch #499

Merged
merged 8 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 38 additions & 0 deletions .github/workflows/run-deploy-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run Deploy Scripts
# We run the deploy scripts just to make sure they work

on:
push:
pull_request:
types: [opened, reopened]

jobs:
prepare:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true

# install foundry to run forge script. Should we run forge script in a container instead?
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Start Anvil chain
# need to start Anvil chain with -d to let the container run in the background
# if we start with 'anvil &' instead, the process stops when the step ends
run: docker run -d --rm -p 8545:8545 --entrypoint anvil ghcr.io/foundry-rs/foundry:nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a --host 0.0.0.0

- name: Wait for Anvil chain to start
run: sleep 3

# Run Forge script against the Anvil chain
- name: Run M2_Deploy_From_Scratch
run: |
forge script script/deploy/devnet/M2_Deploy_From_Scratch.s.sol --rpc-url http://localhost:8545 \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast \
--sig "run(string memory configFileName)" -- M2_deploy_from_scratch.anvil.config.json
23 changes: 19 additions & 4 deletions .github/workflows/testinparallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ jobs:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{fromJson(needs.prepare.outputs.matrix)}}
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -43,8 +42,24 @@ jobs:
forge build --sizes
id: build

- name: Run forge test for the file
run: forge test --match-path src/test/${{ matrix.file }} --no-match-contract FFI
- name: Run unit tests
run: forge test --no-match-contract Integration
env:
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }}
CHAIN_ID: ${{ secrets.CHAIN_ID }}

- name: Run integration tests
run: forge test --match-contract Integration
env:
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }}
CHAIN_ID: ${{ secrets.CHAIN_ID }}

- name: Run integration mainnet fork tests
run: forge test --match-contract Integration
env:
FOUNDRY_PROFILE: "forktest"
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }}
CHAIN_ID: ${{ secrets.CHAIN_ID }}
22 changes: 15 additions & 7 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions certora/harnesses/DelegationManagerHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "../../src/contracts/core/DelegationManager.sol";

Expand All @@ -25,4 +25,4 @@ contract DelegationManagerHarness is DelegationManager {
return strategyManager.stakerStrategyShares(staker, strategy);
}
}
}
}
4 changes: 2 additions & 2 deletions certora/harnesses/EigenPodHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "../../src/contracts/pods/EigenPod.sol";

Expand Down Expand Up @@ -37,4 +37,4 @@ contract EigenPodHarness is EigenPod {
function get_ETH_Balance() public view returns (uint256) {
return address(this).balance;
}
}
}
4 changes: 2 additions & 2 deletions certora/harnesses/EigenPodManagerHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "../../src/contracts/pods/EigenPodManager.sol";

Expand All @@ -21,4 +21,4 @@ contract EigenPodManagerHarness is EigenPodManager {
function get_podByOwner(address podOwner) public view returns (IEigenPod) {
return ownerToPod[podOwner];
}
}
}
4 changes: 2 additions & 2 deletions certora/harnesses/PausableHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "../../src/contracts/permissions/Pausable.sol";

Expand All @@ -21,4 +21,4 @@ contract PausableHarness is Pausable {
function bitwise_and(uint256 input_1, uint256 input_2) external pure returns (uint256) {
return (input_1 & input_2);
}
}
}
4 changes: 2 additions & 2 deletions certora/harnesses/SlasherHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "../../src/contracts/core/Slasher.sol";

Expand Down Expand Up @@ -82,4 +82,4 @@ contract SlasherHarness is Slasher {
// get_linked_list_entry(operator, get_previous_node(operator, node), true) == node && get_linked_list_entry(operator, get_next_node(operator, node), false) == node
// );
// }
}
}
4 changes: 2 additions & 2 deletions certora/harnesses/StrategyManagerHarness.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "../../src/contracts/core/StrategyManager.sol";

Expand Down Expand Up @@ -55,4 +55,4 @@ contract StrategyManagerHarness is StrategyManager {
function get_stakerStrategyShares(address staker, IStrategy strategy) public view returns (uint256) {
return stakerStrategyShares[staker][strategy];
}
}
}
2 changes: 1 addition & 1 deletion docs/core/AVSDirectory.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| File | Type | Proxy |
| -------- | -------- | -------- |
| [`AVSDirectory.sol`](../src/contracts/core/AVSDirectory.sol) | Singleton | Transparent proxy |
| [`AVSDirectory.sol`](../../src/contracts/core/AVSDirectory.sol) | Singleton | Transparent proxy |

The `AVSDirectory` handles interactions between AVSs and the EigenLayer core contracts. Once registered as an Operator in EigenLayer core (via the `DelegationManager`), Operators can register with one or more AVSs (via the AVS's contracts) to begin providing services to them offchain. As a part of registering with an AVS, the AVS will record this registration in the core contracts by calling into the `AVSDirectory`.

Expand Down
8 changes: 7 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ out = 'out'
libs = ['lib']
fs_permissions = [{ access = "read-write", path = "./"}]
gas_reports = ["*"]
# ignore upgrade testing in scripts by default
no_match_test = "queueUpgrade"

# A list of ignored solc error codes

Expand All @@ -18,6 +20,7 @@ solc_version = '0.8.12'

[rpc_endpoints]
mainnet = "${RPC_MAINNET}"
holesky = "${RPC_HOLESKY}"

[fmt]
bracket_spacing = false
Expand All @@ -28,4 +31,7 @@ number_underscore = "thousands"
quote_style = "double"
tab_width = 4

# See more config options https://github.com/gakonst/foundry/tree/master/config
# See more config options https://github.com/gakonst/foundry/tree/master/config

[profile.forktest.fuzz]
runs=20
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": "32000000000"
},
"eigenPodManager": {
"max_pods": 0,
"init_paused_status": 30
},
"delayedWithdrawalRouter": {
Expand Down
55 changes: 55 additions & 0 deletions script/configs/holesky/Holesky_current_deployment.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"addresses": {
"avsDirectory": "0x055733000064333CaDDbC92763c58BF0192fFeBf",
"avsDirectoryImplementation": "0xEF5BA995Bc7722fd1e163edF8Dc09375de3d3e3a",
"baseStrategyImplementation": "0xFb83e1D133D0157775eC4F19Ff81478Df1103305",
"beaconOracle": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25",
"delayedWithdrawalRouter": "0x642c646053eaf2254f088e9019ACD73d9AE0FA32",
"delayedWithdrawalRouterImplementation": "0xcE8b8D99773a718423F8040a6e52c06a4ce63407",
"delegationManager": "0xA44151489861Fe9e3055d95adC98FbD462B948e7",
"delegationManagerImplementation": "0x83f8F8f0BB125F7870F6bfCf76853f874C330D76",
"eigenLayerPauserReg": "0x85Ef7299F8311B25642679edBF02B62FA2212F06",
"eigenLayerProxyAdmin": "0xDB023566064246399b4AE851197a97729C93A6cf",
"eigenPodBeacon": "0x7261C2bd75a7ACE1762f6d7FAe8F63215581832D",
"eigenPodImplementation": "0xe98f9298344527608A1BCC23907B8145F9Cb641c",
"eigenPodManager": "0x30770d7E3e71112d7A6b7259542D1f680a70e315",
"eigenPodManagerImplementation": "0x5265C162f7d5F3fE3175a78828ab16bf5E324a7B",
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2",
"slasher": "0xcAe751b75833ef09627549868A04E32679386e7C",
"slasherImplementation": "0x99715D255E34a39bE9943b82F281CA734bcF345A",
"strategies": {
"WETH": "0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9",
"rETH": "0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"stETH": "0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"lsETH": "0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"frxETH": "0x15F70a41Afe34020B3B16079010D3e88c4A85daf",
"ETHx": "0x31B6F59e1627cEfC9fA174aD03859fC337666af7",
"osETH": "0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef",
"cbETH": "0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6"
},
"strategyAddresses": [
"0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9",
"0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"0x15F70a41Afe34020B3B16079010D3e88c4A85daf",
"0x31B6F59e1627cEfC9fA174aD03859fC337666af7",
"0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef",
"0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6"
],
"strategyManager": "0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6",
"strategyManagerImplementation": "0x59f766A603C53f3AC8Be43bBe158c1519b193a18"
},
"numStrategies": 8,
"chainInfo": {
"chainId": 17000,
"deploymentBlock": 1167041
},
"parameters": {
"communityMultisig": "0xCb8d2f9e55Bc7B1FA9d089f9aC80C583D2BDD5F7",
"executorMultisig": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"operationsMultisig": "0xfaEF7338b7490b9E272d80A1a39f4657cAf2b97d",
"pauserMultisig": "0x53410249ec7d3a3F9F1ba3912D50D6A3Df6d10A7",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
}
}
16 changes: 2 additions & 14 deletions script/configs/holesky/M2_deploy_from_scratch.holesky.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,11 @@
"executorMultisig": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
},
"numStrategies": 2,
"strategies": {
"numStrategies": 2,
"numStrategies": 0,
"MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"strategiesToDeploy": [
{
"token_address": "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034",
"token_name": "Liquid staked Ether 2.0",
"token_symbol": "stETH"
},
{
"token_address": "0x7322c24752f79c05FFD1E2a6FCB97020C1C264F1",
"token_name": "Rocket Pool ETH",
"token_symbol": "rETH"
}
]
"strategiesToDeploy": []
},
"strategyManager": {
"init_strategy_whitelister": "0xfaEF7338b7490b9E272d80A1a39f4657cAf2b97d",
Expand Down
63 changes: 63 additions & 0 deletions script/configs/mainnet/Mainnet_current_deployment.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"addresses": {
"avsDirectory": "0x0000000000000000000000000000000000000000",
"avsDirectoryImplementation": "0x0000000000000000000000000000000000000000",
"beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442",
"baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3",
"delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8",
"delayedWithdrawalRouterImplementation": "0x44Bcb0E01CD0C5060D4Bb1A07b42580EF983E2AF",
"delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
"delegationManagerImplementation": "0xf97E97649Da958d290e84E6D571c32F4b7F475e4",
"eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060",
"eigenLayerProxyAdmin": "0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444",
"eigenPodBeacon": "0x5a2a4F2F3C18f09179B6703e63D9eDD165909073",
"eigenPodImplementation": "0x5c86e9609fbBc1B754D0FD5a4963Fdf0F5b99dA7",
"eigenPodManager": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338",
"eigenPodManagerImplementation": "0xEB86a5c40FdE917E6feC440aBbCDc80E3862e111",
"emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9",
"slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd",
"slasherImplementation": "0xef31c292801f24f16479DD83197F1E6AeBb8d6d8",
"strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A",
"strategyManagerImplementation": "0x5d25EEf8CfEdaA47d31fE2346726dE1c21e342Fb",
"strategies": {
"stETH": "0x93c4b944D05dfe6df7645A86cd2206016c51564D",
"rETH": "0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2",
"cbETH": "0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc",
"ETHx": "0x9d7eD45EE2E8FC5482fa2428f15C971e6369011d",
"ankrETH": "0x13760F50a9d7377e4F20CB8CF9e4c26586c658ff",
"oETH": "0xa4C637e0F704745D182e4D38cAb7E7485321d059",
"osETH": "0x57ba429517c3473B6d34CA9aCd56c0e735b94c02",
"swETH": "0x0Fe4F44beE93503346A3Ac9EE5A26b130a5796d6",
"wBETH": "0x7CA911E83dabf90C90dD3De5411a10F1A6112184",
"sfrxETH": "0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6",
"lsETH": "0xAe60d8180437b5C34bB956822ac2710972584473",
"mETH": "0x298aFB19A105D59E74658C4C334Ff360BadE6dd2"
},
"strategyAddresses": [
"0x93c4b944D05dfe6df7645A86cd2206016c51564D",
"0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2",
"0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc",
"0x9d7eD45EE2E8FC5482fa2428f15C971e6369011d",
"0x13760F50a9d7377e4F20CB8CF9e4c26586c658ff",
"0xa4C637e0F704745D182e4D38cAb7E7485321d059",
"0x57ba429517c3473B6d34CA9aCd56c0e735b94c02",
"0x0Fe4F44beE93503346A3Ac9EE5A26b130a5796d6",
"0x7CA911E83dabf90C90dD3De5411a10F1A6112184",
"0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6",
"0xAe60d8180437b5C34bB956822ac2710972584473",
"0x298aFB19A105D59E74658C4C334Ff360BadE6dd2"
]
},
"numStrategies": 12,
"chainInfo": {
"chainId": 1,
"deploymentBlock": 17445559
},
"parameters": {
"communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598",
"executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111",
"operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90",
"pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390",
"timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF"
}
}
46 changes: 46 additions & 0 deletions script/configs/mainnet/Mainnet_current_eigenPods.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"chainInfo": {
"chainId": 1,
"deploymentBlock": 19285000
},
"eigenPods": {
"multiValidators": [
"0x2641c2ded63a0c640629f5edf1189e0f53c06561",
"0xa345dcb63f984ed1c6d1a8901e0cdbd13b2b4d19",
"0x7fb3d3801883341a02ddd1beb2e624a278e87930",
"0x2f5cb052d397d0b628299a9d4cfc49a5019c4170",
"0xdb678e1056acd7db74507b921a6295c3d586ece9"
],
"singleValidators": [
"0xc149531419db43b8cc0d4f2f2ce1700ae46f4c8a",
"0x61340dcc5aef625ded27f21e5068916ad334dad0",
"0x722e2350a55e6b617e66983b4b91d47fe9e9403e",
"0x49213606dc1953eae3b733187fed9e7307edd55b",
"0xa8fc63e72288b79009f7b5952760114513efc700"
],
"inActive": [
"0xcbb42f0d320056453c497867119814c59615daeb",
"0xd6e50e7f6250ca26d5d5033138ad09cfe2aaeacb",
"0xe18c1447804563af9647cf8c879f35ced8172c1f",
"0x38de067514c77fed61630bb77ecc24f2adb73ff4",
"0xc3f9bbd74ded6b2bc2ff8b5c693fcbabf2e24efd"
],
"allEigenPods": [
"0x2641c2ded63a0c640629f5edf1189e0f53c06561",
"0xa345dcb63f984ed1c6d1a8901e0cdbd13b2b4d19",
"0x7fb3d3801883341a02ddd1beb2e624a278e87930",
"0x2f5cb052d397d0b628299a9d4cfc49a5019c4170",
"0xdb678e1056acd7db74507b921a6295c3d586ece9",
"0xc149531419db43b8cc0d4f2f2ce1700ae46f4c8a",
"0x61340dcc5aef625ded27f21e5068916ad334dad0",
"0x722e2350a55e6b617e66983b4b91d47fe9e9403e",
"0x49213606dc1953eae3b733187fed9e7307edd55b",
"0xa8fc63e72288b79009f7b5952760114513efc700",
"0xcbb42f0d320056453c497867119814c59615daeb",
"0xd6e50e7f6250ca26d5d5033138ad09cfe2aaeacb",
"0xe18c1447804563af9647cf8c879f35ced8172c1f",
"0x38de067514c77fed61630bb77ecc24f2adb73ff4",
"0xc3f9bbd74ded6b2bc2ff8b5c693fcbabf2e24efd"
]
}
}
Loading
Loading