Skip to content

Commit 06b0a84

Browse files
committed
fix: creation of registry coordinator
1 parent 2374a76 commit 06b0a84

File tree

5 files changed

+48
-7
lines changed

5 files changed

+48
-7
lines changed

test/harnesses/RegistryCoordinatorHarness.t.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ contract RegistryCoordinatorHarness is RegistryCoordinator, Test {
1212
IStakeRegistry _stakeRegistry,
1313
IBLSApkRegistry _blsApkRegistry,
1414
IIndexRegistry _indexRegistry,
15-
IAVSDirectory _avsDirectory
16-
) RegistryCoordinator(_serviceManager, _stakeRegistry, _blsApkRegistry, _indexRegistry, _avsDirectory, pauserRegistry) {
15+
IAVSDirectory _avsDirectory,
16+
IPauserRegistry _pauserRegistry
17+
) RegistryCoordinator(_serviceManager, _stakeRegistry, _blsApkRegistry, _indexRegistry, _avsDirectory, _pauserRegistry) {
1718
_transferOwnership(msg.sender);
1819
}
1920

test/integration/CoreRegistration.t.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ contract Test_CoreRegistration is MockAVSDeployer {
8282
stakeRegistry,
8383
blsApkRegistry,
8484
indexRegistry,
85-
avsDirectory
85+
avsDirectory,
86+
pauserRegistry
8687
);
8788

8889
// Upgrade Registry Coordinator & ServiceManager

test/mocks/DelegationMock.sol

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pragma solidity ^0.8.12;
33

44
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
5+
import {console2 as console} from "forge-std/Test.sol";
56

67
import {IDelegationManager} from "eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol";
78
import {IStrategyManager} from "eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol";
@@ -174,9 +175,13 @@ contract DelegationMock is IDelegationManager {
174175
address operator,
175176
IStrategy strategy,
176177
uint256 shares
177-
) external {}
178+
) external {
179+
console.log("HERE");
180+
}
178181

179-
function setIsOperator(address, bool) external {}
182+
function setIsOperator(address, bool) external {
183+
console.log("HERE");
184+
}
180185

181186
function minWithdrawalDelayBlocks() external returns (uint32) {}
182187
}

test/unit/StakeRegistryUnit.t.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ contract StakeRegistryUnitTests is MockAVSDeployer, IStakeRegistryEvents {
4949
stakeRegistry,
5050
IBLSApkRegistry(blsApkRegistry),
5151
IIndexRegistry(indexRegistry),
52-
IAVSDirectory(avsDirectory)
52+
IAVSDirectory(avsDirectory),
53+
pauserRegistry
5354
);
5455

5556
stakeRegistryImplementation = new StakeRegistryHarness(

test/utils/MockAVSDeployer.sol

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,24 +135,43 @@ contract MockAVSDeployer is Test {
135135

136136
function _deployMockEigenLayerAndAVS(uint8 numQuorumsToAdd) internal {
137137
emptyContract = new EmptyContract();
138+
vm.label(address(emptyContract), "EmptyContract");
138139

139140
defaultOperatorId = defaultPubKey.hashG1Point();
140141

141142
cheats.startPrank(proxyAdminOwner);
142143
proxyAdmin = new ProxyAdmin();
144+
vm.label(address(proxyAdmin), "ProxyAdmin");
143145

144146
address[] memory pausers = new address[](1);
145147
pausers[0] = pauser;
146148
pauserRegistry = new PauserRegistry(pausers, unpauser);
149+
vm.label(address(pauserRegistry), "PauserRegistry");
147150

148151
delegationMock = new DelegationMock();
152+
vm.label(address(delegationMock), "DelegationMock");
153+
149154
avsDirectoryMock = new AVSDirectoryMock();
155+
vm.label(address(avsDirectoryMock), "AVSDirectoryMock");
156+
150157
eigenPodManagerMock = new EigenPodManagerMock(pauserRegistry);
158+
vm.label(address(eigenPodManagerMock), "EigenPodManagerMock");
159+
151160
strategyManagerMock = new StrategyManagerMock(delegationMock);
161+
vm.label(address(strategyManagerMock), "StrategyManagerMock");
162+
152163
allocationManagerMock = new AllocationManagerMock();
164+
vm.label(address(allocationManagerMock), "AllocationManagerMock");
165+
153166
avsDirectoryMock = new AVSDirectoryMock();
167+
vm.label(address(avsDirectoryMock), "AVSDirectoryMock");
168+
154169
allocationManagerMock = new AllocationManagerMock();
170+
vm.label(address(allocationManagerMock), "AllocationManagerMock");
171+
155172
avsDirectoryImplementation = new AVSDirectory(delegationMock, pauserRegistry); // TODO: config value
173+
vm.label(address(avsDirectoryImplementation), "AVSDirectoryImplementation");
174+
156175
avsDirectory = AVSDirectory(
157176
address(
158177
new TransparentUpgradeableProxy(
@@ -167,7 +186,10 @@ contract MockAVSDeployer is Test {
167186
)
168187
)
169188
);
189+
vm.label(address(avsDirectory), "AVSDirectory");
190+
170191
rewardsCoordinatorMock = new RewardsCoordinatorMock();
192+
vm.label(address(rewardsCoordinatorMock), "RewardsCoordinatorMock");
171193

172194
strategyManagerMock.setDelegationManager(delegationMock);
173195
cheats.stopPrank();
@@ -178,57 +200,66 @@ contract MockAVSDeployer is Test {
178200
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
179201
)
180202
);
203+
vm.label(address(registryCoordinator), "RegistryCoordinator");
181204

182205
stakeRegistry = StakeRegistryHarness(
183206
address(
184207
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
185208
)
186209
);
210+
vm.label(address(stakeRegistry), "StakeRegistry");
187211

188212
indexRegistry = IndexRegistry(
189213
address(
190214
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
191215
)
192216
);
217+
vm.label(address(indexRegistry), "IndexRegistry");
193218

194219
blsApkRegistry = BLSApkRegistryHarness(
195220
address(
196221
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
197222
)
198223
);
224+
vm.label(address(blsApkRegistry), "BLSApkRegistry");
199225

200226
serviceManager = ServiceManagerMock(
201227
address(
202228
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
203229
)
204230
);
231+
vm.label(address(serviceManager), "ServiceManager");
205232

206233
allocationManager = AllocationManagerMock(
207234
address(
208235
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
209236
)
210237
);
238+
vm.label(address(allocationManager), "AllocationManager");
211239

212240
cheats.stopPrank();
213241

214242
cheats.startPrank(proxyAdminOwner);
215243

216244
stakeRegistryImplementation =
217245
new StakeRegistryHarness(IRegistryCoordinator(registryCoordinator), delegationMock, avsDirectory, serviceManager);
246+
vm.label(address(stakeRegistryImplementation), "StakeRegistryImplementation");
218247

219248
proxyAdmin.upgrade(
220249
TransparentUpgradeableProxy(payable(address(stakeRegistry))),
221250
address(stakeRegistryImplementation)
222251
);
223252

224253
blsApkRegistryImplementation = new BLSApkRegistryHarness(registryCoordinator);
254+
vm.label(address(blsApkRegistryImplementation), "BLSApkRegistryImplementation");
225255

226256
proxyAdmin.upgrade(
227257
TransparentUpgradeableProxy(payable(address(blsApkRegistry))),
228258
address(blsApkRegistryImplementation)
229259
);
230260

231261
indexRegistryImplementation = new IndexRegistry(registryCoordinator);
262+
vm.label(address(indexRegistryImplementation), "IndexRegistryImplementation");
232263

233264
proxyAdmin.upgrade(
234265
TransparentUpgradeableProxy(payable(address(indexRegistry))),
@@ -242,13 +273,15 @@ contract MockAVSDeployer is Test {
242273
stakeRegistry,
243274
allocationManager
244275
);
276+
vm.label(address(serviceManagerImplementation), "ServiceManagerImplementation");
245277

246278
proxyAdmin.upgrade(
247279
TransparentUpgradeableProxy(payable(address(serviceManager))),
248280
address(serviceManagerImplementation)
249281
);
250282

251283
allocationManagerImplementation = new AllocationManagerMock();
284+
vm.label(address(allocationManagerImplementation), "AllocationManagerImplementation");
252285

253286
proxyAdmin.upgrade(
254287
TransparentUpgradeableProxy(payable(address(allocationManager))),
@@ -281,7 +314,7 @@ contract MockAVSDeployer is Test {
281314
}
282315

283316
registryCoordinatorImplementation = new RegistryCoordinatorHarness(
284-
serviceManager, stakeRegistry, blsApkRegistry, indexRegistry, avsDirectory
317+
serviceManager, stakeRegistry, blsApkRegistry, indexRegistry, avsDirectory, pauserRegistry
285318
);
286319
{
287320
delete operatorSetParams;

0 commit comments

Comments
 (0)