|
| 1 | +// SPDX-License-Identifier: BUSL-1.1 |
| 2 | +pragma solidity ^0.8.12; |
| 3 | + |
| 4 | +import "../../utils/ExistingDeploymentParser.sol"; |
| 5 | + |
| 6 | +/** |
| 7 | + * @notice Script used for upgrading EigenPod and EPM Implementation for Holesky preprod |
| 8 | + * anvil --fork-url $RPC_HOLESKY |
| 9 | + * 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 |
| 10 | + * forge script script/deploy/holesky/v040-rc5-holesky-preprod-pepe.s.sol --rpc-url $RPC_HOLESKY --private-key $PRIVATE_KEY --verify --broadcast -vvvv |
| 11 | + */ |
| 12 | +contract EigenPod_Checkpoint_Deploy_Preprod is ExistingDeploymentParser { |
| 13 | + |
| 14 | + address testAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; |
| 15 | + address initOwner = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479; |
| 16 | + |
| 17 | + function run() external virtual { |
| 18 | + _parseInitialDeploymentParams( |
| 19 | + "script/configs/holesky/eigenlayer_preprod.config.json" |
| 20 | + ); |
| 21 | + _parseDeployedContracts( |
| 22 | + "script/configs/holesky/eigenlayer_addresses_preprod.config.json" |
| 23 | + ); |
| 24 | + |
| 25 | + emit log_named_address("Deployer Address", msg.sender); |
| 26 | + |
| 27 | + // START RECORDING TRANSACTIONS FOR DEPLOYMENT |
| 28 | + vm.startBroadcast(); |
| 29 | + |
| 30 | + _upgradeEigenPods(); |
| 31 | + _upgradeEigenPodManager(); |
| 32 | + |
| 33 | + // STOP RECORDING TRANSACTIONS FOR DEPLOYMENT |
| 34 | + vm.stopBroadcast(); |
| 35 | + |
| 36 | + // Sanity Checks |
| 37 | + _verifyContractPointers(); |
| 38 | + _verifyImplementations(); |
| 39 | + _verifyContractsInitialized(); |
| 40 | + _verifyInitializationParams(); |
| 41 | + |
| 42 | + logAndOutputContractAddresses("script/output/holesky/v040-rc5.output.json"); |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * @notice Deploy EigenPod Implementation for Holesky preprod and upgrade the beacon |
| 47 | + */ |
| 48 | + function _upgradeEigenPods() internal { |
| 49 | + // Deploy implementation |
| 50 | + eigenPodImplementation = new EigenPod( |
| 51 | + IETHPOSDeposit(ETHPOSDepositAddress), |
| 52 | + eigenPodManager, |
| 53 | + EIGENPOD_GENESIS_TIME |
| 54 | + ); |
| 55 | + |
| 56 | + // upgrade UpgradeableBeacon |
| 57 | + eigenPodBeacon.upgradeTo(address(eigenPodImplementation)); |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * @notice Deploy EPM Implementation for Holesky preprod and upgrade its proxy |
| 62 | + */ |
| 63 | + function _upgradeEigenPodManager() internal { |
| 64 | + // Deploy implementation |
| 65 | + eigenPodManagerImplementation = new EigenPodManager( |
| 66 | + IETHPOSDeposit(ETHPOSDepositAddress), |
| 67 | + eigenPodBeacon, |
| 68 | + strategyManager, |
| 69 | + slasher, |
| 70 | + delegationManager |
| 71 | + ); |
| 72 | + |
| 73 | + // upgrade TUPS |
| 74 | + eigenLayerProxyAdmin.upgrade( |
| 75 | + TransparentUpgradeableProxy(payable(address(eigenPodManager))), |
| 76 | + address(eigenPodManagerImplementation) |
| 77 | + ); |
| 78 | + } |
| 79 | +} |
0 commit comments