diff --git a/src/RegistryCoordinator.sol b/src/RegistryCoordinator.sol index a93132dd..8f79cce4 100644 --- a/src/RegistryCoordinator.sol +++ b/src/RegistryCoordinator.sol @@ -62,6 +62,7 @@ contract RegistryCoordinator is RegistryCoordinatorStorage { SignatureWithSaltAndExpiry memory operatorSignature ) external onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) { require(!isM2QuorumRegistrationDisabled, M2QuorumRegistrationIsDisabled()); + require(quorumNumbers.orderedBytesArrayToBitmap().isSubsetOf(m2QuorumBitmap), OnlyM2QuorumsAllowed()); // Check if the operator has registered before bool operatorRegisteredBefore = _operatorInfo[msg.sender].status == OperatorStatus.REGISTERED; @@ -91,7 +92,8 @@ contract RegistryCoordinator is RegistryCoordinatorStorage { SignatureWithSaltAndExpiry memory operatorSignature ) external onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) { require(!isM2QuorumRegistrationDisabled, M2QuorumRegistrationIsDisabled()); - + require(quorumNumbers.orderedBytesArrayToBitmap().isSubsetOf(m2QuorumBitmap), OnlyM2QuorumsAllowed()); + // Check if the operator has registered before bool operatorRegisteredBefore = _operatorInfo[msg.sender].status == OperatorStatus.REGISTERED; diff --git a/src/interfaces/IRegistryCoordinator.sol b/src/interfaces/IRegistryCoordinator.sol index 10d3c1ef..a8b3939b 100644 --- a/src/interfaces/IRegistryCoordinator.sol +++ b/src/interfaces/IRegistryCoordinator.sol @@ -20,6 +20,8 @@ interface IRegistryCoordinatorErrors is ISlashingRegistryCoordinatorErrors { error M2QuorumRegistrationIsDisabled(); /// @notice Thrown when operator set operations are attempted while not enabled. error OperatorSetsNotEnabled(); + /// @notice Thrown when only M2 quorums are allowed. + error OnlyM2QuorumsAllowed(); } interface IRegistryCoordinatorTypes is ISlashingRegistryCoordinatorTypes {}