Skip to content

Commit 7e4d987

Browse files
committed
fix: bug in registration
1 parent dde53b0 commit 7e4d987

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/RegistryCoordinator.sol

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ contract RegistryCoordinator is RegistryCoordinatorStorage {
6262
SignatureWithSaltAndExpiry memory operatorSignature
6363
) external onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) {
6464
require(!isM2QuorumRegistrationDisabled, M2QuorumRegistrationIsDisabled());
65+
require(quorumNumbers.orderedBytesArrayToBitmap().isSubsetOf(m2QuorumBitmap), OnlyM2QuorumsAllowed());
6566

6667
// Check if the operator has registered before
6768
bool operatorRegisteredBefore = _operatorInfo[msg.sender].status == OperatorStatus.REGISTERED;
@@ -91,7 +92,8 @@ contract RegistryCoordinator is RegistryCoordinatorStorage {
9192
SignatureWithSaltAndExpiry memory operatorSignature
9293
) external onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) {
9394
require(!isM2QuorumRegistrationDisabled, M2QuorumRegistrationIsDisabled());
94-
95+
require(quorumNumbers.orderedBytesArrayToBitmap().isSubsetOf(m2QuorumBitmap), OnlyM2QuorumsAllowed());
96+
9597
// Check if the operator has registered before
9698
bool operatorRegisteredBefore = _operatorInfo[msg.sender].status == OperatorStatus.REGISTERED;
9799

src/interfaces/IRegistryCoordinator.sol

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ interface IRegistryCoordinatorErrors is ISlashingRegistryCoordinatorErrors {
2020
error M2QuorumRegistrationIsDisabled();
2121
/// @notice Thrown when operator set operations are attempted while not enabled.
2222
error OperatorSetsNotEnabled();
23+
/// @notice Thrown when only M2 quorums are allowed.
24+
error OnlyM2QuorumsAllowed();
2325
}
2426

2527
interface IRegistryCoordinatorTypes is ISlashingRegistryCoordinatorTypes {}

0 commit comments

Comments
 (0)