Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/testinparallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ jobs:
run: forge test --match-path src/test/${{ matrix.file }} --no-match-contract FFI
env:
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }}
CHAIN_ID: ${{ secrets.CHAIN_ID }}
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ solc_version = '0.8.12'

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

[fmt]
bracket_spacing = false
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": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a bit hard to maintain this if you don't know to add to allEigenPods

Just noting though, this should be okay for the time being.

"0x2641c2ded63a0c640629f5edf1189e0f53c06561",
"0xa345dcb63f984ed1c6d1a8901e0cdbd13b2b4d19",
"0x7fb3d3801883341a02ddd1beb2e624a278e87930",
"0x2f5cb052d397d0b628299a9d4cfc49a5019c4170",
"0xdb678e1056acd7db74507b921a6295c3d586ece9",
"0xc149531419db43b8cc0d4f2f2ce1700ae46f4c8a",
"0x61340dcc5aef625ded27f21e5068916ad334dad0",
"0x722e2350a55e6b617e66983b4b91d47fe9e9403e",
"0x49213606dc1953eae3b733187fed9e7307edd55b",
"0xa8fc63e72288b79009f7b5952760114513efc700",
"0xcbb42f0d320056453c497867119814c59615daeb",
"0xd6e50e7f6250ca26d5d5033138ad09cfe2aaeacb",
"0xe18c1447804563af9647cf8c879f35ced8172c1f",
"0x38de067514c77fed61630bb77ecc24f2adb73ff4",
"0xc3f9bbd74ded6b2bc2ff8b5c693fcbabf2e24efd"
]
}
}
71 changes: 48 additions & 23 deletions script/utils/ExistingDeploymentParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ struct StrategyUnderlyingTokenConfig {
string tokenSymbol;
}

struct DeployedEigenPods {
address[] multiValidatorPods;
address[] singleValidatorPods;
address[] inActivePods;
}

contract ExistingDeploymentParser is Script, Test {
// EigenLayer Contracts
ProxyAdmin public eigenLayerProxyAdmin;
Expand All @@ -51,6 +57,13 @@ contract ExistingDeploymentParser is Script, Test {
EigenPod public eigenPodImplementation;
StrategyBase public baseStrategyImplementation;

// EigenPods deployed
address[] public multiValidatorPods;
address[] public singleValidatorPods;
address[] public inActivePods;
// All eigenpods is just single array list of above eigenPods
address[] public allEigenPods;

EmptyContract public emptyContract;

address executorMultisig;
Expand All @@ -60,18 +73,12 @@ contract ExistingDeploymentParser is Script, Test {
address timelock;

// strategies deployed
uint256 numStrategiesDeployed;
StrategyBase[] public deployedStrategyArray;
// Strategies to Deploy
uint256 numStrategiesToDeploy;
StrategyUnderlyingTokenConfig[] public strategiesToDeploy;

// the ETH2 deposit contract -- if not on mainnet, we deploy a mock as stand-in
// IETHPOSDeposit public ethPOSDeposit;

// // IMMUTABLES TO SET
// uint64 MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR;
// uint64 GOERLI_GENESIS_TIME = 1616508000;

/// @notice Initialization Params for first initial deployment scripts
// StrategyManager
uint256 STRATEGY_MANAGER_INIT_PAUSED_STATUS;
Expand Down Expand Up @@ -129,9 +136,9 @@ contract ExistingDeploymentParser is Script, Test {
slasherImplementation = Slasher(
stdJson.readAddress(existingDeploymentData, ".addresses.slasherImplementation")
);
delegationManager = DelegationManager(stdJson.readAddress(existingDeploymentData, ".addresses.delegation"));
delegationManager = DelegationManager(stdJson.readAddress(existingDeploymentData, ".addresses.delegationManager"));
delegationManagerImplementation = DelegationManager(
stdJson.readAddress(existingDeploymentData, ".addresses.delegationImplementation")
stdJson.readAddress(existingDeploymentData, ".addresses.delegationManagerImplementation")
);
avsDirectory = AVSDirectory(stdJson.readAddress(existingDeploymentData, ".addresses.avsDirectory"));
avsDirectoryImplementation = AVSDirectory(
Expand All @@ -152,7 +159,7 @@ contract ExistingDeploymentParser is Script, Test {
stdJson.readAddress(existingDeploymentData, ".addresses.delayedWithdrawalRouterImplementation")
);
beaconOracle = IBeaconChainOracle(
stdJson.readAddress(existingDeploymentData, ".addresses.beaconOracleAddress")
stdJson.readAddress(existingDeploymentData, ".addresses.beaconOracle")
);
eigenPodBeacon = UpgradeableBeacon(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodBeacon"));
eigenPodImplementation = EigenPod(
Expand All @@ -163,20 +170,37 @@ contract ExistingDeploymentParser is Script, Test {
);
emptyContract = EmptyContract(stdJson.readAddress(existingDeploymentData, ".addresses.emptyContract"));

/*
commented out -- needs JSON formatting of the form:
strategies": [
{"WETH": "0x7CA911E83dabf90C90dD3De5411a10F1A6112184"},
{"rETH": "0x879944A8cB437a5f8061361f82A6d4EED59070b5"},
{"tsETH": "0xcFA9da720682bC4BCb55116675f16F503093ba13"},
{"wstETH": "0x13760F50a9d7377e4F20CB8CF9e4c26586c658ff"}]
// load strategy list
bytes memory strategyListRaw = stdJson.parseRaw(existingDeploymentData, ".addresses.strategies");
address[] memory strategyList = abi.decode(strategyListRaw, (address[]));
for (uint256 i = 0; i < strategyList.length; ++i) {
deployedStrategyArray.push(StrategyBase(strategyList[i]));
// Strategies Deployed, load strategy list
numStrategiesDeployed = stdJson.readUint(existingDeploymentData, ".numStrategies");
for (uint256 i = 0; i < numStrategiesDeployed; ++i) {
// Form the key for the current element
string memory key = string.concat(".addresses.strategyAddresses[", vm.toString(i), "]");

// Use the key and parse the strategy address
address strategyAddress = abi.decode(stdJson.parseRaw(existingDeploymentData, key), (address));
deployedStrategyArray.push(StrategyBase(strategyAddress));
}
*/
}

function _parseDeployedEigenPods(string memory existingDeploymentInfoPath) internal returns (DeployedEigenPods memory) {
uint256 currentChainId = block.chainid;

// READ JSON CONFIG DATA
string memory existingDeploymentData = vm.readFile(existingDeploymentInfoPath);

// check that the chainID matches the one in the config
uint256 configChainId = stdJson.readUint(existingDeploymentData, ".chainInfo.chainId");
require(configChainId == currentChainId, "You are on the wrong chain for this config");

multiValidatorPods = stdJson.readAddressArray(existingDeploymentData, ".eigenPods.multiValidatorPods");
singleValidatorPods = stdJson.readAddressArray(existingDeploymentData, ".eigenPods.singleValidatorPods");
inActivePods = stdJson.readAddressArray(existingDeploymentData, ".eigenPods.inActivePods");
allEigenPods = stdJson.readAddressArray(existingDeploymentData, ".eigenPods.allEigenPods");
return DeployedEigenPods({
multiValidatorPods: multiValidatorPods,
singleValidatorPods: singleValidatorPods,
inActivePods: inActivePods
});
}

/// @notice use for deploying a new set of EigenLayer contracts
Expand Down Expand Up @@ -650,6 +674,7 @@ contract ExistingDeploymentParser is Script, Test {
vm.serializeAddress(parameters, "operationsMultisig", operationsMultisig);
vm.serializeAddress(parameters, "communityMultisig", communityMultisig);
vm.serializeAddress(parameters, "pauserMultisig", pauserMultisig);
vm.serializeAddress(parameters, "timelock", timelock);
string memory parameters_output = vm.serializeAddress(parameters, "operationsMultisig", operationsMultisig);

string memory chain_info = "chainInfo";
Expand Down
Loading