Skip to content

Commit 9c73e50

Browse files
committed
fix: bls apk registry error
1 parent f5adbca commit 9c73e50

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/BLSApkRegistry.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
314314
}
315315

316316
function _checkRegistryCoordinator() internal view {
317-
require(msg.sender == address(registryCoordinator), OnlyRegistryCoordinatorOwner());
317+
require(msg.sender == address(registryCoordinator), OnlyRegistryCoordinator());
318318
}
319319

320320
function _checkRegistryCoordinatorOwner() internal view {

src/interfaces/IBLSApkRegistry.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ pragma solidity ^0.8.27;
44
import {BN254} from "../libraries/BN254.sol";
55

66
interface IBLSApkRegistryErrors {
7-
/// @notice Thrown when a non-RegistryCoordinator address calls a restricted function.
7+
/// @notice Thrown when a non-RegistryCoordinator owner address calls a restricted function.
88
error OnlyRegistryCoordinatorOwner();
9+
/// @notice Thrown when a non-RegistryCoordinator address calls a restricted function.
10+
error OnlyRegistryCoordinator();
911
/// @notice Thrown when attempting to initialize a quorum that already exists.
1012
error QuorumAlreadyExists();
1113
/// @notice Thrown when a quorum does not exist.

test/unit/BLSApkRegistryUnit.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ contract BLSApkRegistryUnitTests_configAndGetters is BLSApkRegistryUnitTests {
287287
cheats.assume(nonCoordinatorAddress != address(registryCoordinator));
288288

289289
cheats.prank(address(nonCoordinatorAddress));
290-
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinatorOwner.selector);
290+
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinator.selector);
291291
blsApkRegistry.initializeQuorum(defaultQuorumNumber);
292292
}
293293
}
@@ -306,7 +306,7 @@ contract BLSApkRegistryUnitTests_registerBLSPublicKey is BLSApkRegistryUnitTests
306306
registryCoordinator.pubkeyRegistrationMessageHash(defaultOperator);
307307

308308
cheats.prank(address(nonCoordinatorAddress));
309-
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinatorOwner.selector);
309+
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinator.selector);
310310
blsApkRegistry.registerBLSPublicKey(defaultOperator, pubkeyRegistrationParams, messageHash);
311311
}
312312

@@ -434,7 +434,7 @@ contract BLSApkRegistryUnitTests_registerOperator is BLSApkRegistryUnitTests {
434434
cheats.assume(nonCoordinatorAddress != address(registryCoordinator));
435435

436436
cheats.prank(nonCoordinatorAddress);
437-
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinatorOwner.selector);
437+
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinator.selector);
438438
blsApkRegistry.registerOperator(nonCoordinatorAddress, new bytes(0));
439439
}
440440

@@ -537,7 +537,7 @@ contract BLSApkRegistryUnitTests_deregisterOperator is BLSApkRegistryUnitTests {
537537
cheats.assume(nonCoordinatorAddress != address(registryCoordinator));
538538

539539
cheats.prank(nonCoordinatorAddress);
540-
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinatorOwner.selector);
540+
cheats.expectRevert(IBLSApkRegistryErrors.OnlyRegistryCoordinator.selector);
541541
blsApkRegistry.deregisterOperator(nonCoordinatorAddress, new bytes(0));
542542
}
543543

0 commit comments

Comments
 (0)