Skip to content

Commit

Permalink
feat: wip refactor of deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wadealexc committed Aug 14, 2024
1 parent 00fc4b9 commit e870331
Show file tree
Hide file tree
Showing 9 changed files with 224 additions and 115 deletions.
10 changes: 10 additions & 0 deletions release/DeployAll.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pragma solidity ^0.8.12;

/**
* @notice Deploy the entire EigenLayer system to a target environment
* @dev This deploys the current branch's contracts
*/
contract DeployAll {

// TODO
}
32 changes: 32 additions & 0 deletions release/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Use Cases:
1. Fork a current deployment on any network, given a config file
* Use - simulating upgrades/changes to a current deployment
2. Deploy entire system from the current branch to any network
* Use - integration tests (mainly want to deploy locally)
3. Easily deploy/upgrade _specific_ contracts on any ENV
* Use - writing deploy/upgrade scripts
* Note: this should also update that env's config with new addresses

## Mock Command - Release/Upgrade Scripting

```
make release preprod
```

* Generates a script file (`preprod-<GIT_COMMIT_HEAD>.s.sol`) that automatically loads the config for the `preprod` environment
* `make release preprod --test preprod-<GIT_COMMIT_HEAD>.s.sol`:
* Run the script in "test mode", forking preprod locally via anvil and simulating the deploy and upgrade steps specified in the script.
* Aside from helpful console output, this should generate an output file (to a `.gitignored` directory) that shows what the new config values will be after running for real.
* `make release preprod --run preprod-<GIT_COMMIT_HEAD>.s.sol`:
* Run the script for real, submitting both deploy and upgrade transactions to preprod, then updating the preprod config with the new addresses
* If `holesky` or `mainnet` environments are used here, the `upgrade` step should generate multisig transactions that can be signed

## Mock Command - Deploying

```
make deploy preprod
```

* Deploys the entire system to `preprod` using the `DeployAll` script
* Generates an output file that gives the config for this new system. This is generated to a `.gitignored` directory, but if moved into the `config` folder, it can become a named, usable environment

Empty file added release/config/holesky.json
Empty file.
5 changes: 5 additions & 0 deletions release/config/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"addresses": {

}
}
115 changes: 115 additions & 0 deletions release/config/preprod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"environment": {
"chainid": 17000,
"name": "holesky-preprod",
"deployType": "EOA",
"upgradeType": "EOA"
},
// Addresses for multisigs, pauser, etc
"admin": {
"communityMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"executorMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"operationsMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"pauserRegistry": "0x9Ab2FEAf0465f0eD51Fc2b663eF228B418c9Dad1",
"proxyAdmin": "0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
},
// Addresses for core contracts
"addresses": {
"avsDirectory": {
"proxy": "0x141d6995556135D4997b2ff72EB443Be300353bC",
"impl": "0x357978adC03375BD6a3605DE055fABb84695d79A",
"config": {
"init_paused_status": 0
}
},
"delegationManager": {
"proxy": "0x75dfE5B44C2E530568001400D3f704bC8AE350CC",
"impl": "0x56E88cb4f0136fC27D95499dE4BE2acf47946Fa1",
"config": {
"init_paused_status": 0,
"init_minWithdrawalDelayBlocks": 10
}
},
"delayedWithdrawalRouter": {
"proxy": "0xC4BC46a87A67a531eCF7f74338E1FA79533334Fa",
"impl": "0x0011FA2c512063C495f77296Af8d195F33A8Dd38",
"config": {
"init_paused_status": 0,
"init_withdrawalDelayBlocks": 10
}
},
"eigenPod": {
"beacon": "0x92Cc4a800A1513E85C481dDDf3A06C6921211eaC",
"impl": "0x8Da4b953cbFb715624D98C0D2b4a7978462eFd38",
"config": {
"GENESIS_TIME": 1695902400
}
},
"eigenPodManager": {
"proxy": "0xB8d8952f572e67B11e43bC21250967772fa883Ff",
"impl": "0x10EBa780CCd9E5e9FFBe529C25046c076Be91048",
"config": {
"init_paused_status": 0
}
},
"rewardsCoordinator": {
"proxy": "0xb22Ef643e1E067c994019A4C19e403253C05c2B0",
"impl": "0x7C80B0d3aFBeF9Bbd03Aab72cD2d90a12c11D394",
"config": {
"init_paused_status": 0,
"CALCULATION_INTERVAL_SECONDS": 604800,
"MAX_REWARDS_DURATION": 6048000,
"MAX_RETROACTIVE_LENGTH": 7776000,
"MAX_FUTURE_LENGTH": 2592000,
"GENESIS_REWARDS_TIMESTAMP": 1710979200,
"rewards_updater_address": "0x18a0f92Ad9645385E8A8f3db7d0f6CF7aBBb0aD4",
"activation_delay": 120,
"calculation_interval_seconds": 604800,
"global_operator_commission_bips": 1000
}
},
"slasher": {
"proxy": "0x12699471dF8dca329C76D72823B1b79d55709384",
"impl": "0x9460fCe11E1e0365419fa860599903B4E5097cf0",
"config": {
"init_paused_status": 0
}
},
"strategyManager": {
"proxy": "0xF9fbF2e35D8803273E214c99BF15174139f4E67a",
"impl": "0x1a26B23a004C512350d7Dd89056655A80b850199",
"config": {
"init_paused_status": 0,
"init_strategy_whitelister": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348"
}
}
},
"strategies": {
"impl": "0x62450517EfA1CE60d79801daf8f95973865e8D40",
"config": {
"numStrategies": 0,
"MAX_PER_DEPOSIT": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
"MAX_TOTAL_DEPOSITS": 115792089237316195423570985008687907853269984665640564039457584007913129639935,
},
"addrs": []
},
"token": {
"bEIGEN": {
"proxy": "0xA72942289a043874249E60469F68f08B8c6ECCe8",
"impl": "0xd5FdabDac3d8ACeAB7BFfDDFA18877A4c5D5Aa82"
},
"EIGEN": {
"proxy": "0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926",
"impl": "0x95a7431400F362F3647a69535C5666cA0133CAA0"
},
"eigenStrategy": {
"proxy": "0xdcCF401fD121d8C542E96BC1d0078884422aFAD2",
"impl": "0x59D13E7Fb0bC0e57c1fc6594ff701592A6e4dD2B"
}
},
"misc": {
"beaconOracle": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25",
"ethPOS": "0x4242424242424242424242424242424242424242"
}
}
31 changes: 31 additions & 0 deletions release/scripts/preprod-ddf5gh.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pragma solidity ^0.8.12;

import "src/*";

contract preprod_ddf5gh is DeploymentUtils {

function deploy() external {
// Deploy contracts
EigenPod newPodImpl = new EigenPod(
cfg.ethPOS,
cfg.eigenPodManager.proxy,
cfg.eigenPod.GENESIS_TIME
);

EigenPodManager newPodManagerImpl = new EigenPodManager(
cfg.ethPOS,
cfg.eigenPod.beacon,
cfg.strategyManager.proxy,
cfg.slasher.proxy,
cfg.delegationManager.proxy
);

// Update preprod cfg
cfg.setImpl(EIGENPOD, address(newPodImpl));
cfg.setImpl(EIGENPODMANAGER, address(newPodManagerImpl));
}

function upgrade() external {
cfg.upgradeImpl(EIGENPOD);
}
}
54 changes: 27 additions & 27 deletions script/configs/holesky/eigenlayer_addresses_preprod.config.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"addresses": {
"avsDirectory": "0x141d6995556135D4997b2ff72EB443Be300353bC",
"avsDirectoryImplementation": "0x357978adC03375BD6a3605DE055fABb84695d79A",
"avsDirectory": "",
"avsDirectoryImplementation": "",
"baseStrategyImplementation": "0x62450517EfA1CE60d79801daf8f95973865e8D40",
"beaconOracle": "0x4C116BB629bff7A8373c2378bBd919f8349B8f25",
"delayedWithdrawalRouter": "0xC4BC46a87A67a531eCF7f74338E1FA79533334Fa",
"delayedWithdrawalRouterImplementation": "0x0011FA2c512063C495f77296Af8d195F33A8Dd38",
"delegationManager": "0x75dfE5B44C2E530568001400D3f704bC8AE350CC",
"delegationManagerImplementation": "0x56E88cb4f0136fC27D95499dE4BE2acf47946Fa1",
"eigenLayerPauserReg": "0x9Ab2FEAf0465f0eD51Fc2b663eF228B418c9Dad1",
"eigenLayerProxyAdmin": "0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B",
"eigenPodBeacon": "0x92Cc4a800A1513E85C481dDDf3A06C6921211eaC",
"eigenPodImplementation": "0x8Da4b953cbFb715624D98C0D2b4a7978462eFd38",
"eigenPodManager": "0xB8d8952f572e67B11e43bC21250967772fa883Ff",
"eigenPodManagerImplementation": "0x10EBa780CCd9E5e9FFBe529C25046c076Be91048",
"beaconOracle": "",
"delayedWithdrawalRouter": "",
"delayedWithdrawalRouterImplementation": "",
"delegationManager": "",
"delegationManagerImplementation": "",
"eigenLayerPauserReg": "",
"eigenLayerProxyAdmin": "",
"eigenPodBeacon": "",
"eigenPodImplementation": "",
"eigenPodManager": "",
"eigenPodManagerImplementation": "",
"emptyContract": "0x9690d52B1Ce155DB2ec5eCbF5a262ccCc7B3A6D2",
"rewardsCoordinator": "0xb22Ef643e1E067c994019A4C19e403253C05c2B0",
"rewardsCoordinatorImplementation": "0x7C80B0d3aFBeF9Bbd03Aab72cD2d90a12c11D394",
"slasher": "0x12699471dF8dca329C76D72823B1b79d55709384",
"slasherImplementation": "0x9460fCe11E1e0365419fa860599903B4E5097cf0",
"rewardsCoordinator": "",
"rewardsCoordinatorImplementation": "",
"slasher": "",
"slasherImplementation": "",
"numStrategiesDeployed": 0,
"strategies": {},
"strategyAddresses": [],
"strategyManager": "0xF9fbF2e35D8803273E214c99BF15174139f4E67a",
"strategyManagerImplementation": "0x1a26B23a004C512350d7Dd89056655A80b850199",
"strategyManager": "",
"strategyManagerImplementation": "",
"token": {
"EIGEN": "0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926",
"EIGENImpl": "0x95a7431400F362F3647a69535C5666cA0133CAA0",
"bEIGEN": "0xA72942289a043874249E60469F68f08B8c6ECCe8",
"bEIGENImpl": "0xd5FdabDac3d8ACeAB7BFfDDFA18877A4c5D5Aa82",
"eigenStrategy": "0xdcCF401fD121d8C542E96BC1d0078884422aFAD2",
"eigenStrategyImpl": "0x59D13E7Fb0bC0e57c1fc6594ff701592A6e4dD2B",
"tokenProxyAdmin": "0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B"
"EIGEN": "",
"EIGENImpl": "",
"bEIGEN": "",
"bEIGENImpl": "",
"eigenStrategy": "",
"eigenStrategyImpl": "",
"tokenProxyAdmin": ""
}
},
"chainInfo": {
Expand All @@ -43,6 +43,6 @@
"executorMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"operationsMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"pauserMultisig": "0xDA29BB71669f46F2a779b4b62f03644A84eE3479",
"timelock": "0xcF19CE0561052a7A7Ff21156730285997B350A7D"
"timelock": ""
}
}
31 changes: 4 additions & 27 deletions script/configs/holesky/eigenlayer_preprod.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,18 @@
"strategiesToDeploy": []
},
"strategyManager": {
"init_strategy_whitelister": "0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348",

"init_paused_status": 0
},
"delegationManager": {
"init_paused_status": 0,
"init_minWithdrawalDelayBlocks": 10
},
"rewardsCoordinator": {
"init_paused_status": 0,
"CALCULATION_INTERVAL_SECONDS": 604800,
"MAX_REWARDS_DURATION": 6048000,
"MAX_RETROACTIVE_LENGTH": 7776000,
"MAX_FUTURE_LENGTH": 2592000,
"GENESIS_REWARDS_TIMESTAMP": 1710979200,
"rewards_updater_address": "0x18a0f92Ad9645385E8A8f3db7d0f6CF7aBBb0aD4",
"activation_delay": 120,
"calculation_interval_seconds": 604800,
"global_operator_commission_bips": 1000
},
"avsDirectory": {
"init_paused_status": 0

},
"slasher": {
"init_paused_status": 0
},
"eigenPod": {
"MAX_RESTAKED_BALANCE_GWEI_PER_VALIDATOR": 32000000000,
"GENESIS_TIME": 1695902400
},

"eigenPodManager": {
"init_paused_status": 0
},
"delayedWithdrawalRouter": {
"init_paused_status": 0,
"init_withdrawalDelayBlocks": 10
},
"ethPOSDepositAddress": "0x4242424242424242424242424242424242424242"
"ethPOSDepositAddress": ""
}
61 changes: 0 additions & 61 deletions script/configs/mainnet/M1_deploy_mainnet.config.json

This file was deleted.

0 comments on commit e870331

Please sign in to comment.