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

build: partial withdrawal batching upgrade scripts #598

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,37 @@
"eigenPodManager": "0x30770d7E3e71112d7A6b7259542D1f680a70e315",
"eigenPodManagerImplementation": "0x5265C162f7d5F3fE3175a78828ab16bf5E324a7B",
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2",
"rewardsCoordinator": "0x0000000000000000000000000000000000000000",
"rewardsCoordinatorImplementation": "0x0000000000000000000000000000000000000000",
wadealexc marked this conversation as resolved.
Show resolved Hide resolved
"slasher": "0xcAe751b75833ef09627549868A04E32679386e7C",
"slasherImplementation": "0x99715D255E34a39bE9943b82F281CA734bcF345A",
"numStrategiesDeployed": 8,
"numStrategiesDeployed": 10,
"strategies": {
"WETH": "0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9",
"rETH": "0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"stETH": "0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"lsETH": "0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"frxETH": "0x15F70a41Afe34020B3B16079010D3e88c4A85daf",
"ETHx": "0x31B6F59e1627cEfC9fA174aD03859fC337666af7",
"cbETH": "0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6",
"sfrxETH": "0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c",
"lsETH": "0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"osETH": "0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef",
"cbETH": "0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6"
"mETH": "0xaccc5A86732BE85b5012e8614AF237801636F8e5",
"ankrETH" :"0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac"
},
"strategyAddresses": [
"0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9",
"0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"0x15F70a41Afe34020B3B16079010D3e88c4A85daf",
"0x31B6F59e1627cEfC9fA174aD03859fC337666af7",
"0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6",
"0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c",
"0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef",
"0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6"
"0xaccc5A86732BE85b5012e8614AF237801636F8e5",
"0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac"
],
"strategyManager": "0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6",
"strategyManagerImplementation": "0x59f766A603C53f3AC8Be43bBe158c1519b193a18",
"rewardsCoordinator": "0xAcc1fb458a1317E886dB376Fc8141540537E68fE",
"rewardsCoordinatorImplementation": "0x123C1A3543DBCA3f704E703dDda7FAAaA8e43D02",
"token": {
"tokenProxyAdmin": "0x67482666771e82C9a73BB9e9A22B2B597f448BBf",
"EIGEN": "0x3B78576F7D6837500bA3De27A60c7f594934027E",
Expand All @@ -52,10 +56,9 @@
"eigenStrategyImpl": "0x94650e09a471CEF96e7966cabf26718FBf352697"
}
},
"numStrategies": 8,
"chainInfo": {
"chainId": 17000,
"deploymentBlock": 1167041
"deploymentBlock": 1195642
},
"parameters": {
"communityMultisig": "0xCb8d2f9e55Bc7B1FA9d089f9aC80C583D2BDD5F7",
Expand All @@ -64,5 +67,5 @@
"pauserMultisig": "0x53410249ec7d3a3F9F1ba3912D50D6A3Df6d10A7",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
}

}

48 changes: 48 additions & 0 deletions script/configs/holesky/eigenlayer_addresses_preprod.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"addresses": {
"avsDirectory": "0x141d6995556135D4997b2ff72EB443Be300353bC",
"avsDirectoryImplementation": "0x357978adC03375BD6a3605DE055fABb84695d79A",
"baseStrategyImplementation": "0x62450517EfA1CE60d79801daf8f95973865e8D40",
"beaconOracle": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25",
"delayedWithdrawalRouter": "0xC4BC46a87A67a531eCF7f74338E1FA79533334Fa",
"delayedWithdrawalRouterImplementation": "0x0011FA2c512063C495f77296Af8d195F33A8Dd38",
"delegationManager": "0x75dfE5B44C2E530568001400D3f704bC8AE350CC",
"delegationManagerImplementation": "0x56E88cb4f0136fC27D95499dE4BE2acf47946Fa1",
"eigenLayerPauserReg": "0x9Ab2FEAf0465f0eD51Fc2b663eF228B418c9Dad1",
"eigenLayerProxyAdmin": "0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B",
"eigenPodBeacon": "0x92Cc4a800A1513E85C481dDDf3A06C6921211eaC",
"eigenPodImplementation": "0x2D6c7f9862BD80Cf0d9d93FC6b513D69E7Db7869",
"eigenPodManager": "0xB8d8952f572e67B11e43bC21250967772fa883Ff",
"eigenPodManagerImplementation": "0xc5B857A92245f64e9D90cCc5b096Db82eB77eB5c",
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2",
"rewardsCoordinator": "0xb22Ef643e1E067c994019A4C19e403253C05c2B0",
"rewardsCoordinatorImplementation": "0x7C80B0d3aFBeF9Bbd03Aab72cD2d90a12c11D394",
"slasher": "0x12699471dF8dca329C76D72823B1b79d55709384",
"slasherImplementation": "0x9460fCe11E1e0365419fa860599903B4E5097cf0",
"numStrategiesDeployed": 0,
"strategies": {},
"strategyAddresses": [],
"strategyManager": "0xF9fbF2e35D8803273E214c99BF15174139f4E67a",
"strategyManagerImplementation": "0x1a26B23a004C512350d7Dd89056655A80b850199",
"token": {
"EIGEN": "0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926",
"EIGENImpl": "0x95a7431400F362F3647a69535C5666cA0133CAA0",
"bEIGEN": "0xA72942289a043874249E60469F68f08B8c6ECCe8",
"bEIGENImpl": "0xd5FdabDac3d8ACeAB7BFfDDFA18877A4c5D5Aa82",
"eigenStrategy": "0xdcCF401fD121d8C542E96BC1d0078884422aFAD2",
"eigenStrategyImpl": "0x59D13E7Fb0bC0e57c1fc6594ff701592A6e4dD2B",
"tokenProxyAdmin": "0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B"
}
},
"chainInfo": {
"chainId": 17000,
"deploymentBlock": 1477016
},
"parameters": {
"communityMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"executorMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"operationsMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"pauserMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
}
}
56 changes: 56 additions & 0 deletions script/configs/holesky/eigenlayer_preprod.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"chainInfo": {
"chainId": 17000
},
"multisig_addresses": {
"pauserMultisig": "0x53410249ec7d3a3F9F1ba3912D50D6A3Df6d10A7",
"communityMultisig": "0xCb8d2f9e55Bc7B1FA9d089f9aC80C583D2BDD5F7",
"operationsMultisig": "0xfaEF7338b7490b9E272d80A1a39f4657cAf2b97d",
"executorMultisig": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
},
"strategies": {
"numStrategies": 0,
"MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"strategiesToDeploy": []
},
"strategyManager": {
"init_strategy_whitelister": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"init_paused_status": 0
},
"delegationManager": {
"init_paused_status": 0,
"init_minWithdrawalDelayBlocks": 10
},
"rewardsCoordinator": {
"init_paused_status": 0,
"CALCULATION_INTERVAL_SECONDS": 604800,
"MAX_REWARDS_DURATION": 6048000,
"MAX_RETROACTIVE_LENGTH": 7776000,
"MAX_FUTURE_LENGTH": 2592000,
"GENESIS_REWARDS_TIMESTAMP": 1710979200,
"rewards_updater_address": "0x18a0f92Ad9645385E8A8f3db7d0f6CF7aBBb0aD4",
"activation_delay": 120,
"calculation_interval_seconds": 604800,
"global_operator_commission_bips": 1000
},
"avsDirectory": {
"init_paused_status": 0
},
"slasher": {
"init_paused_status": 0
},
"eigenPod": {
"MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": 32000000000,
"GENESIS_TIME": 1695902400
},
"eigenPodManager": {
"init_paused_status": 0
},
"delayedWithdrawalRouter": {
"init_paused_status": 0,
"init_withdrawalDelayBlocks": 10
},
"ethPOSDepositAddress": "0x4242424242424242424242424242424242424242"
}
69 changes: 69 additions & 0 deletions script/deploy/holesky/EigenPod_Checkpoint_Deploy_Preprod.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.12;

import "../../utils/ExistingDeploymentParser.sol";

/**
* @notice Script used for upgrading EigenPod and EPM Implementation for Holesky preprod
* anvil --fork-url $RPC_HOLESKY
* forge script script/deploy/holesky/EigenPod_Checkpoint_Deploy_Preprod.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv
* forge script script/deploy/holesky/EigenPod_Checkpoint_Deploy_Preprod.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --verify --broadcast -vvvv
*/
contract EigenPod_Checkpoint_Deploy_Preprod is ExistingDeploymentParser {

address testAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479;
address initOwner = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479;

function run() external virtual {
_parseInitialDeploymentParams(
"script/configs/holesky/eigenlayer_preprod.config.json"
);
_parseDeployedContracts(
"script/configs/holesky/eigenlayer_addresses_preprod.config.json"
);

// START RECORDING TRANSACTIONS FOR DEPLOYMENT
vm.startBroadcast();

emit log_named_address("Deployer Address", msg.sender);

_upgradeEigenPodAndEPM();

// STOP RECORDING TRANSACTIONS FOR DEPLOYMENT
vm.stopBroadcast();

// Sanity Checks
_verifyContractPointers();
_verifyImplementations();
_verifyContractsInitialized({isInitialDeployment: true});
_verifyInitializationParams();

logAndOutputContractAddresses("script/output/holesky/EigenPod_Checkpoint_Deploy_Preprod.output.json");
}

/**
* @notice Deploy EigenPod and EPM Implementation for Holesky preprod and upgrade the beacon/proxy
*/
function _upgradeEigenPodAndEPM() internal {
// Deploy implementations
eigenPodManagerImplementation = new EigenPodManager(
IETHPOSDeposit(ETHPOSDepositAddress),
eigenPodBeacon,
strategyManager,
slasher,
delegationManager
);
eigenPodImplementation = new EigenPod(
IETHPOSDeposit(ETHPOSDepositAddress),
eigenPodManager,
EIGENPOD_GENESIS_TIME
);

// upgrade TUPS and UpgradeableBeacon
eigenLayerProxyAdmin.upgrade(
TransparentUpgradeableProxy(payable(address(eigenPodManager))),
address(eigenPodManagerImplementation)
);
eigenPodBeacon.upgradeTo(address(eigenPodImplementation));
}
}
6 changes: 0 additions & 6 deletions script/utils/ExistingDeploymentParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ contract ExistingDeploymentParser is Script, Test {
uint32 REWARDS_COORDINATOR_GLOBAL_OPERATOR_COMMISSION_BIPS;
// EigenPodManager
uint256 EIGENPOD_MANAGER_INIT_PAUSED_STATUS;
uint64 EIGENPOD_MANAGER_DENEB_FORK_TIMESTAMP;
// EigenPod
uint64 EIGENPOD_GENESIS_TIME;
uint64 EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR;
Expand Down Expand Up @@ -316,10 +315,6 @@ contract ExistingDeploymentParser is Script, Test {
initialDeploymentData,
".eigenPodManager.init_paused_status"
);
EIGENPOD_MANAGER_DENEB_FORK_TIMESTAMP = uint64(
stdJson.readUint(initialDeploymentData, ".eigenPodManager.deneb_fork_timestamp")
);

// EigenPod
EIGENPOD_GENESIS_TIME = uint64(stdJson.readUint(initialDeploymentData, ".eigenPod.GENESIS_TIME"));
EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR = uint64(
Expand Down Expand Up @@ -652,7 +647,6 @@ contract ExistingDeploymentParser is Script, Test {
emit log_named_uint("REWARDS_COORDINATOR_INIT_PAUSED_STATUS", REWARDS_COORDINATOR_INIT_PAUSED_STATUS);
// todo log all rewards coordinator params
emit log_named_uint("EIGENPOD_MANAGER_INIT_PAUSED_STATUS", EIGENPOD_MANAGER_INIT_PAUSED_STATUS);
emit log_named_uint("EIGENPOD_MANAGER_DENEB_FORK_TIMESTAMP", EIGENPOD_MANAGER_DENEB_FORK_TIMESTAMP);
emit log_named_uint("EIGENPOD_GENESIS_TIME", EIGENPOD_GENESIS_TIME);
emit log_named_uint(
"EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR",
Expand Down
Loading