From 3203b56c0820a0655dcee4f781795c3defc85557 Mon Sep 17 00:00:00 2001 From: Alex <18387287+wadealexc@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:15:40 -0400 Subject: [PATCH] feat: pepe deploy script and config cleanup (#697) * feat: pepe deploy script and config cleanup * chore: deploy PEPE and update config plus README * fix: update fork test address config file --- README.md | 7 +- .../mainnet/M1_deploy_mainnet.config.json | 61 --- ...M2_deploy_from_scratch.mainnet.config.json | 60 --- .../mainnet/M2_mainnet_upgrade.config.json | 46 -- .../Mainnet_current_deployment.config.json | 79 --- .../mainnet/mainnet-addresses.config.json | 80 +++ .../mainnet/mainnet-config.config.json | 51 ++ .../v0.3.0-eigenlayer-addresses.config.json | 75 --- .../v0.3.0-mainnet-rewards.config.json | 57 -- .../v040-rc0-holesky-preprod-pepe.s.sol | 69 --- .../v040-rc1-holesky-preprod-pepe.s.sol | 58 -- .../v040-rc2-holesky-preprod-pepe.s.sol | 58 -- .../v040-rc3-holesky-preprod-pepe.s.sol | 58 -- .../v040-rc5-holesky-preprod-pepe.s.sol | 79 --- script/deploy/mainnet/M1_Deploy.s.sol | 509 ------------------ script/deploy/mainnet/M2Deploy.s.sol | 327 ----------- .../v0.4.2-mainnet-pepe.s.sol} | 67 +-- .../M1_deployment_mainnet_2023_6_9.json | 40 -- .../mainnet/M2_mainnet_upgrade.output.json | 35 -- script/utils/ExistingDeploymentParser.sol | 21 +- .../integration/IntegrationDeployer.t.sol | 2 +- 21 files changed, 181 insertions(+), 1658 deletions(-) delete mode 100644 script/configs/mainnet/M1_deploy_mainnet.config.json delete mode 100644 script/configs/mainnet/M2_deploy_from_scratch.mainnet.config.json delete mode 100644 script/configs/mainnet/M2_mainnet_upgrade.config.json delete mode 100644 script/configs/mainnet/Mainnet_current_deployment.config.json create mode 100644 script/configs/mainnet/mainnet-addresses.config.json create mode 100644 script/configs/mainnet/mainnet-config.config.json delete mode 100644 script/configs/mainnet/v0.3.0-eigenlayer-addresses.config.json delete mode 100644 script/configs/mainnet/v0.3.0-mainnet-rewards.config.json delete mode 100644 script/deploy/holesky/v040-rc0-holesky-preprod-pepe.s.sol delete mode 100644 script/deploy/holesky/v040-rc1-holesky-preprod-pepe.s.sol delete mode 100644 script/deploy/holesky/v040-rc2-holesky-preprod-pepe.s.sol delete mode 100644 script/deploy/holesky/v040-rc3-holesky-preprod-pepe.s.sol delete mode 100644 script/deploy/holesky/v040-rc5-holesky-preprod-pepe.s.sol delete mode 100644 script/deploy/mainnet/M1_Deploy.s.sol delete mode 100644 script/deploy/mainnet/M2Deploy.s.sol rename script/deploy/{holesky/v040-rc4-holesky-preprod-pepe.s.sol => mainnet/v0.4.2-mainnet-pepe.s.sol} (50%) delete mode 100644 script/output/mainnet/M1_deployment_mainnet_2023_6_9.json delete mode 100644 script/output/mainnet/M2_mainnet_upgrade.output.json diff --git a/README.md b/README.md index 5be48b5fa..140d4d609 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ The current mainnet deployment is our M2 release. You can view the deployed cont | -------- | -------- | -------- | -------- | | [`DelegationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/DelegationManager.sol) | [`0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A`](https://etherscan.io/address/0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A) | [`0x1784...9dda`](https://etherscan.io/address/0x1784be6401339fc0fedf7e9379409f5c1bfe9dda) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | | [`StrategyManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/StrategyManager.sol) | [`0x858646372CC42E1A627fcE94aa7A7033e7CF075A`](https://etherscan.io/address/0x858646372CC42E1A627fcE94aa7A7033e7CF075A) | [`0x70f4...619b`](https://etherscan.io/address/0x70f44c13944d49a236e3cd7a94f48f5dab6c619b) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | -| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/pods/EigenPodManager.sol) | [`0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338`](https://etherscan.io/address/0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338) | [`0xe429...5762`](https://etherscan.io/address/0xe4297e3dadbc7d99e26a2954820f514cb50c5762) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/pods/EigenPodManager.sol) | [`0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338`](https://etherscan.io/address/0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338) | [`0x731A...3FEa`](https://etherscan.io/address/0x731A0aD160e407393Ff662231Add6Dd145AD3FEa) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | | [`AVSDirectory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/AVSDirectory.sol) | [`0x135dda560e946695d6f155dacafc6f1f25c1f5af`](https://etherscan.io/address/0x135dda560e946695d6f155dacafc6f1f25c1f5af) | [`0xdabd...a5b7`](https://etherscan.io/address/0xdabdb3cd346b7d5f5779b0b614ede1cc9dcba5b7) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | | [`Slasher`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/core/Slasher.sol) | [`0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd`](https://etherscan.io/address/0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd) | [`0xf323...6614`](https://etherscan.io/address/0xf3234220163a757edf1e11a8a085638d9b236614) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | | [`RewardsCoordinator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/RewardsCoordinator.sol) | [`0x7750d328b314EfFa365A0402CcfD489B80B0adda`](https://etherscan.io/address/0x7750d328b314EfFa365A0402CcfD489B80B0adda) | [`0x5bf7...8785`](https://etherscan.io/address/0x5bf7c13D5FAdba224ECB3D5C0a67A231D1628785) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | @@ -144,7 +144,6 @@ The following strategies were originally deployed and whitelisted outside of the | [`StrategyBase (sfrxETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6`](https://etherscan.io/address/0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6) | [`0xdfdA...46d3`](https://etherscan.io/address/0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | | [`StrategyBase (lsETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0xAe60d8180437b5C34bB956822ac2710972584473`](https://etherscan.io/address/0xAe60d8180437b5C34bB956822ac2710972584473) | [`0xdfdA...46d3`](https://etherscan.io/address/0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | | [`StrategyBase (mETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x298aFB19A105D59E74658C4C334Ff360BadE6dd2`](https://etherscan.io/address/0x298aFB19A105D59E74658C4C334Ff360BadE6dd2) | [`0xdfdA...46d3`](https://etherscan.io/address/0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | -| `Beacon Chain ETH` | `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` | - | - Used for Beacon Chain ETH shares
- Not a real contract! | ###### Strategies - Special @@ -153,14 +152,14 @@ The following strategies differ significantly from the other strategies deployed | Name | Proxy | Implementation | Notes | | -------- | -------- | -------- | -------- | | [`EigenStrategy (EIGEN)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/strategies/EigenStrategy.sol) | [`0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7`](https://etherscan.io/address/0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7) | [`0x27e7...0428`](https://etherscan.io/address/0x27e7a3a81741b9fcc5ad7edcbf9f8a72a5c00428) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| `Beacon Chain ETH` | `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` | - | - Used for Beacon Chain ETH shares
- Not a real contract! | ###### EigenPods | Name | Proxy | Implementation | Notes | | -------- | -------- | -------- | -------- | -| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v0.2.5-mainnet-m2-minor-eigenpod-upgrade/src/contracts/pods/EigenPod.sol) | [`0x5a2a4F2F3C18f09179B6703e63D9eDD165909073`](https://etherscan.io/address/0x5a2a4F2F3C18f09179B6703e63D9eDD165909073) | [`0x2814...ffcc`](https://etherscan.io/address/0x28144c53ba98b4e909df5bc7ca33eaf0404cffcc) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/BeaconProxy.sol)
- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | +| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v0.2.5-mainnet-m2-minor-eigenpod-upgrade/src/contracts/pods/EigenPod.sol) | [`0x5a2a4F2F3C18f09179B6703e63D9eDD165909073`](https://etherscan.io/address/0x5a2a4F2F3C18f09179B6703e63D9eDD165909073) | [`0x6D22...6430`](https://etherscan.io/address/0x6D225e974Fa404D25Ffb84eD6E242Ffa18eF6430) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/BeaconProxy.sol)
- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | | [`DelayedWithdrawalRouter`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/4b15d68b7e16b5965bad398496bfce57f5a47e1b/src/contracts/pods/DelayedWithdrawalRouter.sol) | [`0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8`](https://etherscan.io/address/0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8) | [`0x4bb6...4226`](https://etherscan.io/address/0x4bb6731b02314d40abbffbc4540f508874014226) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | -| [`EigenLayerBeaconOracle`](https://github.com/succinctlabs/eigenlayer-beacon-oracle/blob/main/contracts/src/EigenLayerBeaconOracle.sol) | - | [`0x3439...5442`](https://etherscan.io/address/0x343907185b71adf0eba9567538314396aa985442) | Provided by [Succinct](https://succinct.xyz/) | ###### EIGEN/bEIGEN diff --git a/script/configs/mainnet/M1_deploy_mainnet.config.json b/script/configs/mainnet/M1_deploy_mainnet.config.json deleted file mode 100644 index e5b43e804..000000000 --- a/script/configs/mainnet/M1_deploy_mainnet.config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "multisig_addresses": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - }, - "strategies": [ - { - "token_address": "0xBe9895146f7AF43049ca1c1AE358B0541Ea49704", - "token_name": "Coinbase Wrapped Staked ETH", - "token_symbol": "cbETH", - "max_per_deposit": 0, - "max_deposits": 0 - }, - { - "token_address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", - "token_name": "Liquid staked Ether 2.0", - "token_symbol": "stETH", - "max_per_deposit": 0, - "max_deposits": 0 - }, - { - "token_address": "0xae78736Cd615f374D3085123A210448E74Fc6393", - "token_name": "Rocket Pool ETH", - "token_symbol": "rETH", - "max_per_deposit": 0, - "max_deposits": 0 - } - ], - "strategyManager": - { - "init_paused_status": 0, - "init_withdrawal_delay_blocks": 50400 - }, - "eigenPod": - { - "PARTIAL_WITHDRAWAL_FRAUD_PROOF_PERIOD_BLOCKS": 50400, - "REQUIRED_BALANCE_WEI": "32000000000000000000" - }, - "eigenPodManager": - { - "max_pods": 0, - "init_paused_status": 30 - }, - "delayedWithdrawalRouter": - { - "init_paused_status": 0, - "init_withdrawal_delay_blocks": 50400 - }, - "slasher": - { - "init_paused_status": "115792089237316195423570985008687907853269984665640564039457584007913129639935" - }, - "delegation": - { - "init_paused_status": "115792089237316195423570985008687907853269984665640564039457584007913129639935" - }, - "ethPOSDepositAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa" - } \ No newline at end of file diff --git a/script/configs/mainnet/M2_deploy_from_scratch.mainnet.config.json b/script/configs/mainnet/M2_deploy_from_scratch.mainnet.config.json deleted file mode 100644 index 9724ce6cd..000000000 --- a/script/configs/mainnet/M2_deploy_from_scratch.mainnet.config.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "multisig_addresses": { - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "executorMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90" - }, - "strategies": [ - { - "token_address": "0xBe9895146f7AF43049ca1c1AE358B0541Ea49704", - "token_name": "Coinbase Wrapped Staked ETH", - "token_symbol": "cbETH", - "max_per_deposit": 0, - "max_deposits": 0 - }, - { - "token_address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", - "token_name": "Liquid staked Ether 2.0", - "token_symbol": "stETH", - "max_per_deposit": 0, - "max_deposits": 0 - }, - { - "token_address": "0xae78736Cd615f374D3085123A210448E74Fc6393", - "token_name": "Rocket Pool ETH", - "token_symbol": "rETH", - "max_per_deposit": 0, - "max_deposits": 0 - } - ], - "strategyManager": - { - "init_paused_status": 0, - "init_withdrawal_delay_blocks": 50400 - }, - "eigenPod": - { - "PARTIAL_WITHDRAWAL_FRAUD_PROOF_PERIOD_BLOCKS": 50400, - "MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": "32000000000" - }, - "eigenPodManager": - { - "max_pods": 0, - "init_paused_status": 30 - }, - "delayedWithdrawalRouter": - { - "init_paused_status": 0, - "init_withdrawal_delay_blocks": 50400 - }, - "slasher": - { - "init_paused_status": 0 - }, - "delegation": - { - "init_paused_status": 0, - "init_withdrawal_delay_blocks": 50400 - }, - "ethPOSDepositAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa" - } \ No newline at end of file diff --git a/script/configs/mainnet/M2_mainnet_upgrade.config.json b/script/configs/mainnet/M2_mainnet_upgrade.config.json deleted file mode 100644 index 744672fac..000000000 --- a/script/configs/mainnet/M2_mainnet_upgrade.config.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "chainInfo": { - "chainId": 1 - }, - "multisig_addresses": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - }, - "strategies": { - "numStrategies": 0, - "MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935, - "MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935, - "strategiesToDeploy": [] - }, - "strategyManager": { - "init_strategy_whitelister": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "init_paused_status": 1 - }, - "delegationManager": { - "init_paused_status": 0, - "init_minWithdrawalDelayBlocks": 50400 - }, - "avsDirectory": { - "init_paused_status": 0 - }, - "slasher": { - "init_paused_status": 115792089237316195423570985008687907853269984665640564039457584007913129639935 - }, - "eigenPod": { - "MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": 32000000000, - "GENESIS_TIME": 1606824023 - }, - "eigenPodManager": { - "init_paused_status": 0, - "deneb_fork_timestamp": "1710338135" - }, - "delayedWithdrawalRouter": { - "init_paused_status": 0, - "init_withdrawalDelayBlocks": 50400 - }, - "ethPOSDepositAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa", - "beaconOracleAddress": "0x343907185b71aDF0eBa9567538314396aa985442" -} \ No newline at end of file diff --git a/script/configs/mainnet/Mainnet_current_deployment.config.json b/script/configs/mainnet/Mainnet_current_deployment.config.json deleted file mode 100644 index 4276018c1..000000000 --- a/script/configs/mainnet/Mainnet_current_deployment.config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "addresses": { - "avsDirectory": "0x135DDa560e946695d6f155dACaFC6f1F25C1F5AF", - "avsDirectoryImplementation": "0xdAbdB3Cd346B7D5F5779b0B614EdE1CC9DcBA5b7", - "beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442", - "baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3", - "delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8", - "delayedWithdrawalRouterImplementation": "0x44Bcb0E01CD0C5060D4Bb1A07b42580EF983E2AF", - "delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A", - "delegationManagerImplementation": "0xf97E97649Da958d290e84E6D571c32F4b7F475e4", - "eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060", - "eigenLayerProxyAdmin": "0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444", - "eigenPodBeacon": "0x5a2a4F2F3C18f09179B6703e63D9eDD165909073", - "eigenPodImplementation": "0x28144C53bA98B4e909Df5bC7cA33eAf0404cFfcc", - "eigenPodManager": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338", - "eigenPodManagerImplementation": "0xEB86a5c40FdE917E6feC440aBbCDc80E3862e111", - "emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9", - "rewardsCoordinator": "0x7750d328b314EfFa365A0402CcfD489B80B0adda", - "rewardsCoordinatorImplementation": "0x5bf7c13D5FAdba224ECB3D5C0a67A231D1628785", - "slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd", - "slasherImplementation": "0xef31c292801f24f16479DD83197F1E6AeBb8d6d8", - "strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A", - "strategyManagerImplementation": "0x5d25EEf8CfEdaA47d31fE2346726dE1c21e342Fb", - "strategyFactory": "0x5e4C39Ad7A3E881585e383dB9827EB4811f6F647", - "strategyFactoryImplementation": "0x3e07cc2D34C8E0965f5BA45Ac1E960e535155c74", - "strategyFactoryBeacon": "0x0ed6703C298d28aE0878d1b28e88cA87F9662fE9", - "strategyFactoryBeaconImplementation": "0xe9FA8F904d97854C7389b68923262ADCC6C27827", - "numStrategiesDeployed": 12, - "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" - ], - "token": { - "tokenProxyAdmin": "0x3f5Ab2D4418d38568705bFd6672630fCC3435CC9", - "EIGEN": "0xec53bf9167f50cdeb3ae105f56099aaab9061f83", - "bEIGEN": "0x83E9115d334D248Ce39a6f36144aEaB5b3456e75", - "EIGENImpl": "0x7ec354c84680112d3cff1544ec1eb19ca583700b", - "bEIGENImpl": "0xB91c69Af3eE022bd0a59Da082945914BFDcEFFE3", - "eigenStrategy": "0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7", - "eigenStrategyImpl": "0x27e7a3a81741b9fcc5ad7edcbf9f8a72a5c00428" - } - }, - "numStrategies": 12, - "chainInfo": { - "chainId": 1, - "deploymentBlock": 17445559 - }, - "parameters": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - } -} diff --git a/script/configs/mainnet/mainnet-addresses.config.json b/script/configs/mainnet/mainnet-addresses.config.json new file mode 100644 index 000000000..71a1898da --- /dev/null +++ b/script/configs/mainnet/mainnet-addresses.config.json @@ -0,0 +1,80 @@ +{ + "lastUpdated": "v0.4.2-mainnet-pepe", + "addresses": { + "avsDirectory": "0x135dda560e946695d6f155dacafc6f1f25c1f5af", + "avsDirectoryImplementation": "0xdabdb3cd346b7d5f5779b0b614ede1cc9dcba5b7", + "beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442", + "baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3", + "delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8", + "delayedWithdrawalRouterImplementation": "0x4bb6731b02314d40abbffbc4540f508874014226", + "delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A", + "delegationManagerImplementation": "0x1784be6401339fc0fedf7e9379409f5c1bfe9dda", + "eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060", + "eigenLayerProxyAdmin": "0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444", + "eigenPodBeacon": "0x5a2a4F2F3C18f09179B6703e63D9eDD165909073", + "eigenPodImplementation": "0x6D225e974Fa404D25Ffb84eD6E242Ffa18eF6430", + "eigenPodManager": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338", + "eigenPodManagerImplementation": "0x731A0aD160e407393Ff662231Add6Dd145AD3FEa", + "emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9", + "rewardsCoordinator": "0x7750d328b314EfFa365A0402CcfD489B80B0adda", + "rewardsCoordinatorImplementation": "0x5bf7c13D5FAdba224ECB3D5C0a67A231D1628785", + "slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd", + "slasherImplementation": "0xf3234220163a757edf1e11a8a085638d9b236614", + "strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A", + "strategyManagerImplementation": "0x70f44c13944d49a236e3cd7a94f48f5dab6c619b", + "strategyFactory": "0x5e4C39Ad7A3E881585e383dB9827EB4811f6F647", + "strategyFactoryImplementation": "0x3e07cc2D34C8E0965f5BA45Ac1E960e535155c74", + "strategyFactoryBeacon": "0x0ed6703C298d28aE0878d1b28e88cA87F9662fE9", + "strategyFactoryBeaconImplementation": "0xe9FA8F904d97854C7389b68923262ADCC6C27827", + "numStrategiesDeployed": 12, + "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" + ], + "token": { + "tokenProxyAdmin": "0x3f5Ab2D4418d38568705bFd6672630fCC3435CC9", + "EIGEN": "0xec53bf9167f50cdeb3ae105f56099aaab9061f83", + "bEIGEN": "0x83E9115d334D248Ce39a6f36144aEaB5b3456e75", + "EIGENImpl": "0x7ec354c84680112d3cff1544ec1eb19ca583700b", + "bEIGENImpl": "0xB91c69Af3eE022bd0a59Da082945914BFDcEFFE3", + "eigenStrategy": "0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7", + "eigenStrategyImpl": "0x27e7a3a81741b9fcc5ad7edcbf9f8a72a5c00428" + } + }, + "numStrategies": 12, + "chainInfo": { + "chainId": 1, + "deploymentBlock": 20571838 + }, + "parameters": { + "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", + "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", + "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", + "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", + "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" + } +} \ No newline at end of file diff --git a/script/configs/mainnet/mainnet-config.config.json b/script/configs/mainnet/mainnet-config.config.json new file mode 100644 index 000000000..f646ad7e6 --- /dev/null +++ b/script/configs/mainnet/mainnet-config.config.json @@ -0,0 +1,51 @@ +{ + "lastUpdated": "v0.4.2-mainnet-pepe", + "chainInfo": { + "chainId": 1 + }, + "multisig_addresses": { + "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", + "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", + "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", + "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", + "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" + }, + "strategies": { + "numStrategies": 0, + "MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935, + "MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935, + "strategiesToDeploy": [] + }, + "strategyManager": { + "init_strategy_whitelister": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", + "init_paused_status": 0 + }, + "delegationManager": { + "init_paused_status": 0, + "init_minWithdrawalDelayBlocks": 50400 + }, + "avsDirectory": { + "init_paused_status": 0 + }, + "slasher": { + "init_paused_status": 115792089237316195423570985008687907853269984665640564039457584007913129639935 + }, + "eigenPod": { + "GENESIS_TIME": 1606824023 + }, + "eigenPodManager": { + "init_paused_status": 0 + }, + "ethPOSDepositAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa", + "rewardsCoordinator": { + "init_paused_status": 0, + "CALCULATION_INTERVAL_SECONDS": 604800, + "MAX_REWARDS_DURATION": 6048000, + "MAX_RETROACTIVE_LENGTH": 14515200, + "MAX_FUTURE_LENGTH": 2592000, + "GENESIS_REWARDS_TIMESTAMP": 1710979200, + "rewards_updater_address": "0x8f94F55fD8c9E090296283137C303fE97d32A9e2", + "activation_delay": 604800, + "global_operator_commission_bips": 1000 + } + } \ No newline at end of file diff --git a/script/configs/mainnet/v0.3.0-eigenlayer-addresses.config.json b/script/configs/mainnet/v0.3.0-eigenlayer-addresses.config.json deleted file mode 100644 index 7da7b1e56..000000000 --- a/script/configs/mainnet/v0.3.0-eigenlayer-addresses.config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "addresses": { - "avsDirectory": "0x135dda560e946695d6f155dacafc6f1f25c1f5af", - "avsDirectoryImplementation": "0xdabdb3cd346b7d5f5779b0b614ede1cc9dcba5b7", - "beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442", - "baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3", - "delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8", - "delayedWithdrawalRouterImplementation": "0x4bb6731b02314d40abbffbc4540f508874014226", - "delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A", - "delegationManagerImplementation": "0x1784be6401339fc0fedf7e9379409f5c1bfe9dda", - "eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060", - "eigenLayerProxyAdmin": "0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444", - "eigenPodBeacon": "0x5a2a4F2F3C18f09179B6703e63D9eDD165909073", - "eigenPodImplementation": "0x28144c53ba98b4e909df5bc7ca33eaf0404cffcc", - "eigenPodManager": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338", - "eigenPodManagerImplementation": "0xe4297e3dadbc7d99e26a2954820f514cb50c5762", - "emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9", - "rewardsCoordinator": "0x0000000000000000000000000000000000000000", - "rewardsCoordinatorImplementation": "0x0000000000000000000000000000000000000000", - "slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd", - "slasherImplementation": "0xf3234220163a757edf1e11a8a085638d9b236614", - "strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A", - "strategyManagerImplementation": "0x70f44c13944d49a236e3cd7a94f48f5dab6c619b", - "numStrategiesDeployed": 12, - "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" - ], - "token": { - "tokenProxyAdmin": "0x3f5Ab2D4418d38568705bFd6672630fCC3435CC9", - "EIGEN": "0xec53bf9167f50cdeb3ae105f56099aaab9061f83", - "bEIGEN": "0x83E9115d334D248Ce39a6f36144aEaB5b3456e75", - "EIGENImpl": "0x7ec354c84680112d3cff1544ec1eb19ca583700b", - "bEIGENImpl": "0xB91c69Af3eE022bd0a59Da082945914BFDcEFFE3", - "eigenStrategy": "0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7", - "eigenStrategyImpl": "0x27e7a3a81741b9fcc5ad7edcbf9f8a72a5c00428" - } - }, - "numStrategies": 12, - "chainInfo": { - "chainId": 1, - "deploymentBlock": 17445559 - }, - "parameters": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - } -} diff --git a/script/configs/mainnet/v0.3.0-mainnet-rewards.config.json b/script/configs/mainnet/v0.3.0-mainnet-rewards.config.json deleted file mode 100644 index 9d87b89f9..000000000 --- a/script/configs/mainnet/v0.3.0-mainnet-rewards.config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "chainInfo": { - "chainId": 1 - }, - "multisig_addresses": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - }, - "strategies": { - "numStrategies": 0, - "MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935, - "MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935, - "strategiesToDeploy": [] - }, - "strategyManager": { - "init_strategy_whitelister": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "init_paused_status": 0 - }, - "delegationManager": { - "init_paused_status": 0, - "init_minWithdrawalDelayBlocks": 50400 - }, - "avsDirectory": { - "init_paused_status": 0 - }, - "slasher": { - "init_paused_status": 115792089237316195423570985008687907853269984665640564039457584007913129639935 - }, - "eigenPod": { - "MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": 32000000000, - "GENESIS_TIME": 1606824023 - }, - "eigenPodManager": { - "init_paused_status": 0, - "deneb_fork_timestamp": "1710338135" - }, - "delayedWithdrawalRouter": { - "init_paused_status": 0, - "init_withdrawalDelayBlocks": 50400 - }, - "ethPOSDepositAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa", - "beaconOracleAddress": "0x343907185b71aDF0eBa9567538314396aa985442", - "rewardsCoordinator": { - "init_paused_status": 0, - "CALCULATION_INTERVAL_SECONDS": 604800, - "MAX_REWARDS_DURATION": 6048000, - "MAX_RETROACTIVE_LENGTH": 14515200, - "MAX_FUTURE_LENGTH": 2592000, - "GENESIS_REWARDS_TIMESTAMP": 1710979200, - "rewards_updater_address": "0x8f94F55fD8c9E090296283137C303fE97d32A9e2", - "activation_delay": 604800, - "global_operator_commission_bips": 1000 - } -} \ No newline at end of file diff --git a/script/deploy/holesky/v040-rc0-holesky-preprod-pepe.s.sol b/script/deploy/holesky/v040-rc0-holesky-preprod-pepe.s.sol deleted file mode 100644 index fe173c6bb..000000000 --- a/script/deploy/holesky/v040-rc0-holesky-preprod-pepe.s.sol +++ /dev/null @@ -1,69 +0,0 @@ -// 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(); - _verifyInitializationParams(); - - logAndOutputContractAddresses("script/output/holesky/v040-rc0.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)); - } -} diff --git a/script/deploy/holesky/v040-rc1-holesky-preprod-pepe.s.sol b/script/deploy/holesky/v040-rc1-holesky-preprod-pepe.s.sol deleted file mode 100644 index a09b67599..000000000 --- a/script/deploy/holesky/v040-rc1-holesky-preprod-pepe.s.sol +++ /dev/null @@ -1,58 +0,0 @@ -// 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/v040-rc1-holesky-preprod-pepe.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv - * forge script script/deploy/holesky/v040-rc1-holesky-preprod-pepe.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" - ); - - emit log_named_address("Deployer Address", msg.sender); - - // START RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.startBroadcast(); - - _upgradeEigenPods(); - - // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.stopBroadcast(); - - // Sanity Checks - _verifyContractPointers(); - _verifyImplementations(); - _verifyContractsInitialized(); - _verifyInitializationParams(); - - logAndOutputContractAddresses("script/output/holesky/v040-rc1.output.json"); - } - - /** - * @notice Deploy EigenPod Implementation for Holesky preprod and upgrade the beacon - */ - function _upgradeEigenPods() internal { - // Deploy implementation - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); - - // upgrade UpgradeableBeacon - eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); - } -} diff --git a/script/deploy/holesky/v040-rc2-holesky-preprod-pepe.s.sol b/script/deploy/holesky/v040-rc2-holesky-preprod-pepe.s.sol deleted file mode 100644 index 0f0be39f6..000000000 --- a/script/deploy/holesky/v040-rc2-holesky-preprod-pepe.s.sol +++ /dev/null @@ -1,58 +0,0 @@ -// 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/v040-rc2-holesky-preprod-pepe.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv - * forge script script/deploy/holesky/v040-rc2-holesky-preprod-pepe.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" - ); - - emit log_named_address("Deployer Address", msg.sender); - - // START RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.startBroadcast(); - - _upgradeEigenPods(); - - // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.stopBroadcast(); - - // Sanity Checks - _verifyContractPointers(); - _verifyImplementations(); - _verifyContractsInitialized(); - _verifyInitializationParams(); - - logAndOutputContractAddresses("script/output/holesky/v040-rc2.output.json"); - } - - /** - * @notice Deploy EigenPod Implementation for Holesky preprod and upgrade the beacon - */ - function _upgradeEigenPods() internal { - // Deploy implementation - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); - - // upgrade UpgradeableBeacon - eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); - } -} diff --git a/script/deploy/holesky/v040-rc3-holesky-preprod-pepe.s.sol b/script/deploy/holesky/v040-rc3-holesky-preprod-pepe.s.sol deleted file mode 100644 index 1b740a214..000000000 --- a/script/deploy/holesky/v040-rc3-holesky-preprod-pepe.s.sol +++ /dev/null @@ -1,58 +0,0 @@ -// 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/v040-rc3-holesky-preprod-pepe.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv - * forge script script/deploy/holesky/v040-rc3-holesky-preprod-pepe.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" - ); - - emit log_named_address("Deployer Address", msg.sender); - - // START RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.startBroadcast(); - - _upgradeEigenPods(); - - // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.stopBroadcast(); - - // Sanity Checks - _verifyContractPointers(); - _verifyImplementations(); - _verifyContractsInitialized(); - _verifyInitializationParams(); - - logAndOutputContractAddresses("script/output/holesky/v040-rc3.output.json"); - } - - /** - * @notice Deploy EigenPod Implementation for Holesky preprod and upgrade the beacon - */ - function _upgradeEigenPods() internal { - // Deploy implementation - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); - - // upgrade UpgradeableBeacon - eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); - } -} diff --git a/script/deploy/holesky/v040-rc5-holesky-preprod-pepe.s.sol b/script/deploy/holesky/v040-rc5-holesky-preprod-pepe.s.sol deleted file mode 100644 index 1506d96e6..000000000 --- a/script/deploy/holesky/v040-rc5-holesky-preprod-pepe.s.sol +++ /dev/null @@ -1,79 +0,0 @@ -// 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/v040-rc5-holesky-preprod-pepe.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv - * forge script script/deploy/holesky/v040-rc5-holesky-preprod-pepe.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" - ); - - emit log_named_address("Deployer Address", msg.sender); - - // START RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.startBroadcast(); - - _upgradeEigenPods(); - _upgradeEigenPodManager(); - - // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.stopBroadcast(); - - // Sanity Checks - _verifyContractPointers(); - _verifyImplementations(); - _verifyContractsInitialized(); - _verifyInitializationParams(); - - logAndOutputContractAddresses("script/output/holesky/v040-rc5.output.json"); - } - - /** - * @notice Deploy EigenPod Implementation for Holesky preprod and upgrade the beacon - */ - function _upgradeEigenPods() internal { - // Deploy implementation - eigenPodImplementation = new EigenPod( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodManager, - EIGENPOD_GENESIS_TIME - ); - - // upgrade UpgradeableBeacon - eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); - } - - /** - * @notice Deploy EPM Implementation for Holesky preprod and upgrade its proxy - */ - function _upgradeEigenPodManager() internal { - // Deploy implementation - eigenPodManagerImplementation = new EigenPodManager( - IETHPOSDeposit(ETHPOSDepositAddress), - eigenPodBeacon, - strategyManager, - slasher, - delegationManager - ); - - // upgrade TUPS - eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) - ); - } -} diff --git a/script/deploy/mainnet/M1_Deploy.s.sol b/script/deploy/mainnet/M1_Deploy.s.sol deleted file mode 100644 index d765774a6..000000000 --- a/script/deploy/mainnet/M1_Deploy.s.sol +++ /dev/null @@ -1,509 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.12; - -import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; -import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; -import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; - -import "../../../src/contracts/interfaces/IETHPOSDeposit.sol"; - -import "../../../src/contracts/core/StrategyManager.sol"; -import "../../../src/contracts/core/Slasher.sol"; -import "../../../src/contracts/core/DelegationManager.sol"; - -import "../../../src/contracts/strategies/StrategyBaseTVLLimits.sol"; - -import "../../../src/contracts/pods/EigenPod.sol"; -import "../../../src/contracts/pods/EigenPodManager.sol"; - -import "../../../src/contracts/permissions/PauserRegistry.sol"; - -import "../../../src/test/mocks/EmptyContract.sol"; -import "../../../src/test/mocks/ETHDepositMock.sol"; - -import "forge-std/Script.sol"; -import "forge-std/Test.sol"; - -// # To load the variables in the .env file -// source .env - -// # To deploy and verify our contract -// forge script script/M1_Deploy.s.sol:Deployer_M1 --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast -vvvv -contract Deployer_M1 is Script, Test { - Vm cheats = Vm(HEVM_ADDRESS); - - // struct used to encode token info in config file - struct StrategyConfig { - uint256 maxDeposits; - uint256 maxPerDeposit; - address tokenAddress; - string tokenSymbol; - } - - string public deployConfigPath = string(bytes("script/M1_deploy.config.json")); - - // EigenLayer Contracts - ProxyAdmin public eigenLayerProxyAdmin; - PauserRegistry public eigenLayerPauserReg; - Slasher public slasher; - Slasher public slasherImplementation; - DelegationManager public delegation; - DelegationManager public delegationImplementation; - StrategyManager public strategyManager; - StrategyManager public strategyManagerImplementation; - EigenPodManager public eigenPodManager; - EigenPodManager public eigenPodManagerImplementation; - UpgradeableBeacon public eigenPodBeacon; - EigenPod public eigenPodImplementation; - StrategyBase public baseStrategyImplementation; - - EmptyContract public emptyContract; - - address executorMultisig; - address operationsMultisig; - address pauserMultisig; - - // the ETH2 deposit contract -- if not on mainnet, we deploy a mock as stand-in - IETHPOSDeposit public ethPOSDeposit; - - // strategies deployed - StrategyBaseTVLLimits[] public deployedStrategyArray; - - // IMMUTABLES TO SET - uint256 REQUIRED_BALANCE_WEI; - uint256 MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR; - uint64 GOERLI_GENESIS_TIME = 1616508000; - - // OTHER DEPLOYMENT PARAMETERS - uint256 STRATEGY_MANAGER_INIT_PAUSED_STATUS; - uint256 SLASHER_INIT_PAUSED_STATUS; - uint256 DELEGATION_INIT_PAUSED_STATUS; - uint256 EIGENPOD_MANAGER_INIT_PAUSED_STATUS; - uint256 EIGENPOD_MANAGER_MAX_PODS; - - // one week in blocks -- 50400 - uint32 STRATEGY_MANAGER_INIT_WITHDRAWAL_DELAY_BLOCKS; - - function run() external { - // read and log the chainID - uint256 chainId = block.chainid; - emit log_named_uint("You are deploying on ChainID", chainId); - - // READ JSON CONFIG DATA - string memory config_data = vm.readFile(deployConfigPath); - // bytes memory parsedData = vm.parseJson(config_data); - - STRATEGY_MANAGER_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".strategyManager.init_paused_status"); - SLASHER_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".slasher.init_paused_status"); - DELEGATION_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".delegation.init_paused_status"); - EIGENPOD_MANAGER_MAX_PODS = stdJson.readUint(config_data, ".eigenPodManager.max_pods"); - EIGENPOD_MANAGER_INIT_PAUSED_STATUS = stdJson.readUint(config_data, ".eigenPodManager.init_paused_status"); - - STRATEGY_MANAGER_INIT_WITHDRAWAL_DELAY_BLOCKS = uint32( - stdJson.readUint(config_data, ".strategyManager.init_withdrawal_delay_blocks") - ); - - REQUIRED_BALANCE_WEI = stdJson.readUint(config_data, ".eigenPod.REQUIRED_BALANCE_WEI"); - MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR = stdJson.readUint( - config_data, - ".eigenPod.MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR" - ); - - // tokens to deploy strategies for - StrategyConfig[] memory strategyConfigs; - - executorMultisig = stdJson.readAddress(config_data, ".multisig_addresses.executorMultisig"); - operationsMultisig = stdJson.readAddress(config_data, ".multisig_addresses.operationsMultisig"); - pauserMultisig = stdJson.readAddress(config_data, ".multisig_addresses.pauserMultisig"); - // load token list - bytes memory strategyConfigsRaw = stdJson.parseRaw(config_data, ".strategies"); - strategyConfigs = abi.decode(strategyConfigsRaw, (StrategyConfig[])); - - require(executorMultisig != address(0), "executorMultisig address not configured correctly!"); - require(operationsMultisig != address(0), "operationsMultisig address not configured correctly!"); - - // START RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.startBroadcast(); - - // deploy proxy admin for ability to upgrade proxy contracts - eigenLayerProxyAdmin = new ProxyAdmin(); - - //deploy pauser registry - { - address[] memory pausers = new address[](3); - pausers[0] = executorMultisig; - pausers[1] = operationsMultisig; - pausers[2] = pauserMultisig; - eigenLayerPauserReg = new PauserRegistry(pausers, executorMultisig); - } - - /** - * 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(); - delegation = 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), "")) - ); - - // if on mainnet, use the ETH2 deposit contract address - if (chainId == 1) { - ethPOSDeposit = IETHPOSDeposit(0x00000000219ab540356cBB839Cbe05303d7705Fa); - // if not on mainnet, deploy a mock - } else { - ethPOSDeposit = IETHPOSDeposit(stdJson.readAddress(config_data, ".ethPOSDepositAddress")); - } - eigenPodImplementation = new EigenPod( - ethPOSDeposit, - eigenPodManager, - GOERLI_GENESIS_TIME - ); - - eigenPodBeacon = new UpgradeableBeacon(address(eigenPodImplementation)); - - // Second, deploy the *implementation* contracts, using the *proxy contracts* as inputs - delegationImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); - strategyManagerImplementation = new StrategyManager(delegation, eigenPodManager, slasher); - slasherImplementation = new Slasher(strategyManager, delegation); - eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, - eigenPodBeacon, - strategyManager, - slasher, - delegation - ); - - // Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them. - eigenLayerProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(delegation))), - address(delegationImplementation), - abi.encodeWithSelector( - DelegationManager.initialize.selector, - executorMultisig, - eigenLayerPauserReg, - DELEGATION_INIT_PAUSED_STATUS - ) - ); - eigenLayerProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(strategyManager))), - address(strategyManagerImplementation), - abi.encodeWithSelector( - StrategyManager.initialize.selector, - executorMultisig, - operationsMultisig, - eigenLayerPauserReg, - STRATEGY_MANAGER_INIT_PAUSED_STATUS - ) - ); - eigenLayerProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(slasher))), - address(slasherImplementation), - abi.encodeWithSelector( - Slasher.initialize.selector, - executorMultisig, - eigenLayerPauserReg, - SLASHER_INIT_PAUSED_STATUS - ) - ); - eigenLayerProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation), - abi.encodeWithSelector( - EigenPodManager.initialize.selector, - executorMultisig, - eigenLayerPauserReg, - EIGENPOD_MANAGER_INIT_PAUSED_STATUS - ) - ); - - // deploy StrategyBaseTVLLimits contract implementation - baseStrategyImplementation = new StrategyBaseTVLLimits(strategyManager); - // create upgradeable proxies that each point to the implementation and initialize them - for (uint256 i = 0; i < strategyConfigs.length; ++i) { - deployedStrategyArray.push( - StrategyBaseTVLLimits( - address( - new TransparentUpgradeableProxy( - address(baseStrategyImplementation), - address(eigenLayerProxyAdmin), - abi.encodeWithSelector( - StrategyBaseTVLLimits.initialize.selector, - strategyConfigs[i].maxPerDeposit, - strategyConfigs[i].maxDeposits, - IERC20(strategyConfigs[i].tokenAddress), - eigenLayerPauserReg - ) - ) - ) - ) - ); - } - - eigenLayerProxyAdmin.transferOwnership(executorMultisig); - eigenPodBeacon.transferOwnership(executorMultisig); - - // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT - vm.stopBroadcast(); - - // CHECK CORRECTNESS OF DEPLOYMENT - _verifyContractsPointAtOneAnother( - delegationImplementation, - strategyManagerImplementation, - slasherImplementation, - eigenPodManagerImplementation - ); - _verifyContractsPointAtOneAnother( - delegation, - strategyManager, - slasher, - eigenPodManager - ); - _verifyImplementationsSetCorrectly(); - _verifyInitialOwners(); - _checkPauserInitializations(); - _verifyInitializationParams(); - - // WRITE JSON DATA - string memory parent_object = "parent object"; - - string memory deployed_strategies = "strategies"; - for (uint256 i = 0; i < strategyConfigs.length; ++i) { - vm.serializeAddress(deployed_strategies, strategyConfigs[i].tokenSymbol, address(deployedStrategyArray[i])); - } - string memory deployed_strategies_output = vm.serializeAddress( - deployed_strategies, - strategyConfigs[strategyConfigs.length - 1].tokenSymbol, - address(deployedStrategyArray[strategyConfigs.length - 1]) - ); - - string memory deployed_addresses = "addresses"; - vm.serializeAddress(deployed_addresses, "eigenLayerProxyAdmin", address(eigenLayerProxyAdmin)); - vm.serializeAddress(deployed_addresses, "eigenLayerPauserReg", address(eigenLayerPauserReg)); - vm.serializeAddress(deployed_addresses, "slasher", address(slasher)); - vm.serializeAddress(deployed_addresses, "slasherImplementation", address(slasherImplementation)); - vm.serializeAddress(deployed_addresses, "delegation", address(delegation)); - vm.serializeAddress(deployed_addresses, "delegationImplementation", address(delegationImplementation)); - vm.serializeAddress(deployed_addresses, "strategyManager", address(strategyManager)); - vm.serializeAddress( - deployed_addresses, - "strategyManagerImplementation", - address(strategyManagerImplementation) - ); - vm.serializeAddress(deployed_addresses, "eigenPodManager", address(eigenPodManager)); - vm.serializeAddress( - deployed_addresses, - "eigenPodManagerImplementation", - address(eigenPodManagerImplementation) - ); - vm.serializeAddress(deployed_addresses, "eigenPodBeacon", address(eigenPodBeacon)); - vm.serializeAddress(deployed_addresses, "eigenPodImplementation", address(eigenPodImplementation)); - vm.serializeAddress(deployed_addresses, "baseStrategyImplementation", address(baseStrategyImplementation)); - vm.serializeAddress(deployed_addresses, "emptyContract", address(emptyContract)); - string memory deployed_addresses_output = vm.serializeString( - deployed_addresses, - "strategies", - deployed_strategies_output - ); - - string memory parameters = "parameters"; - vm.serializeAddress(parameters, "executorMultisig", executorMultisig); - string memory parameters_output = vm.serializeAddress(parameters, "operationsMultisig", operationsMultisig); - - string memory chain_info = "chainInfo"; - vm.serializeUint(chain_info, "deploymentBlock", block.number); - string memory chain_info_output = vm.serializeUint(chain_info, "chainId", chainId); - - // serialize all the data - vm.serializeString(parent_object, deployed_addresses, deployed_addresses_output); - vm.serializeString(parent_object, chain_info, chain_info_output); - string memory finalJson = vm.serializeString(parent_object, parameters, parameters_output); - vm.writeJson(finalJson, "script/output/M1_deployment_data.json"); - } - - function _verifyContractsPointAtOneAnother( - DelegationManager delegationContract, - StrategyManager strategyManagerContract, - Slasher slasherContract, - EigenPodManager eigenPodManagerContract - ) internal view { - require(delegationContract.slasher() == slasher, "delegation: slasher address not set correctly"); - require( - delegationContract.strategyManager() == strategyManager, - "delegation: strategyManager address not set correctly" - ); - - require(strategyManagerContract.slasher() == slasher, "strategyManager: slasher address not set correctly"); - require( - strategyManagerContract.delegation() == delegation, - "strategyManager: delegation address not set correctly" - ); - require( - strategyManagerContract.eigenPodManager() == eigenPodManager, - "strategyManager: eigenPodManager address not set correctly" - ); - - require(slasherContract.strategyManager() == strategyManager, "slasher: strategyManager not set correctly"); - require(slasherContract.delegation() == delegation, "slasher: delegation not set correctly"); - - require( - eigenPodManagerContract.ethPOS() == ethPOSDeposit, - " eigenPodManager: ethPOSDeposit contract address not set correctly" - ); - require( - eigenPodManagerContract.eigenPodBeacon() == eigenPodBeacon, - "eigenPodManager: eigenPodBeacon contract address not set correctly" - ); - require( - eigenPodManagerContract.strategyManager() == strategyManager, - "eigenPodManager: strategyManager contract address not set correctly" - ); - require( - eigenPodManagerContract.slasher() == slasher, - "eigenPodManager: slasher contract address not set correctly" - ); - } - - function _verifyImplementationsSetCorrectly() internal view { - require( - eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(delegation)))) == - address(delegationImplementation), - "delegation: implementation set incorrectly" - ); - require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(strategyManager))) - ) == address(strategyManagerImplementation), - "strategyManager: implementation set incorrectly" - ); - require( - eigenLayerProxyAdmin.getProxyImplementation(TransparentUpgradeableProxy(payable(address(slasher)))) == - address(slasherImplementation), - "slasher: implementation set incorrectly" - ); - require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(eigenPodManager))) - ) == address(eigenPodManagerImplementation), - "eigenPodManager: implementation set incorrectly" - ); - - for (uint256 i = 0; i < deployedStrategyArray.length; ++i) { - require( - eigenLayerProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(deployedStrategyArray[i]))) - ) == address(baseStrategyImplementation), - "strategy: implementation set incorrectly" - ); - } - - require( - eigenPodBeacon.implementation() == address(eigenPodImplementation), - "eigenPodBeacon: implementation set incorrectly" - ); - } - - function _verifyInitialOwners() internal view { - require(strategyManager.owner() == executorMultisig, "strategyManager: owner not set correctly"); - require(delegation.owner() == executorMultisig, "delegation: owner not set correctly"); - require(slasher.owner() == executorMultisig, "slasher: owner not set correctly"); - require(eigenPodManager.owner() == executorMultisig, "delegation: owner not set correctly"); - - require(eigenLayerProxyAdmin.owner() == executorMultisig, "eigenLayerProxyAdmin: owner not set correctly"); - require(eigenPodBeacon.owner() == executorMultisig, "eigenPodBeacon: owner not set correctly"); - } - - function _checkPauserInitializations() internal view { - require(delegation.pauserRegistry() == eigenLayerPauserReg, "delegation: pauser registry not set correctly"); - require( - strategyManager.pauserRegistry() == eigenLayerPauserReg, - "strategyManager: pauser registry not set correctly" - ); - require(slasher.pauserRegistry() == eigenLayerPauserReg, "slasher: pauser registry not set correctly"); - require( - eigenPodManager.pauserRegistry() == eigenLayerPauserReg, - "eigenPodManager: pauser registry not set correctly" - ); - - require(eigenLayerPauserReg.isPauser(operationsMultisig), "pauserRegistry: operationsMultisig is not pauser"); - require(eigenLayerPauserReg.isPauser(executorMultisig), "pauserRegistry: executorMultisig is not pauser"); - require(eigenLayerPauserReg.isPauser(pauserMultisig), "pauserRegistry: pauserMultisig is not pauser"); - require(eigenLayerPauserReg.unpauser() == executorMultisig, "pauserRegistry: unpauser not set correctly"); - - for (uint256 i = 0; i < deployedStrategyArray.length; ++i) { - require( - deployedStrategyArray[i].pauserRegistry() == eigenLayerPauserReg, - "StrategyBaseTVLLimits: pauser registry not set correctly" - ); - require( - deployedStrategyArray[i].paused() == 0, - "StrategyBaseTVLLimits: init paused status set incorrectly" - ); - } - - // // pause *nothing* - // uint256 STRATEGY_MANAGER_INIT_PAUSED_STATUS = 0; - // // pause *everything* - // uint256 SLASHER_INIT_PAUSED_STATUS = type(uint256).max; - // // pause *everything* - // uint256 DELEGATION_INIT_PAUSED_STATUS = type(uint256).max; - // // pause *all of the proof-related functionality* (everything that can be paused other than creation of EigenPods) - // uint256 EIGENPOD_MANAGER_INIT_PAUSED_STATUS = (2**1) + (2**2) + (2**3) + (2**4); /* = 30 */ - // // pause *nothing* - require(strategyManager.paused() == 0, "strategyManager: init paused status set incorrectly"); - require(slasher.paused() == type(uint256).max, "slasher: init paused status set incorrectly"); - require(delegation.paused() == type(uint256).max, "delegation: init paused status set incorrectly"); - require(eigenPodManager.paused() == 30, "eigenPodManager: init paused status set incorrectly"); - } - - function _verifyInitializationParams() internal { - // // one week in blocks -- 50400 - // uint32 STRATEGY_MANAGER_INIT_WITHDRAWAL_DELAY_BLOCKS = 7 days / 12 seconds; - // require(strategyManager.withdrawalDelayBlocks() == 7 days / 12 seconds, - // "strategyManager: withdrawalDelayBlocks initialized incorrectly"); - // uint256 REQUIRED_BALANCE_WEI = 32 ether; - - require( - strategyManager.strategyWhitelister() == operationsMultisig, - "strategyManager: strategyWhitelister address not set correctly" - ); - - require( - baseStrategyImplementation.strategyManager() == strategyManager, - "baseStrategyImplementation: strategyManager set incorrectly" - ); - - require( - eigenPodImplementation.ethPOS() == ethPOSDeposit, - "eigenPodImplementation: ethPOSDeposit contract address not set correctly" - ); - require( - eigenPodImplementation.eigenPodManager() == eigenPodManager, - " eigenPodImplementation: eigenPodManager contract address not set correctly" - ); - - string memory config_data = vm.readFile(deployConfigPath); - for (uint i = 0; i < deployedStrategyArray.length; i++) { - uint256 maxPerDeposit = stdJson.readUint( - config_data, - string.concat(".strategies[", vm.toString(i), "].max_per_deposit") - ); - uint256 maxDeposits = stdJson.readUint( - config_data, - string.concat(".strategies[", vm.toString(i), "].max_deposits") - ); - (uint256 setMaxPerDeposit, uint256 setMaxDeposits) = deployedStrategyArray[i].getTVLLimits(); - require(setMaxPerDeposit == maxPerDeposit, "setMaxPerDeposit not set correctly"); - require(setMaxDeposits == maxDeposits, "setMaxDeposits not set correctly"); - } - } -} diff --git a/script/deploy/mainnet/M2Deploy.s.sol b/script/deploy/mainnet/M2Deploy.s.sol deleted file mode 100644 index 4a6c0daa3..000000000 --- a/script/deploy/mainnet/M2Deploy.s.sol +++ /dev/null @@ -1,327 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.12; - -import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol"; -import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; -import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; - -import "../../../src/contracts/interfaces/IETHPOSDeposit.sol"; - -import "../../../src/contracts/core/StrategyManager.sol"; -import "../../../src/contracts/core/Slasher.sol"; -import "../../../src/contracts/core/DelegationManager.sol"; - -import "../../../src/contracts/pods/EigenPod.sol"; -import "../../../src/contracts/pods/EigenPodManager.sol"; - -import "../../../src/contracts/permissions/PauserRegistry.sol"; - -import "forge-std/Script.sol"; -import "forge-std/Test.sol"; - -// # To load the variables in the .env file -// source .env - -// # To deploy and verify our contract -// forge script script/milestone/M2Deploy.s.sol:M2Deploy --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast -vvvv -contract M2Deploy is Script, Test { - Vm cheats = Vm(HEVM_ADDRESS); - - string public m1DeploymentOutputPath; - string public m2DeploymentOutputPath; - - // EigenLayer core contracts - ISlasher public slasher; - IDelegationManager public delegation; - DelegationManager public delegationImplementation; - IStrategyManager public strategyManager; - StrategyManager public strategyManagerImplementation; - IEigenPodManager public eigenPodManager; - EigenPodManager public eigenPodManagerImplementation; - IBeacon public eigenPodBeacon; - EigenPod public eigenPodImplementation; - - // Eigenlayer Proxy Admin - ProxyAdmin public eigenLayerProxyAdmin; - - // BeaconChain deposit contract - IETHPOSDeposit public ethPOS; - - // RPC url to fork from for pre-upgrade state change tests - string public rpcUrl; - - // Pre-upgrade values to check post-upgrade - address public strategyWhitelister; - bytes32 public withdrawalDelayBlocksStorageSlot = bytes32(uint256(204)); // 0xcc == 204 - uint256 public withdrawalsQueuedStorageSlot = 208; //0xd0 = 208 - uint256 public withdrawalDelayBlocks; - bytes32 public delegationManagerDomainSeparator; - uint256 public numPods; - - // Pointers to pre-upgrade values for lstDepositor - address public lstDepositor; - uint256 public stakerStrategyListLength; - uint256[] public stakerStrategyShares; // Array of shares in each strategy - IStrategy[] public stakerStrategyList; // Array of strategies staker has deposited into - IERC20[] public tokensToWithdraw; - - // Pointers to pre-upgrade values for eigenPodDepositor - address public eigenPodDepositor; - IEigenPod public eigenPod; - address public eigenPodOwner; - bool public hasPod; - uint64 public mostRecentWithdrawalBlock; - - function run() external { - // Read and log the chain ID - uint256 chainId = block.chainid; - emit log_named_uint("You are deploying on ChainID", chainId); - - // Update deployment path addresses if on mainnet - if (chainId == 1) { - m1DeploymentOutputPath = string(bytes("script/output/M1_deployment_mainnet_2023_6_9.json")); - m2DeploymentOutputPath = "script/output/M2_deployment_data_mainnet.json"; - rpcUrl = "RPC_MAINNET"; - } else if (chainId == 5) { - m1DeploymentOutputPath = string(bytes("script/output/M1_deployment_goerli_2023_3_23.json")); - m2DeploymentOutputPath = "script/output/M2_deployment_data_goerli.json"; - rpcUrl = "RPC_GOERLI"; - } else { - revert("Chain not supported"); - } - - // Read json data - string memory deployment_data = vm.readFile(m1DeploymentOutputPath); - slasher = Slasher(stdJson.readAddress(deployment_data, ".addresses.slasher")); - delegation = slasher.delegation(); - strategyManager = slasher.strategyManager(); - eigenPodManager = strategyManager.eigenPodManager(); - eigenPodBeacon = eigenPodManager.eigenPodBeacon(); - ethPOS = eigenPodManager.ethPOS(); - - eigenLayerProxyAdmin = ProxyAdmin(stdJson.readAddress(deployment_data, ".addresses.eigenLayerProxyAdmin")); - - // Store pre-upgrade values to check against later - strategyWhitelister = strategyManager.strategyWhitelister(); - delegationManagerDomainSeparator = IDelegationManagerV0(address(delegation)).DOMAIN_SEPARATOR(); - numPods = eigenPodManager.numPods(); - - // Set chain-specific values - IStrategy[] memory strategyArray = new IStrategy[](1); - uint256[] memory shareAmounts = new uint256[](1); - if (chainId == 1) { - // no-op for now - } else if (chainId == 5) { - // Set LST Depositor values - lstDepositor = 0x01e453D2465cEC1BD2ac9aed06115Fbf28482b33; - strategyArray[0] = IStrategy(0x879944A8cB437a5f8061361f82A6d4EED59070b5); - shareAmounts[0] = 188647761812080108; - tokensToWithdraw.push(IERC20(0x178E141a0E3b34152f73Ff610437A7bf9B83267A)); - - // Set eigenPod owner values - eigenPodDepositor = 0xE9D04433bac1bd584B0493cbaBa170CCCBDA8F00; - } else { - revert("chain ID not supported"); - } - - // Store LST depositor pre-upgrade values - stakerStrategyListLength = strategyManager.stakerStrategyListLength(lstDepositor); - (stakerStrategyList, stakerStrategyShares) = strategyManager.getDeposits(lstDepositor); - - // Store eigenPod owner pre-ugprade values - eigenPod = eigenPodManager.ownerToPod(eigenPodDepositor); - require(address(eigenPod).balance > 0, "eigenPod to test has balance of 0"); - hasPod = eigenPodManager.hasPod(eigenPodDepositor); - eigenPodOwner = eigenPod.podOwner(); - mostRecentWithdrawalBlock = m1EigenPod(address(eigenPod)).mostRecentWithdrawalBlockNumber(); - - // Begin deployment - vm.startBroadcast(); - - // Deploy new implmementation contracts - delegationImplementation = new DelegationManager(strategyManager, slasher, eigenPodManager); - strategyManagerImplementation = new StrategyManager(delegation, eigenPodManager, slasher); - eigenPodManagerImplementation = new EigenPodManager( - ethPOS, - eigenPodBeacon, - strategyManager, - slasher, - delegation - ); - eigenPodImplementation = new EigenPod({ - _ethPOS: ethPOS, - _eigenPodManager: eigenPodManager, - _GENESIS_TIME: 1616508000 - }); - - vm.stopBroadcast(); - - // Write json data out - string memory parent_object = "parent object"; - string memory deployed_addresses = "addresses"; - - // Serialize proxy and non-deployed addresses - vm.serializeAddress(deployed_addresses, "slasher", address(slasher)); - vm.serializeAddress(deployed_addresses, "delegation", address(delegation)); - vm.serializeAddress(deployed_addresses, "strategyManager", address(strategyManager)); - vm.serializeAddress(deployed_addresses, "eigenPodManager", address(eigenPodManager)); - vm.serializeAddress(deployed_addresses, "eigenPodBeacon", address(eigenPodBeacon)); - vm.serializeAddress(deployed_addresses, "ethPOS", address(ethPOS)); - - // Serialize new implementation addresses - vm.serializeAddress(deployed_addresses, "delegationImplementation", address(delegationImplementation)); - vm.serializeAddress( - deployed_addresses, - "strategyManagerImplementation", - address(strategyManagerImplementation) - ); - vm.serializeAddress( - deployed_addresses, - "eigenPodManagerImplementation", - address(eigenPodManagerImplementation) - ); - string memory deployed_addresses_output = vm.serializeAddress( - deployed_addresses, - "eigenPodImplementation", - address(eigenPodImplementation) - ); - - // Add chain info - string memory chain_info = "chainInfo"; - vm.serializeUint(chain_info, "deploymentBlock", block.number); - string memory chain_info_output = vm.serializeUint(chain_info, "chainId", chainId); - - // Save addresses - vm.serializeString(parent_object, deployed_addresses, deployed_addresses_output); - string memory finalJson = vm.serializeString(parent_object, chain_info, chain_info_output); - - // Write output to file - vm.writeJson(finalJson, m2DeploymentOutputPath); - - // Perform post-upgrade tests - simulatePerformingUpgrade(); - checkUpgradeCorrectness(); - } - - function simulatePerformingUpgrade() public { - cheats.startPrank(eigenLayerProxyAdmin.owner()); - eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(delegation))), - address(delegationImplementation) - ); - eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(strategyManager))), - address(strategyManagerImplementation) - ); - eigenLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(eigenPodManager))), - address(eigenPodManagerImplementation) - ); - cheats.stopPrank(); - - // Upgrade beacon - cheats.prank(UpgradeableBeacon(address(eigenPodBeacon)).owner()); - UpgradeableBeacon(address(eigenPodBeacon)).upgradeTo(address(eigenPodImplementation)); - } - - function checkUpgradeCorrectness() public { - _verifyStorageSlots(); - - _verifyContractsInitialized(); - - _verifyEigenPodCorrectness(); - } - - // Call contracts to ensure that all simple view functions return the same values (e.g. the return value of `StrategyManager.delegation()` hasn’t changed) - // StrategyManager: delegation, eigenPodManager, slasher, strategyWhitelister, withdrawalDelayBlocks all unchanged - // DelegationManager: DOMAIN_SEPARATOR, strategyManager, slasher, eigenPodManager all unchanged - // EigenPodManager: ethPOS, eigenPodBeacon, strategyManager, slasher, numPods all unchanged - // delegationManager is now correct (added immutable) - // Call contracts to make sure they are still “initialized” (ensure that trying to call initializer reverts) - function _verifyStorageSlots() internal view { - // StrategyManager: Check view functions return pre-upgraded values - require(strategyManager.delegation() == delegation, "strategyManager.delegation incorrect"); - require(strategyManager.eigenPodManager() == eigenPodManager, "strategyManager.eigenPodManager incorrect"); - require(strategyManager.slasher() == slasher, "strategyManager.slasher incorrect"); - require( - strategyManager.strategyWhitelister() == strategyWhitelister, - "strategyManager.strategyWhitelister incorrect" - ); - require( - cheats.load(address(strategyManager), withdrawalDelayBlocksStorageSlot) == bytes32(withdrawalDelayBlocks), - "strategyManager.withdrawalDelayBlocks incorrect" - ); - // DelegationManager: Check view functions return pre-upgraded values - require(DelegationManagerStorage(address(delegation)).strategyManager() == strategyManager, "delegation.strategyManager incorrect"); - require( - delegation.domainSeparator() == delegationManagerDomainSeparator, - "delegation.domainSeparator incorrect" - ); - require(DelegationManagerStorage(address(delegation)).slasher() == slasher, "delegation.slasher incorrect"); - require(DelegationManagerStorage(address(delegation)).eigenPodManager() == eigenPodManager, "delegation.eigenPodManager incorrect"); - // EigenPodManager: check view functions return pre-upgraded values - require(eigenPodManager.ethPOS() == ethPOS, "eigenPodManager.ethPOS incorrect"); - require(eigenPodManager.eigenPodBeacon() == eigenPodBeacon, "eigenPodManager.eigenPodBeacon incorrect"); - require(eigenPodManager.strategyManager() == strategyManager, "eigenPodManager.strategyManager incorrect"); - require(eigenPodManager.slasher() == slasher, "eigenPodManager.slasher incorrect"); - require(eigenPodManager.numPods() == numPods, "eigenPodManager.numPods incorrect"); - require(EigenPodManagerStorage(address(eigenPodManager)).delegationManager() == delegation, "eigenPodManager.delegationManager incorrect"); - } - - function _verifyContractsInitialized() internal { - // Check that contracts are unable to be re-initialized - cheats.expectRevert(bytes("Initializable: contract is already initialized")); - StrategyManager(address(strategyManager)).initialize( - address(this), - address(this), - PauserRegistry(address(this)), - 0 - ); - - IStrategy[] memory strategyArray = new IStrategy[](0); - uint256[] memory withdrawalDelayBlocksArray = new uint256[](0); - cheats.expectRevert(bytes("Initializable: contract is already initialized")); - DelegationManager(address(delegation)).initialize( - address(this), - PauserRegistry(address(this)), - 0, // initialPausedStatus - 0, // minWithdrawalDelayBLocks - strategyArray, - withdrawalDelayBlocksArray - ); - - cheats.expectRevert(bytes("Initializable: contract is already initialized")); - EigenPodManager(address(eigenPodManager)).initialize( - address(this), - PauserRegistry(address(this)), - 0 - ); - } - - function _verifyEigenPodCorrectness() public { - // Check that state is correct - require( - address(eigenPodManager.ownerToPod(eigenPodDepositor)) == address(eigenPod), - "eigenPodManager.ownerToPod incorrect" - ); - require(eigenPodManager.hasPod(eigenPodDepositor) == hasPod, "eigenPodManager.hasPod incorrect"); - require(eigenPod.podOwner() == eigenPodOwner, "eigenPod.podOwner incorrect"); - - // Unpause eigenpods verify credentials - uint256 paused = IPausable(address(eigenPodManager)).paused(); - cheats.prank(IPauserRegistry(IPausable(address(eigenPodManager)).pauserRegistry()).unpauser()); - IPausable(address(eigenPodManager)).unpause(paused ^ (1 << 2)); // eigenpods verify credentials on 2nd bit - - cheats.prank(eigenPodOwner); - eigenPod.startCheckpoint(false); - } -} - -interface IDelegationManagerV0 { - function DOMAIN_SEPARATOR() external view returns (bytes32); -} - -interface m1EigenPod { - function mostRecentWithdrawalBlockNumber() external view returns (uint64); -} diff --git a/script/deploy/holesky/v040-rc4-holesky-preprod-pepe.s.sol b/script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol similarity index 50% rename from script/deploy/holesky/v040-rc4-holesky-preprod-pepe.s.sol rename to script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol index be8c74a57..9d3447e07 100644 --- a/script/deploy/holesky/v040-rc4-holesky-preprod-pepe.s.sol +++ b/script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol @@ -1,67 +1,59 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.12; +import "@openzeppelin/contracts/utils/Create2.sol"; 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/v040-rc4-holesky-preprod-pepe.s.sol --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv - * forge script script/deploy/holesky/v040-rc4-holesky-preprod-pepe.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --verify --broadcast -vvvv + * FORK LOCAL + * anvil --fork-url $RPC_MAINNET + * forge script script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol:MainnetPEPEDeploy --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvvv + * + * MAINNET + * forge script script/deploy/mainnet/v0.4.2-mainnet-pepe.s.sol:MainnetPEPEDeploy --rpc-url $RPC_MAINNET --private-key $PRIVATE_KEY --verify --broadcast -vvvv + * */ -contract EigenPod_Checkpoint_Deploy_Preprod is ExistingDeploymentParser { - - address testAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; - address initOwner = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; - +contract MainnetPEPEDeploy is ExistingDeploymentParser { function run() external virtual { _parseInitialDeploymentParams( - "script/configs/holesky/eigenlayer_preprod.config.json" + "script/configs/mainnet/mainnet-config.config.json" ); _parseDeployedContracts( - "script/configs/holesky/eigenlayer_addresses_preprod.config.json" + "script/configs/mainnet/mainnet-addresses.config.json" ); - emit log_named_address("Deployer Address", msg.sender); - // START RECORDING TRANSACTIONS FOR DEPLOYMENT vm.startBroadcast(); - _upgradeEigenPods(); - _upgradeEigenPodManager(); + emit log_named_address("Deployer Address", msg.sender); + + _deployPEPE(); // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT vm.stopBroadcast(); - // Sanity Checks + _upgradePEPE(); + + _testDeploy(); + + // Post-upgrade sanity checks _verifyContractPointers(); _verifyImplementations(); _verifyContractsInitialized(); _verifyInitializationParams(); - logAndOutputContractAddresses("script/output/holesky/v040-rc4.output.json"); + logAndOutputContractAddresses("script/output/mainnet/v0.4.2-mainnet-pepe.output.json"); } - /** - * @notice Deploy EigenPod Implementation for Holesky preprod and upgrade the beacon - */ - function _upgradeEigenPods() internal { - // Deploy implementation + function _deployPEPE() internal { + // Deploy EigenPod eigenPodImplementation = new EigenPod( IETHPOSDeposit(ETHPOSDepositAddress), eigenPodManager, EIGENPOD_GENESIS_TIME ); - // upgrade UpgradeableBeacon - eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); - } - - /** - * @notice Deploy EPM Implementation for Holesky preprod and upgrade its proxy - */ - function _upgradeEigenPodManager() internal { - // Deploy implementation + // Deploy EigenPodManager eigenPodManagerImplementation = new EigenPodManager( IETHPOSDeposit(ETHPOSDepositAddress), eigenPodBeacon, @@ -69,11 +61,24 @@ contract EigenPod_Checkpoint_Deploy_Preprod is ExistingDeploymentParser { slasher, delegationManager ); + } + + function _upgradePEPE() internal { + vm.startPrank(address(executorMultisig)); + + // upgrade UpgradeableBeacon + eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); // upgrade TUPS eigenLayerProxyAdmin.upgrade( TransparentUpgradeableProxy(payable(address(eigenPodManager))), address(eigenPodManagerImplementation) ); + + vm.stopPrank(); + } + + function _testDeploy() internal { + require(eigenPodImplementation.activeValidatorCount() == 0, "unable to fetch activeValidatorCount"); } } diff --git a/script/output/mainnet/M1_deployment_mainnet_2023_6_9.json b/script/output/mainnet/M1_deployment_mainnet_2023_6_9.json deleted file mode 100644 index 85916bdb1..000000000 --- a/script/output/mainnet/M1_deployment_mainnet_2023_6_9.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "addresses": { - "avsDirectory": "0x0000000000000000000000000000000000000000", - "avsDirectoryImplementation": "0x0000000000000000000000000000000000000000", - "baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3", - "beaconOracle": "0x0000000000000000000000000000000000000000", - "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", - "strategies": { - "cbETH": "0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc", - "stETH": "0x93c4b944D05dfe6df7645A86cd2206016c51564D", - "rETH": "0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2" - }, - "strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A", - "strategyManagerImplementation": "0x5d25EEf8CfEdaA47d31fE2346726dE1c21e342Fb" - }, - "chainInfo": { - "chainId": 1, - "deploymentBlock": 17445559 - }, - "parameters": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - }, - "numStrategies": 0 -} \ No newline at end of file diff --git a/script/output/mainnet/M2_mainnet_upgrade.output.json b/script/output/mainnet/M2_mainnet_upgrade.output.json deleted file mode 100644 index e9de0f32e..000000000 --- a/script/output/mainnet/M2_mainnet_upgrade.output.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "addresses": { - "avsDirectory": "0x135DDa560e946695d6f155dACaFC6f1F25C1F5AF", - "avsDirectoryImplementation": "0xdAbdB3Cd346B7D5F5779b0B614EdE1CC9DcBA5b7", - "baseStrategyImplementation": "0xdfdA04f980bE6A64E3607c95Ca26012Ab9aA46d3", - "beaconOracle": "0x343907185b71aDF0eBa9567538314396aa985442", - "delayedWithdrawalRouter": "0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8", - "delayedWithdrawalRouterImplementation": "0x4bB6731B02314d40aBbfFBC4540f508874014226", - "delegationManager": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A", - "delegationManagerImplementation": "0x1784BE6401339Fc0Fedf7E9379409f5c1BfE9dda", - "eigenLayerPauserReg": "0x0c431C66F4dE941d089625E5B423D00707977060", - "eigenLayerProxyAdmin": "0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444", - "eigenPodBeacon": "0x5a2a4F2F3C18f09179B6703e63D9eDD165909073", - "eigenPodImplementation": "0x8bA40dA60f0827d027F029aCEE62609F0527a255", - "eigenPodManager": "0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338", - "eigenPodManagerImplementation": "0xe4297e3DaDBc7D99e26a2954820f514CB50C5762", - "emptyContract": "0x1f96861fEFa1065a5A96F20Deb6D8DC3ff48F7f9", - "slasher": "0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd", - "slasherImplementation": "0xF3234220163a757edf1E11a8a085638D9B236614", - "strategies": "", - "strategyManager": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A", - "strategyManagerImplementation": "0x70f44C13944d49a236E3cD7a94f48f5daB6C619b" - }, - "chainInfo": { - "chainId": 1, - "deploymentBlock": 19492753 - }, - "parameters": { - "communityMultisig": "0xFEA47018D632A77bA579846c840d5706705Dc598", - "executorMultisig": "0x369e6F597e22EaB55fFb173C6d9cD234BD699111", - "operationsMultisig": "0xBE1685C81aA44FF9FB319dD389addd9374383e90", - "pauserMultisig": "0x5050389572f2d220ad927CcbeA0D406831012390", - "timelock": "0xA6Db1A8C5a981d1536266D2a393c5F8dDb210EAF" - } -} \ No newline at end of file diff --git a/script/utils/ExistingDeploymentParser.sol b/script/utils/ExistingDeploymentParser.sol index cef8880b9..19f9f8bb9 100644 --- a/script/utils/ExistingDeploymentParser.sol +++ b/script/utils/ExistingDeploymentParser.sol @@ -140,6 +140,9 @@ contract ExistingDeploymentParser is Script, Test { uint256 configChainId = stdJson.readUint(existingDeploymentData, ".chainInfo.chainId"); require(configChainId == currentChainId, "You are on the wrong chain for this config"); + emit log_named_string("Using addresses file", existingDeploymentInfoPath); + emit log_named_string("- Last Updated", stdJson.readString(existingDeploymentData, ".lastUpdated")); + // read all of the deployed addresses executorMultisig = stdJson.readAddress(existingDeploymentData, ".parameters.executorMultisig"); operationsMultisig = stdJson.readAddress(existingDeploymentData, ".parameters.operationsMultisig"); @@ -246,6 +249,9 @@ contract ExistingDeploymentParser is Script, Test { uint256 configChainId = stdJson.readUint(initialDeploymentData, ".chainInfo.chainId"); require(configChainId == currentChainId, "You are on the wrong chain for this config"); + emit log_named_string("Using config file", initialDeploymentParamsPath); + emit log_named_string("- Last Updated", stdJson.readString(initialDeploymentData, ".lastUpdated")); + // read all of the deployed addresses executorMultisig = stdJson.readAddress(initialDeploymentData, ".multisig_addresses.executorMultisig"); operationsMultisig = stdJson.readAddress(initialDeploymentData, ".multisig_addresses.operationsMultisig"); @@ -316,9 +322,6 @@ contract ExistingDeploymentParser is Script, Test { ); // EigenPod EIGENPOD_GENESIS_TIME = uint64(stdJson.readUint(initialDeploymentData, ".eigenPod.GENESIS_TIME")); - EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR = uint64( - stdJson.readUint(initialDeploymentData, ".eigenPod.MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR") - ); ETHPOSDepositAddress = stdJson.readAddress(initialDeploymentData, ".ethPOSDepositAddress"); logInitialDeploymentParams(); @@ -505,10 +508,10 @@ contract ExistingDeploymentParser is Script, Test { // rewardsCoordinator.owner() == executorMultisig, // "rewardsCoordinator: owner not set correctly" // ); - require( - rewardsCoordinator.paused() == REWARDS_COORDINATOR_INIT_PAUSED_STATUS, - "rewardsCoordinator: init paused status set incorrectly" - ); + // require( + // rewardsCoordinator.paused() == REWARDS_COORDINATOR_INIT_PAUSED_STATUS, + // "rewardsCoordinator: init paused status set incorrectly" + // ); require( rewardsCoordinator.MAX_REWARDS_DURATION() == REWARDS_COORDINATOR_MAX_REWARDS_DURATION, "rewardsCoordinator: maxRewardsDuration not set correctly" @@ -646,10 +649,6 @@ contract ExistingDeploymentParser is Script, Test { // 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_GENESIS_TIME", EIGENPOD_GENESIS_TIME); - emit log_named_uint( - "EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR", - EIGENPOD_MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR - ); emit log_named_address("ETHPOSDepositAddress", ETHPOSDepositAddress); emit log_string("==== Strategies to Deploy ===="); diff --git a/src/test/integration/IntegrationDeployer.t.sol b/src/test/integration/IntegrationDeployer.t.sol index d60a52d05..8181a3ee7 100644 --- a/src/test/integration/IntegrationDeployer.t.sol +++ b/src/test/integration/IntegrationDeployer.t.sol @@ -651,7 +651,7 @@ abstract contract IntegrationDeployer is ExistingDeploymentParser { isUpgraded = true; } else if (forkType == MAINNET) { // cheats.selectFork(mainnetForkId); - string memory deploymentInfoPath = "script/configs/mainnet/Mainnet_current_deployment.config.json"; + string memory deploymentInfoPath = "script/configs/mainnet/mainnet-addresses.config.json"; _parseDeployedContracts(deploymentInfoPath); // Unpause to enable deposits and withdrawals for initializing random user state