-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add scripts to upgrade all core contracts #544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,52 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity 0.8.28; | ||
|
|
||
| import {UpgradeAllContracts} from "./UpgradeAllContracts.s.sol"; | ||
|
|
||
| /** | ||
| * @title UpgradeAllContractsEthereum | ||
| * @notice Upgrades all deployed Core UUPS proxies on Ethereum mainnet. | ||
| * | ||
| * @dev Canonical mainnet proxy addresses (CreateX deterministic deployment — same as Sepolia): | ||
| * - OraclePriceFeed: 0x57F750E3B8e095A5b3AE96030F0cac5dFe2f8A16 | ||
| * - EigenAdapter: 0xe6168092892E545701D92BEe10149178bE0EEDF4 | ||
| * - StakeManager: 0x5be5220F81e76e0CF6089fb7E7aE9eF48a8D64Be | ||
| * - RewardsManager: 0x8ae0F0B94fe782D7F055B04d4699c3cc01632b46 | ||
| * - SlashingManager: 0x7Bc39bf135eF3c30E542C196719c91455ff489f0 | ||
| * - SSPRouter: 0xF39E592E93A7a925a57464e0120B555A25590486 | ||
| * SymbioticAdapter is NOT deployed on mainnet — leave SYMBIOTIC_ADAPTER_PROXY unset. | ||
| * | ||
| * @dev Admin model: multisig 0xd2d03377Fa96687e9C11380DA9956AcC5F307e2c holds | ||
| * DEFAULT_ADMIN_ROLE directly on core proxies. There is NO TimelockController for core | ||
| * on any network (confirmed on-chain: SlashingManager.hasRole(DEFAULT_ADMIN_ROLE, Timelock) | ||
| * == false). All upgrades are direct multisig Safe TX Builder calls. | ||
| * | ||
| * This is distinct from the Coverage contracts, where DEFAULT_ADMIN_ROLE on the coverage | ||
| * UUPS proxies is held by a TimelockController. | ||
| * | ||
| * @dev Prerequisites: | ||
| * forge clean && forge build | ||
| * | ||
| * @dev Usage (broadcast from multisig EOA or via Safe execute): | ||
| * DEPLOYER_ADDRESS=0xd2d03377Fa96687e9C11380DA9956AcC5F307e2c \ | ||
| * ORACLE_PRICE_FEED_PROXY=0x57F750E3B8e095A5b3AE96030F0cac5dFe2f8A16 \ | ||
| * EIGEN_ADAPTER_PROXY=0xe6168092892E545701D92BEe10149178bE0EEDF4 \ | ||
| * STAKE_MANAGER_PROXY=0x5be5220F81e76e0CF6089fb7E7aE9eF48a8D64Be \ | ||
| * REWARDS_MANAGER_PROXY=0x8ae0F0B94fe782D7F055B04d4699c3cc01632b46 \ | ||
| * SLASHING_MANAGER_PROXY=0x7Bc39bf135eF3c30E542C196719c91455ff489f0 \ | ||
| * SSP_ROUTER_PROXY=0xF39E592E93A7a925a57464e0120B555A25590486 \ | ||
| * forge script src/script/UpgradeAllContractsEthereum.s.sol:UpgradeAllContractsEthereum \ | ||
| * --rpc-url $ETHEREUM_RPC_URL --broadcast --keystore $KEYSTORE --sender $DEPLOYER_ADDRESS | ||
| * | ||
| * Then verify: | ||
| * forge script src/script/VerifyCoreEthereum.s.sol --rpc-url $ETHEREUM_RPC_URL | ||
| * | ||
| * Note: Mainnet WETH feed (hasPriceFeed == true) is already registered. No post-upgrade | ||
| * feed registration is required, unlike Sepolia. | ||
| */ | ||
| contract UpgradeAllContractsEthereum is UpgradeAllContracts { | ||
| function run() public override returns (NewImplementations memory) { | ||
| require(block.chainid == 1, "Must run on Ethereum mainnet"); | ||
| return super.run(); | ||
| } | ||
| } | ||
This file contains hidden or 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,51 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity 0.8.28; | ||
|
|
||
| import {UpgradeAllContracts} from "./UpgradeAllContracts.s.sol"; | ||
|
|
||
| /** | ||
| * @title UpgradeAllContractsSepolia | ||
| * @notice Upgrades all deployed Core UUPS proxies on Sepolia testnet. | ||
| * | ||
| * @dev Canonical Sepolia proxy addresses (CreateX deterministic deployment — same as mainnet): | ||
| * - OraclePriceFeed: 0x57F750E3B8e095A5b3AE96030F0cac5dFe2f8A16 | ||
| * - EigenAdapter: 0xe6168092892E545701D92BEe10149178bE0EEDF4 | ||
| * - StakeManager: 0x5be5220F81e76e0CF6089fb7E7aE9eF48a8D64Be | ||
| * - RewardsManager: 0x8ae0F0B94fe782D7F055B04d4699c3cc01632b46 | ||
| * - SlashingManager: 0x7Bc39bf135eF3c30E542C196719c91455ff489f0 | ||
| * - SSPRouter: 0xF39E592E93A7a925a57464e0120B555A25590486 | ||
| * SymbioticAdapter is NOT deployed on Sepolia — leave SYMBIOTIC_ADAPTER_PROXY unset. | ||
| * | ||
| * @dev Admin model: multisig 0xd2d03377Fa96687e9C11380DA9956AcC5F307e2c holds | ||
| * DEFAULT_ADMIN_ROLE directly. No TimelockController for core on any network. | ||
| * | ||
| * @dev Prerequisites: | ||
| * forge clean && forge build | ||
| * | ||
| * @dev Usage: | ||
| * DEPLOYER_ADDRESS=0xd2d03377Fa96687e9C11380DA9956AcC5F307e2c \ | ||
| * ORACLE_PRICE_FEED_PROXY=0x57F750E3B8e095A5b3AE96030F0cac5dFe2f8A16 \ | ||
| * EIGEN_ADAPTER_PROXY=0xe6168092892E545701D92BEe10149178bE0EEDF4 \ | ||
| * STAKE_MANAGER_PROXY=0x5be5220F81e76e0CF6089fb7E7aE9eF48a8D64Be \ | ||
| * REWARDS_MANAGER_PROXY=0x8ae0F0B94fe782D7F055B04d4699c3cc01632b46 \ | ||
| * SLASHING_MANAGER_PROXY=0x7Bc39bf135eF3c30E542C196719c91455ff489f0 \ | ||
| * SSP_ROUTER_PROXY=0xF39E592E93A7a925a57464e0120B555A25590486 \ | ||
| * forge script src/script/UpgradeAllContractsSepolia.s.sol:UpgradeAllContractsSepolia \ | ||
| * --rpc-url $SEPOLIA_RPC_URL --broadcast --keystore $KEYSTORE --sender $DEPLOYER_ADDRESS | ||
| * | ||
| * Then verify: | ||
| * forge script src/script/VerifyCoreSepolia.s.sol --rpc-url $SEPOLIA_RPC_URL | ||
| * | ||
| * Post-upgrade (Sepolia only): register WETH price feed if not already present: | ||
| * WETH=0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 | ||
| * CHAINLINK_ETH_USD=0x694AA1769357215DE4FAC081bf1f309aDC325306 | ||
| * cast send 0x57F750E3B8e095A5b3AE96030F0cac5dFe2f8A16 \ | ||
| * "setTokenPriceFeed(address,address,uint256)" $WETH $CHAINLINK_ETH_USD 3600 \ | ||
| * --keystore $KEYSTORE --rpc-url $SEPOLIA_RPC_URL | ||
| */ | ||
| contract UpgradeAllContractsSepolia is UpgradeAllContracts { | ||
| function run() public override returns (NewImplementations memory) { | ||
| require(block.chainid == 11_155_111, "Must run on Sepolia"); | ||
| return super.run(); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.