-
Notifications
You must be signed in to change notification settings - Fork 451
feat: holesky deploy scripts #473
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
Changes from 2 commits
0fd79d6
3b0fb49
4f53c1c
0175844
9ac0ef8
3ba2b34
20acb92
2a91496
b8d0881
13706a0
30cc00e
5a02456
af35427
fa80340
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| RPC_MAINNET="https://eth.llamarpc.com" | ||
| # RPC_MAINNET="https://mainnet.infura.io/v3/API-KEY" | ||
| RPC_GOERLI="https://ethereum-goerli.publicnode.com" | ||
| RPC_HOLESKY="" | ||
| ETHERSCAN_API_KEY="API-KEY" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| "chainInfo": { | ||
| "chainId": 17000 | ||
| }, | ||
| "multisig_addresses": { | ||
| "pauserMultisig": "0x53410249ec7d3a3F9F1ba3912D50D6A3Df6d10A7", | ||
| "communityMultisig": "0xCb8d2f9e55Bc7B1FA9d089f9aC80C583D2BDD5F7", | ||
| "operationsMultisig": "0xfaEF7338b7490b9E272d80A1a39f4657cAf2b97d", | ||
| "executorMultisig": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348", | ||
| "timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D" | ||
| }, | ||
| "numStrategies": 2, | ||
| "strategies": { | ||
| "numStrategies": 2, | ||
| "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" | ||
| } | ||
| ] | ||
|
Comment on lines
+17
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Gajesh2007 any chance you could help source LST addresses on Holesky? (at least for the LSTs we support on mainnet) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least for our current mainnet strategies, these were the only ones I could find on Holesky |
||
| }, | ||
| "strategyManager": { | ||
| "init_strategy_whitelister": "", | ||
ChaoticWalrus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "init_paused_status": 0 | ||
| }, | ||
| "delegationManager": { | ||
| "init_paused_status": 0, | ||
| "init_minWithdrawalDelayBlocks": 50400 | ||
| }, | ||
| "avsDirectory": { | ||
| "init_paused_status": 0 | ||
| }, | ||
| "slasher": { | ||
| "init_paused_status": 0 | ||
| }, | ||
| "eigenPod": { | ||
| "MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": 32000000000000000000, | ||
| "GENESIS_TIME": 1695902400 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. confirmed this is the correct time 👍 |
||
| }, | ||
| "eigenPodManager": { | ||
| "init_paused_status": 0, | ||
| "deneb_fork_timestamp": "1707323664" | ||
ChaoticWalrus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "delayedWithdrawalRouter": { | ||
| "init_paused_status": 0, | ||
| "init_withdrawalDelayBlocks": 50400 | ||
| }, | ||
| "ethPOSDepositAddress": "0x4242424242424242424242424242424242424242", | ||
| "beaconOracleAddress": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,207 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity =0.8.12; | ||
|
|
||
| import "../../utils/ExistingDeploymentParser.sol"; | ||
|
|
||
| /** | ||
| * @notice Script used for the first deployment of EigenLayer core contracts to Holesky | ||
| * forge script script/deploy/holesky/M2_Deploy_From_Scratch.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv | ||
| * forge script script/deploy/holesky/M2_Deploy_From_Scratch.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --broadcast -vvvv | ||
| * | ||
| */ | ||
| contract M2_Deploy_Holesky_From_Scratch is ExistingDeploymentParser { | ||
| function run() external { | ||
| _parseInitialDeploymentParams("script/configs/holesky/M2_deploy_from_scratch.holesky.config.json"); | ||
|
|
||
| // START RECORDING TRANSACTIONS FOR DEPLOYMENT | ||
| vm.startBroadcast(); | ||
|
|
||
| emit log_named_address("Deployer Address", msg.sender); | ||
|
|
||
| _deployFromScratch(); | ||
|
|
||
| // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT | ||
| vm.stopBroadcast(); | ||
|
|
||
| // Sanity Checks | ||
| _verifyContractPointers(); | ||
| _verifyImplementations(); | ||
| _verifyContractsInitialized({isInitialDeployment: true}); | ||
| _verifyInitializationParams(); | ||
|
|
||
| logAndOutputContractAddresses("script/output/holesky/M2_deploy_from_scratch.holesky.config.json"); | ||
| } | ||
|
|
||
| /** | ||
| * @notice Deploy EigenLayer contracts from scratch for Holesky | ||
| */ | ||
| function _deployFromScratch() internal { | ||
| // Deploy ProxyAdmin, later set admins for all proxies to be executorMultisig | ||
|
Comment on lines
+38
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stevennevins should this be merged into some other script? |
||
| eigenLayerProxyAdmin = new ProxyAdmin(); | ||
|
|
||
| // Set multisigs as pausers, executorMultisig as unpauser | ||
| address[] memory pausers = new address[](3); | ||
| pausers[0] = executorMultisig; | ||
| pausers[1] = operationsMultisig; | ||
| pausers[2] = pauserMultisig; | ||
| address unpauser = executorMultisig; | ||
| eigenLayerPauserReg = new PauserRegistry(pausers, unpauser); | ||
|
|
||
| /** | ||
| * First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are | ||
| * not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. | ||
| */ | ||
| emptyContract = new EmptyContract(); | ||
| avsDirectory = AVSDirectory( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
| delegationManager = DelegationManager( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
| strategyManager = StrategyManager( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
| slasher = Slasher( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
| eigenPodManager = EigenPodManager( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
| delayedWithdrawalRouter = DelayedWithdrawalRouter( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
|
|
||
| // Deploy EigenPod Contracts | ||
| eigenPodImplementation = new EigenPod( | ||
| IETHPOSDeposit(ETHPOSDepositAddress), | ||
| delayedWithdrawalRouter, | ||
| eigenPodManager, | ||
| EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR, | ||
| EIGENPOD_GENESIS_TIME | ||
| ); | ||
|
|
||
| eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); | ||
| avsDirectoryImplementation = new AVSDirectory(delegationManager); | ||
| delegationManagerImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); | ||
| strategyManagerImplementation = new StrategyManager(delegationManager, eigenPodManager, slasher); | ||
| slasherImplementation = new Slasher(strategyManager, delegationManager); | ||
| eigenPodManagerImplementation = new EigenPodManager( | ||
| IETHPOSDeposit(ETHPOSDepositAddress), | ||
| eigenPodBeacon, | ||
| strategyManager, | ||
| slasher, | ||
| delegationManager | ||
| ); | ||
| delayedWithdrawalRouterImplementation = new DelayedWithdrawalRouter(eigenPodManager); | ||
|
|
||
| // Third, upgrade the proxy contracts to point to the implementations | ||
| IStrategy[] memory initializeStrategiesToSetDelayBlocks = new IStrategy[](0); | ||
| uint256[] memory initializeWithdrawalDelayBlocks = new uint256[](0); | ||
| // AVSDirectory | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(avsDirectory))), | ||
| address(avsDirectoryImplementation), | ||
| abi.encodeWithSelector( | ||
| AVSDirectory.initialize.selector, | ||
| executorMultisig, // initialOwner | ||
| eigenLayerPauserReg, | ||
| AVS_DIRECTORY_INIT_PAUSED_STATUS | ||
| ) | ||
| ); | ||
| // DelegationManager | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(delegationManager))), | ||
| address(delegationManagerImplementation), | ||
| abi.encodeWithSelector( | ||
| DelegationManager.initialize.selector, | ||
| executorMultisig, // initialOwner | ||
| eigenLayerPauserReg, | ||
| DELEGATION_MANAGER_INIT_PAUSED_STATUS, | ||
| DELEGATION_MANAGER_MIN_WITHDRAWAL_DELAY_BLOCKS, | ||
| initializeStrategiesToSetDelayBlocks, | ||
| initializeWithdrawalDelayBlocks | ||
| ) | ||
| ); | ||
| // StrategyManager | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(strategyManager))), | ||
| address(strategyManagerImplementation), | ||
| abi.encodeWithSelector( | ||
| StrategyManager.initialize.selector, | ||
| executorMultisig, //initialOwner | ||
| executorMultisig, //initial whitelister | ||
|
||
| eigenLayerPauserReg, | ||
| STRATEGY_MANAGER_INIT_PAUSED_STATUS | ||
| ) | ||
| ); | ||
| // Slasher | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(slasher))), | ||
| address(slasherImplementation), | ||
| abi.encodeWithSelector( | ||
| Slasher.initialize.selector, | ||
| executorMultisig, | ||
| eigenLayerPauserReg, | ||
| SLASHER_INIT_PAUSED_STATUS | ||
| ) | ||
| ); | ||
| // EigenPodManager | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(eigenPodManager))), | ||
| address(eigenPodManagerImplementation), | ||
| abi.encodeWithSelector( | ||
| EigenPodManager.initialize.selector, | ||
| type(uint).max, // maxPods | ||
| beaconOracle, | ||
| msg.sender, // initialOwner is msg.sender for now to set forktimestamp later | ||
| eigenLayerPauserReg, | ||
| EIGENPOD_MANAGER_INIT_PAUSED_STATUS | ||
| ) | ||
| ); | ||
| // Delayed Withdrawal Router | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(delayedWithdrawalRouter))), | ||
| address(delayedWithdrawalRouterImplementation), | ||
| abi.encodeWithSelector( | ||
| DelayedWithdrawalRouter.initialize.selector, | ||
| executorMultisig, // initialOwner | ||
| eigenLayerPauserReg, | ||
| DELAYED_WITHDRAWAL_ROUTER_INIT_PAUSED_STATUS, | ||
| DELAYED_WITHDRAWAL_ROUTER_INIT_WITHDRAWAL_DELAY_BLOCKS | ||
| ) | ||
| ); | ||
|
|
||
| // Deploy Strategies | ||
| baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager); | ||
| uint256 numStrategiesToDeploy = strategiesToDeploy.length; | ||
| for (uint256 i = 0; i < numStrategiesToDeploy; i++) { | ||
| StrategyUnderlyingTokenConfig memory strategyConfig = strategiesToDeploy[i]; | ||
|
|
||
| // Deploy and upgrade strategy | ||
| StrategyBaseTVLLimits strategy = StrategyBaseTVLLimits( | ||
| address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), "")) | ||
| ); | ||
| eigenLayerProxyAdmin.upgradeAndCall( | ||
| TransparentUpgradeableProxy(payable(address(strategy))), | ||
| address(baseStrategyImplementation), | ||
| abi.encodeWithSelector( | ||
| StrategyBaseTVLLimits.initialize.selector, | ||
| STRATEGY_MAX_PER_DEPOSIT, | ||
| STRATEGY_MAX_TOTAL_DEPOSITS, | ||
| IERC20(strategyConfig.tokenAddress), | ||
| eigenLayerPauserReg | ||
| ) | ||
| ); | ||
|
|
||
| deployedStrategyArray.push(strategy); | ||
| } | ||
|
|
||
| // Fork timestamp config | ||
| eigenPodManager.setDenebForkTimestamp(EIGENPOD_MANAGER_DENEB_FORK_TIMESTAMP); | ||
|
|
||
| // Transfer ownership | ||
| eigenLayerProxyAdmin.transferOwnership(executorMultisig); | ||
| eigenPodManager.transferOwnership(executorMultisig); | ||
| eigenPodBeacon.transferOwnership(executorMultisig); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.