@@ -195,7 +195,6 @@ abstract contract IntegrationDeployer is Test, IUserDeployer {
195
195
new StrategyManager (delegationManager, pauserRegistry);
196
196
EigenPodManager eigenPodManagerImplementation =
197
197
new EigenPodManager (ethPOSDeposit, eigenPodBeacon, delegationManager, pauserRegistry);
198
- console.log ("HERE Impl " );
199
198
AVSDirectory avsDirectoryImplementation =
200
199
new AVSDirectory (delegationManager, pauserRegistry);
201
200
@@ -405,6 +404,60 @@ abstract contract IntegrationDeployer is Test, IUserDeployer {
405
404
);
406
405
407
406
operatorStateRetriever = new OperatorStateRetriever ();
407
+
408
+ // Setup UAM Permissions
409
+ cheats.startPrank (serviceManager.owner ());
410
+ // 1. set AVS registrar
411
+ serviceManager.setAppointee ({
412
+ appointee: serviceManager.owner (),
413
+ target: address (allocationManager),
414
+ selector: IAllocationManager.setAVSRegistrar.selector
415
+ });
416
+ // 2. create operator sets
417
+ serviceManager.setAppointee ({
418
+ appointee: address (registryCoordinator),
419
+ target: address (allocationManager),
420
+ selector: IAllocationManager.createOperatorSets.selector
421
+ });
422
+ // 3. deregister operator from operator sets
423
+ serviceManager.setAppointee ({
424
+ appointee: address (registryCoordinator),
425
+ target: address (allocationManager),
426
+ selector: IAllocationManager.deregisterFromOperatorSets.selector
427
+ });
428
+ // 4. add strategies to operator sets
429
+ serviceManager.setAppointee ({
430
+ appointee: address (registryCoordinator),
431
+ target: address (stakeRegistry),
432
+ selector: IAllocationManager.addStrategiesToOperatorSet.selector
433
+ });
434
+ // 5. remove strategies from operator sets
435
+ serviceManager.setAppointee ({
436
+ appointee: address (registryCoordinator),
437
+ target: address (stakeRegistry),
438
+ selector: IAllocationManager.removeStrategiesFromOperatorSet.selector
439
+ });
440
+ cheats.stopPrank ();
441
+
442
+ _setIsOperatorSetAVS (false );
443
+ }
444
+
445
+ /// @notice Overwrite RegistryCoordinator.isOperatorSetAVS to false since by default
446
+ /// RegistryCoordinator is deployed and intitialized with isOperatorSetAVS set to true
447
+ /// This is to enable testing of RegistryCoordinator in non operator set mode.
448
+ function _setIsOperatorSetAVS (bool isOperatorSetAVS ) internal {
449
+ // 1. First read the current value of the entire slot
450
+ // which holds isOperatorSetAVS and accountIdentifier
451
+ bytes32 currentSlot = cheats.load (address (registryCoordinator), bytes32 (uint256 (161 )));
452
+
453
+ // 2. Clear only the first byte (isOperatorSetAVS) while keeping the rest (accountIdentifier)
454
+ // We can do this by:
455
+ // i. Masking out the first byte of the current slot (keep accountIdentifier)
456
+ // ii. OR it with 0 in the first byte position (set isOperatorSetAVS to false)
457
+ bytes32 newSlot = (currentSlot & ~ bytes32 (uint256 (0xff ))) | bytes32 (uint256 (isOperatorSetAVS ? 0x01 : 0x00 ));
458
+
459
+ // 3. Store the modified slot
460
+ cheats.store (address (registryCoordinator), bytes32 (uint256 (161 )), newSlot);
408
461
}
409
462
410
463
/// @dev Deploy a strategy and its underlying token, push to global lists of tokens/strategies, and whitelist
0 commit comments