Skip to content

Commit 20c06b2

Browse files
authored
Goerli implementation script (#413)
* Create GoerliUpgrade2.s.sol * preprod deploy * Update GV2_preprod_deployment_2024_30_1.json * nit: comments * avs directory already deployed * preprod deploy
1 parent f2089af commit 20c06b2

File tree

4 files changed

+197
-0
lines changed

4 files changed

+197
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"addresses": {
3+
"baseStrategyImplementation": "0xA548BF0106108A0c14779F3f1d8981517b8fA9D0",
4+
"delayedWithdrawalRouter": "0x9572e46797B7A07257314e587061dC46c4dfCE0E",
5+
"delayedWithdrawalRouterImplementation": "0x44a40C60857b4B420Ad3D8b9646FefEBF2D0dB86",
6+
"delegation": "0x45b4c4DAE69393f62e1d14C5fe375792DF4E6332",
7+
"delegationImplementation": "0x934eB3E2b6D5C2E1601B29B7180026D71438F20D",
8+
"eigenLayerPauserReg": "0x94A2679B6A87ADb4e0CabA8E3E40f463C6062DeC",
9+
"eigenLayerProxyAdmin": "0x555573Ff2B3b2731e69eeBAfb40a4EEA7fBaC54A",
10+
"eigenPodBeacon": "0x38cBD4e08eA1840B91dA42fE02B55Abc89083bFB",
11+
"eigenPodImplementation": "0x83cbB48391F428878Bc5DD97C9792a8dbCAa0729",
12+
"eigenPodManager": "0x33e42d539abFe9b387B27b0e467374Bbb76cf925",
13+
"eigenPodManagerImplementation": "0xEEdCC9dB001fB8429721FE21426F51f0Cdd329EC",
14+
"emptyContract": "0xb23633b2240D78502fA308B817C892b2d5778469",
15+
"slasher": "0xF751E8C37ACd3AD5a35D5db03E57dB6F9AD0bDd0",
16+
"slasherImplementation": "0x05c235183e8b9dFb7113Cf92bbDc3f5085324158",
17+
"strategyManager": "0xD309ADd2B269d522112DcEe0dCf0b0f04a09C29e",
18+
"strategyManagerImplementation": "0xb9B69504f1a727E783F4B4248A115D56F4080DF8",
19+
"avsDirectory": "0x47eFB8e38656a805BC6B3b13FA331d34dcDeB374",
20+
"avsDirectoryImplementation": "0x728111B10227F44E5e389e5650725948d1DCcE7A"
21+
},
22+
"chainInfo": {
23+
"chainId": 5,
24+
"deploymentBlock": 10469472
25+
},
26+
"parameters": {
27+
"executorMultisig": "0x27977e6E4426A525d055A587d2a0537b4cb376eA",
28+
"operationsMultisig": "0x27977e6E4426A525d055A587d2a0537b4cb376eA"
29+
}
30+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"addresses": {
3+
"baseStrategyImplementation": "0xA548BF0106108A0c14779F3f1d8981517b8fA9D0",
4+
"blsPublicKeyCompendium": "0x663F1f6A8E4417b9dB3117821068DAD862395aF0",
5+
"delayedWithdrawalRouter": "0x9572e46797B7A07257314e587061dC46c4dfCE0E",
6+
"delayedWithdrawalRouterImplementation": "0xaDd6b52E063bE5CdeF6450F28D9CA038bDAB9A49",
7+
"delegation": "0x45b4c4DAE69393f62e1d14C5fe375792DF4E6332",
8+
"delegationImplementation": "0x679cf51e303827c99e924bea05331101bF90B126",
9+
"eigenLayerPauserReg": "0x94A2679B6A87ADb4e0CabA8E3E40f463C6062DeC",
10+
"eigenLayerProxyAdmin": "0x555573Ff2B3b2731e69eeBAfb40a4EEA7fBaC54A",
11+
"eigenPodBeacon": "0x38cBD4e08eA1840B91dA42fE02B55Abc89083bFB",
12+
"eigenPodImplementation": "0x9CeE917f0f5d4123585A4B12906a8A65cFac1ac8",
13+
"eigenPodManager": "0x33e42d539abFe9b387B27b0e467374Bbb76cf925",
14+
"eigenPodManagerImplementation": "0x6A4855ab9a3924c8169f20a189272FFF3cd00b68",
15+
"emptyContract": "0xb23633b2240D78502fA308B817C892b2d5778469",
16+
"slasher": "0xF751E8C37ACd3AD5a35D5db03E57dB6F9AD0bDd0",
17+
"slasherImplementation": "0xa02171440AfD8d5f09BaAB74Cd48b1401C47F2f9",
18+
"strategies": {
19+
"Liquid staked Ether 2.0": "0xed6DE3f2916d20Cb427fe7255194a05061319FFB",
20+
"Rocket Pool ETH": "0xd421b2a340497545dA68AE53089d99b9Fe0493cD"
21+
},
22+
"strategyManager": "0xD309ADd2B269d522112DcEe0dCf0b0f04a09C29e",
23+
"strategyManagerImplementation": "0xC10133A329A210f8DEbf597C8eF5907c95D673e9"
24+
},
25+
"chainInfo": {
26+
"chainId": 5,
27+
"deploymentBlock": 9729808
28+
},
29+
"parameters": {
30+
"executorMultisig": "0x27977e6E4426A525d055A587d2a0537b4cb376eA",
31+
"operationsMultisig": "0x27977e6E4426A525d055A587d2a0537b4cb376eA"
32+
}
33+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity =0.8.12;
3+
4+
import "../../src/contracts/interfaces/IETHPOSDeposit.sol";
5+
6+
import "../../src/contracts/core/StrategyManager.sol";
7+
import "../../src/contracts/core/Slasher.sol";
8+
import "../../src/contracts/core/DelegationManager.sol";
9+
import "../../src/contracts/core/AVSDirectory.sol";
10+
11+
import "../../src/contracts/pods/EigenPod.sol";
12+
import "../../src/contracts/pods/EigenPodManager.sol";
13+
import "../../src/contracts/pods/DelayedWithdrawalRouter.sol";
14+
15+
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
16+
import "../../src/test/mocks/EmptyContract.sol";
17+
import "forge-std/Script.sol";
18+
import "forge-std/Test.sol";
19+
20+
// # To load the variables in the .env file
21+
// source .env
22+
23+
// # To deploy and verify our contract
24+
// forge script script/upgrade/GoerliUpgrade2.s.sol:GoerliUpgrade2 --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast -vvvv
25+
26+
// NOTE: ONLY WORKS ON GOERLI
27+
// CommitHash: 7257364d03d255ea8c855f36317ce0e892b78497
28+
contract GoerliUpgrade2 is Script, Test {
29+
Vm cheats = Vm(HEVM_ADDRESS);
30+
31+
string public deploymentOutputPath = string(bytes("script/output/M2_preprod_deployment_from_scratch.json"));
32+
33+
IDelayedWithdrawalRouter delayedWithdrawalRouter;
34+
IDelegationManager delegation;
35+
IEigenPodManager eigenPodManager;
36+
IStrategyManager strategyManager;
37+
ISlasher slasher;
38+
IBeacon eigenPodBeacon;
39+
EmptyContract emptyContract;
40+
ProxyAdmin eigenLayerProxyAdmin;
41+
42+
function run() external {
43+
// read and log the chainID
44+
uint256 chainId = block.chainid;
45+
emit log_named_uint("You are deploying on ChainID", chainId);
46+
47+
string memory config_data = vm.readFile(deploymentOutputPath);
48+
49+
delayedWithdrawalRouter = IDelayedWithdrawalRouter(stdJson.readAddress(config_data, ".addresses.delayedWithdrawalRouter"));
50+
delegation = IDelegationManager(stdJson.readAddress(config_data, ".addresses.delegation"));
51+
eigenPodManager = IEigenPodManager(stdJson.readAddress(config_data, ".addresses.eigenPodManager"));
52+
strategyManager = IStrategyManager(stdJson.readAddress(config_data, ".addresses.strategyManager"));
53+
slasher = ISlasher(stdJson.readAddress(config_data, ".addresses.slasher"));
54+
eigenPodBeacon = IBeacon(stdJson.readAddress(config_data, ".addresses.eigenPodBeacon"));
55+
emptyContract = EmptyContract(stdJson.readAddress(config_data, ".addresses.emptyContract"));
56+
eigenLayerProxyAdmin = ProxyAdmin(stdJson.readAddress(config_data, ".addresses.eigenLayerProxyAdmin"));
57+
58+
vm.startBroadcast();
59+
60+
address delegationImplementation = address(
61+
new DelegationManager(
62+
strategyManager,
63+
slasher,
64+
eigenPodManager
65+
)
66+
);
67+
68+
address slasherImplementation = address(
69+
new Slasher(
70+
strategyManager,
71+
delegation
72+
)
73+
);
74+
75+
address strategyManagerImplementation = address(
76+
new StrategyManager(
77+
delegation,
78+
eigenPodManager,
79+
slasher
80+
)
81+
);
82+
83+
address delayedWithdrawalRouterImplementation = address(
84+
new DelayedWithdrawalRouter(
85+
eigenPodManager
86+
)
87+
);
88+
89+
address eigenPodImplementation = address(
90+
new EigenPod(
91+
IETHPOSDeposit(0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b),
92+
delayedWithdrawalRouter,
93+
eigenPodManager,
94+
32e9,
95+
1616508000
96+
)
97+
);
98+
99+
address eigenPodManagerImplementation = address(
100+
new EigenPodManager(
101+
IETHPOSDeposit(0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b),
102+
eigenPodBeacon,
103+
strategyManager,
104+
slasher,
105+
delegation
106+
)
107+
);
108+
109+
vm.stopBroadcast();
110+
111+
emit log_named_address("DelegationImplementation", delegationImplementation);
112+
emit log_named_address("SlasherImplementation", slasherImplementation);
113+
emit log_named_address("StrategyManagerImplementation", strategyManagerImplementation);
114+
emit log_named_address("DelayedWithdrawalRouterImplementation", delayedWithdrawalRouterImplementation);
115+
emit log_named_address("EigenPodImplementation", eigenPodImplementation);
116+
emit log_named_address("EigenPodManagerImplementation", eigenPodManagerImplementation);
117+
118+
/*
119+
== Logs ==
120+
You are deploying on ChainID: 5
121+
DelegationImplementation: 0x934eB3E2b6D5C2E1601B29B7180026D71438F20D
122+
SlasherImplementation: 0x05c235183e8b9dFb7113Cf92bbDc3f5085324158
123+
StrategyManagerImplementation: 0xb9B69504f1a727E783F4B4248A115D56F4080DF8
124+
DelayedWithdrawalRouterImplementation: 0x44a40C60857b4B420Ad3D8b9646FefEBF2D0dB86
125+
EigenPodImplementation: 0x83cbB48391F428878Bc5DD97C9792a8dbCAa0729
126+
EigenPodManagerImplementation: 0xEEdCC9dB001fB8429721FE21426F51f0Cdd329EC
127+
*/
128+
}
129+
}

script/utils/ExistingDeploymentParser.sol

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
88
import "../../src/contracts/core/StrategyManager.sol";
99
import "../../src/contracts/core/Slasher.sol";
1010
import "../../src/contracts/core/DelegationManager.sol";
11+
import "../../src/contracts/core/AVSDirectory.sol";
1112

1213
import "../../src/contracts/strategies/StrategyBase.sol";
1314

@@ -29,6 +30,8 @@ contract ExistingDeploymentParser is Script, Test {
2930
PauserRegistry public eigenLayerPauserReg;
3031
Slasher public slasher;
3132
Slasher public slasherImplementation;
33+
AVSDirectory public avsDirectory;
34+
AVSDirectory public avsDirectoryImplementation;
3235
DelegationManager public delegation;
3336
DelegationManager public delegationImplementation;
3437
StrategyManager public strategyManager;
@@ -71,6 +74,8 @@ contract ExistingDeploymentParser is Script, Test {
7174
slasherImplementation = Slasher(stdJson.readAddress(existingDeploymentData, ".addresses.slasherImplementation"));
7275
delegation = DelegationManager(stdJson.readAddress(existingDeploymentData, ".addresses.delegation"));
7376
delegationImplementation = DelegationManager(stdJson.readAddress(existingDeploymentData, ".addresses.delegationImplementation"));
77+
avsDirectory = AVSDirectory(stdJson.readAddress(existingDeploymentData, ".addresses.avsDirectory"));
78+
avsDirectoryImplementation = AVSDirectory(stdJson.readAddress(existingDeploymentData, ".addresses.avsDirectoryImplementation"));
7479
strategyManager = StrategyManager(stdJson.readAddress(existingDeploymentData, ".addresses.strategyManager"));
7580
strategyManagerImplementation = StrategyManager(stdJson.readAddress(existingDeploymentData, ".addresses.strategyManagerImplementation"));
7681
eigenPodManager = EigenPodManager(stdJson.readAddress(existingDeploymentData, ".addresses.eigenPodManager"));

0 commit comments

Comments
 (0)