-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wip refactor of deploy scripts
- Loading branch information
Showing
9 changed files
with
224 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"addresses": { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.