Skip to content

Commit

Permalink
build: edasm upgrade scripts for rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
8sunyuan committed Jun 21, 2024
1 parent c5de108 commit 812088f
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 10 deletions.
26 changes: 16 additions & 10 deletions contracts/script/deploy/holesky/EigenDASM_RewardsUpgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ import {EigenDAServiceManager} from "../../../src/core/EigenDAServiceManager.sol
*/
contract ServiceManagerBaseUpgrade is ExistingDeploymentParser {
// Hardcode these values to your needs
address public serviceManager = 0x54A03db2784E3D0aCC08344D05385d0b62d4F432;
address public serviceManagerImplementation = 0xFe779fB43280A92cd85466312E2AE8A4F1A48007;
address public serviceManager = 0x70Ea1434d78271Bc1e152AD6c9F46323ca3dAf2a;
address public serviceManagerImplementation = 0x0F90D5C82DF783513FaA6a9961AdD248F3cF66cf;

ProxyAdmin public avsProxyAdmin = ProxyAdmin(0x9Fd7E279f5bD692Dc04792151E14Ad814FC60eC1);
address deployerAddress = 0xDA29BB71669f46F2a779b4b62f03644A84eE3479;
address registryCoordinator = 0x2c61EA360D6500b58E7f481541A36B443Bc858c6;
Expand All @@ -45,10 +46,10 @@ contract ServiceManagerBaseUpgrade is ExistingDeploymentParser {
function run(string memory deployArg) external {
// 1. Setup and parse existing EigenLayer Holesky preprod contracts
_parseInitialDeploymentParams(
"script/deploy/holesky/config/eigenlayer_preprod.config.json"
"script/deploy/holesky/config/eigenlayer.config.json"
);
_parseDeployedContracts(
"script/deploy/holesky/config/eigenlayer_preprod_addresses.config.json"
"script/deploy/holesky/config/eigenlayer_addresses.config.json"
);

// 2. broadcast deployment
Expand Down Expand Up @@ -132,18 +133,20 @@ contract ServiceManagerBaseUpgrade is ExistingDeploymentParser {

/// @notice Example createAVSRewardsSubmission call with the ServiceManager
function _createAVSRewardsSubmission() internal {

uint256 mockTokenInitialSupply = 1e30;
address stETHStrategy = 0x5C8b55722f421556a2AAfb7A3EA63d4c3e514312;
address rETHStrategy = 0x87f6C7d24b109919eB38295e3F8298425e6331D9;
// actual strategy addresses
address stETHStrategy = 0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3;
address rETHStrategy = 0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0;

IRewardsCoordinator.StrategyAndMultiplier[] memory strategyAndMultipliers = new IRewardsCoordinator.StrategyAndMultiplier[](2);
// Strategy addresses must be in ascending order
strategyAndMultipliers[0] = IRewardsCoordinator.StrategyAndMultiplier({
strategy: IStrategy(stETHStrategy),
strategy: IStrategy(rETHStrategy),
multiplier: 1e18
});
strategyAndMultipliers[1] = IRewardsCoordinator.StrategyAndMultiplier({
strategy: IStrategy(rETHStrategy),
strategy: IStrategy(stETHStrategy),
multiplier: 1e18
});

Expand All @@ -160,7 +163,7 @@ contract ServiceManagerBaseUpgrade is ExistingDeploymentParser {
// amount <= 1e38 - 1
uint256 amount = 100e18;

// 2. Create RewardsSubmission input param
// Create RewardsSubmission input param
IRewardsCoordinator.RewardsSubmission[]
memory rewardsSubmissions = new IRewardsCoordinator.RewardsSubmission[](1);
rewardsSubmissions[0] = IRewardsCoordinator.RewardsSubmission({
Expand All @@ -171,6 +174,9 @@ contract ServiceManagerBaseUpgrade is ExistingDeploymentParser {
duration: duration
});

// Set rewardsInitiator
EigenDAServiceManager(serviceManager).setRewardsInitiator(msg.sender);

token.approve(serviceManager, amount);
EigenDAServiceManager(serviceManager).createAVSRewardsSubmission(rewardsSubmissions);
}
Expand All @@ -179,7 +185,7 @@ contract ServiceManagerBaseUpgrade is ExistingDeploymentParser {
function _verifyUpgrade() internal virtual {
// Preprod RewardsCoordinator
require(
address(rewardsCoordinator) == 0xb22Ef643e1E067c994019A4C19e403253C05c2B0,
address(rewardsCoordinator) == 0xAcc1fb458a1317E886dB376Fc8141540537E68fE,
"ServiceManagerBaseUpgrade: RewardsCoordinator address is incorrect"
);
require(
Expand Down
58 changes: 58 additions & 0 deletions contracts/script/deploy/holesky/config/eigenlayer.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"chainInfo": {
"chainId": 17000
},
"multisig_addresses": {
"pauserMultisig": "0x53410249ec7d3a3F9F1ba3912D50D6A3Df6d10A7",
"communityMultisig": "0xCb8d2f9e55Bc7B1FA9d089f9aC80C583D2BDD5F7",
"operationsMultisig": "0xfaEF7338b7490b9E272d80A1a39f4657cAf2b97d",
"executorMultisig": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
},
"strategies": {
"numStrategies": 0,
"MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"strategiesToDeploy": []
},
"strategyManager": {
"init_strategy_whitelister": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"init_paused_status": 0
},
"delegationManager": {
"init_paused_status": 0,
"init_minWithdrawalDelayBlocks": 10
},
"rewardsCoordinator": {
"init_paused_status": 0,
"CALCULATION_INTERVAL_SECONDS": 604800,
"MAX_REWARDS_DURATION": 6048000,
"MAX_RETROACTIVE_LENGTH": 7776000,
"MAX_FUTURE_LENGTH": 2592000,
"GENESIS_REWARDS_TIMESTAMP": 1710979200,
"rewards_updater_address": "0x18a0f92Ad9645385E8A8f3db7d0f6CF7aBBb0aD4",
"activation_delay": 7200,
"calculation_interval_seconds": 604800,
"global_operator_commission_bips": 1000
},
"avsDirectory": {
"init_paused_status": 0
},
"slasher": {
"init_paused_status": 0
},
"eigenPod": {
"MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": 32000000000,
"GENESIS_TIME": 1695902400
},
"eigenPodManager": {
"init_paused_status": 0,
"deneb_fork_timestamp": "1707305664"
},
"delayedWithdrawalRouter": {
"init_paused_status": 0,
"init_withdrawalDelayBlocks": 10
},
"ethPOSDepositAddress": "0x4242424242424242424242424242424242424242",
"beaconOracleAddress": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"addresses": {
"avsDirectory": "0x055733000064333CaDDbC92763c58BF0192fFeBf",
"avsDirectoryImplementation": "0xEF5BA995Bc7722fd1e163edF8Dc09375de3d3e3a",
"baseStrategyImplementation": "0xFb83e1D133D0157775eC4F19Ff81478Df1103305",
"beaconOracle": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25",
"delayedWithdrawalRouter": "0x642c646053eaf2254f088e9019ACD73d9AE0FA32",
"delayedWithdrawalRouterImplementation": "0xcE8b8D99773a718423F8040a6e52c06a4ce63407",
"delegationManager": "0xA44151489861Fe9e3055d95adC98FbD462B948e7",
"delegationManagerImplementation": "0x83f8F8f0BB125F7870F6bfCf76853f874C330D76",
"eigenLayerPauserReg": "0x85Ef7299F8311B25642679edBF02B62FA2212F06",
"eigenLayerProxyAdmin": "0xDB023566064246399b4AE851197a97729C93A6cf",
"eigenPodBeacon": "0x7261C2bd75a7ACE1762f6d7FAe8F63215581832D",
"eigenPodImplementation": "0xe98f9298344527608A1BCC23907B8145F9Cb641c",
"eigenPodManager": "0x30770d7E3e71112d7A6b7259542D1f680a70e315",
"eigenPodManagerImplementation": "0x5265C162f7d5F3fE3175a78828ab16bf5E324a7B",
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2",
"slasher": "0xcAe751b75833ef09627549868A04E32679386e7C",
"slasherImplementation": "0x99715D255E34a39bE9943b82F281CA734bcF345A",
"numStrategiesDeployed": 10,
"strategies": {
"WETH": "0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9",
"rETH": "0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"stETH": "0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"ETHx": "0x31B6F59e1627cEfC9fA174aD03859fC337666af7",
"cbETH": "0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6",
"sfrxETH": "0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c",
"lsETH": "0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"osETH": "0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef",
"mETH": "0xaccc5A86732BE85b5012e8614AF237801636F8e5",
"ankrETH" :"0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac"
},
"strategyAddresses": [
"0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9",
"0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
"0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"0x31B6F59e1627cEfC9fA174aD03859fC337666af7",
"0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6",
"0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c",
"0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943",
"0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef",
"0xaccc5A86732BE85b5012e8614AF237801636F8e5",
"0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac"
],
"strategyManager": "0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6",
"strategyManagerImplementation": "0x59f766A603C53f3AC8Be43bBe158c1519b193a18",
"rewardsCoordinator": "0xAcc1fb458a1317E886dB376Fc8141540537E68fE",
"rewardsCoordinatorImplementation": "0x123C1A3543DBCA3f704E703dDda7FAAaA8e43D02",
"token": {
"tokenProxyAdmin": "0x67482666771e82C9a73BB9e9A22B2B597f448BBf",
"EIGEN": "0x3B78576F7D6837500bA3De27A60c7f594934027E",
"bEIGEN": "0x275cCf9Be51f4a6C94aBa6114cdf2a4c45B9cb27",
"EIGENImpl": "0x083bC9e0DCF2C3e13E24686e5202232995578c5a",
"bEIGENImpl": "0x4500927874Ad41538c1bEF2F5278E7a86DF6bce8",
"eigenStrategy": "0x43252609bff8a13dFe5e057097f2f45A24387a84",
"eigenStrategyImpl": "0x94650e09a471CEF96e7966cabf26718FBf352697"
}
},
"chainInfo": {
"chainId": 17000,
"deploymentBlock": 1195642
},
"parameters": {
"communityMultisig": "0xCb8d2f9e55Bc7B1FA9d089f9aC80C583D2BDD5F7",
"executorMultisig": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",
"operationsMultisig": "0xfaEF7338b7490b9E272d80A1a39f4657cAf2b97d",
"pauserMultisig": "0x53410249ec7d3a3F9F1ba3912D50D6A3Df6d10A7",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
}
}

0 comments on commit 812088f

Please sign in to comment.