@@ -57,7 +57,22 @@ contract Deploy_ProgrammaticIncentives_PreProd is Script, ProgrammaticIncentives
57
57
proxyAdmin.upgrade (TransparentUpgradeableProxy (payable (address (beigen))), address (beigenImpl));
58
58
cheats.stopPrank ();
59
59
60
- run ();
60
+ // set up strategy arrays and amounts array
61
+ _amounts[0 ] = 1e24 ;
62
+ _amounts[1 ] = 2e26 ;
63
+ _strategiesAndMultipliers[0 ].push (IRewardsCoordinator.StrategyAndMultiplier ({
64
+ strategy: eigenStrategy,
65
+ multiplier: 1e18
66
+ }));
67
+ for (uint256 i = 0 ; i < deployedStrategyArray.length ; ++ i) {
68
+ _strategiesAndMultipliers[1 ].push (IRewardsCoordinator.StrategyAndMultiplier ({
69
+ strategy: deployedStrategyArray[i],
70
+ // TODO: correct multipliers!
71
+ multiplier: 1e18
72
+ }));
73
+ }
74
+
75
+ deployContracts ();
61
76
62
77
// give tokenHopper bEIGEN minting permission and disable transfer restrictions
63
78
cheats.startPrank (Ownable (address (beigen)).owner ());
@@ -77,23 +92,13 @@ contract Deploy_ProgrammaticIncentives_PreProd is Script, ProgrammaticIncentives
77
92
}
78
93
79
94
function run () public {
80
- // deploy ActionGenerator & Hopper
81
- // TODO: correct amounts
82
- _amounts[0 ] = 1e24 ;
83
- _amounts[1 ] = 2e26 ;
84
- _strategiesAndMultipliers[0 ].push (IRewardsCoordinator.StrategyAndMultiplier ({
85
- strategy: eigenStrategy,
86
- multiplier: 1e18
87
- }));
88
- for (uint256 i = 0 ; i < deployedStrategyArray.length ; ++ i) {
89
- _strategiesAndMultipliers[1 ].push (IRewardsCoordinator.StrategyAndMultiplier ({
90
- strategy: deployedStrategyArray[i],
91
- // TODO: correct multipliers!
92
- multiplier: 1e18
93
- }));
94
- }
95
-
96
95
cheats.startBroadcast ();
96
+ deployContracts ();
97
+ cheats.stopBroadcast ();
98
+ }
99
+
100
+ function deployContracts () public {
101
+ // deploy ActionGenerator & Hopper
97
102
actionGenerator = new RewardAllStakersActionGenerator ({
98
103
_rewardsCoordinator: rewardsCoordinator,
99
104
_firstSubmissionStartTimestamp: config_firstSubmissionStartTimestamp,
@@ -104,7 +109,6 @@ contract Deploy_ProgrammaticIncentives_PreProd is Script, ProgrammaticIncentives
104
109
_EIGEN: eigen
105
110
});
106
111
107
- // TODO: correct config
108
112
ITokenHopper.HopperConfiguration memory hopperConfiguration = ITokenHopper.HopperConfiguration ({
109
113
token: address (eigen),
110
114
startTime: config_startTime,
@@ -117,7 +121,6 @@ contract Deploy_ProgrammaticIncentives_PreProd is Script, ProgrammaticIncentives
117
121
config: hopperConfiguration,
118
122
initialOwner: initialOwner
119
123
});
120
- cheats.stopBroadcast ();
121
124
}
122
125
123
126
function test_ProgrammaticIncentives_Deployment () public {
@@ -156,8 +159,19 @@ contract Deploy_ProgrammaticIncentives_PreProd is Script, ProgrammaticIncentives
156
159
// deployedStrategyArray.push(StrategyBase(strategyAddress));
157
160
// }
158
161
// TODO: above is broken because array in config is empty -- this is the WETH Strategy address and "BeaconChainETH Strategy"
159
- deployedStrategyArray.push (StrategyBase (address (0xD523267698C81a372191136e477fdebFa33D9FB4 )));
160
162
deployedStrategyArray.push (StrategyBase (address (0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0 )));
163
+ deployedStrategyArray.push (StrategyBase (address (0xD523267698C81a372191136e477fdebFa33D9FB4 )));
164
+
165
+ // check for ordering
166
+ address currAddress = address (0 );
167
+ for (uint256 i = 0 ; i < deployedStrategyArray.length ; ++ i) {
168
+ IStrategy strategy = deployedStrategyArray[i];
169
+ require (
170
+ currAddress < address (strategy),
171
+ "strategies must be in ascending order for submission "
172
+ );
173
+ currAddress = address (strategy);
174
+ }
161
175
162
176
// token
163
177
proxyAdmin = ProxyAdmin (stdJson.readAddress (existingDeploymentData, ".addresses.token.tokenProxyAdmin " ));
0 commit comments