@@ -439,27 +439,37 @@ abstract contract IntegrationDeployer is Test, IUserDeployer {
439
439
});
440
440
cheats.stopPrank ();
441
441
442
- _setoperatorSetsEnabled (false );
442
+ _setOperatorSetsEnabled (false );
443
+ _setM2QuorumsDisabled (false );
443
444
}
444
445
445
- /// @notice Overwrite RegistryCoordinator.operatorSetsEnabled to false since by default
446
- /// RegistryCoordinator is deployed and intitialized with operatorSetsEnabled set to true
447
- /// This is to enable testing of RegistryCoordinator in non operator set mode.
448
- function _setoperatorSetsEnabled (bool operatorSetsEnabled ) internal {
446
+ /// @notice Overwrite RegistryCoordinator.operatorSetsEnabled to the specified value.
447
+ /// This is to enable testing of RegistryCoordinator in non-operator set mode.
448
+ function _setOperatorSetsEnabled (bool operatorSetsEnabled ) internal {
449
449
// 1. First read the current value of the entire slot
450
- // which holds operatorSetsEnabled and accountIdentifier
450
+ // which holds operatorSetsEnabled, m2QuorumsDisabled, and accountIdentifier
451
451
bytes32 currentSlot = cheats.load (address (registryCoordinator), bytes32 (uint256 (161 )));
452
452
453
- // 2. Clear only the first byte (operatorSetsEnabled) 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 operatorSetsEnabled to false)
453
+ // 2. Clear only the first byte (operatorSetsEnabled) while keeping the rest
457
454
bytes32 newSlot = (currentSlot & ~ bytes32 (uint256 (0xff ))) | bytes32 (uint256 (operatorSetsEnabled ? 0x01 : 0x00 ));
458
455
459
456
// 3. Store the modified slot
460
457
cheats.store (address (registryCoordinator), bytes32 (uint256 (161 )), newSlot);
461
458
}
462
459
460
+ /// @notice Overwrite RegistryCoordinator.m2QuorumsDisabled to the specified value.
461
+ function _setM2QuorumsDisabled (bool m2QuorumsDisabled ) internal {
462
+ // 1. First read the current value of the entire slot
463
+ // which holds operatorSetsEnabled, m2QuorumsDisabled, and accountIdentifier
464
+ bytes32 currentSlot = cheats.load (address (registryCoordinator), bytes32 (uint256 (161 )));
465
+
466
+ // 2. Clear only the second byte (m2QuorumsDisabled) while keeping the rest
467
+ bytes32 newSlot = (currentSlot & ~ bytes32 (uint256 (0xff ) << 8 )) | bytes32 (uint256 (m2QuorumsDisabled ? 0x01 : 0x00 ) << 8 );
468
+
469
+ // 3. Store the modified slot
470
+ cheats.store (address (registryCoordinator), bytes32 (uint256 (161 )), newSlot);
471
+ }
472
+
463
473
/// @dev Deploy a strategy and its underlying token, push to global lists of tokens/strategies, and whitelist
464
474
/// strategy in strategyManager
465
475
function _newStrategyAndToken (
0 commit comments