Skip to content

Commit 7601b74

Browse files
committed
refactor: use
1 parent 7cb4449 commit 7601b74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/BLSApkRegistry.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
3939
_processQuorumApkUpdate(quorumNumbers, pubkey);
4040

4141
// Return pubkeyHash, which will become the operator's unique id
42-
emit OperatorAddedToQuorums(operator, operatorToPubkeyHash[operator], quorumNumbers);
42+
emit OperatorAddedToQuorums(operator, getOperatorId(operator), quorumNumbers);
4343
}
4444

4545
/// @inheritdoc IBLSApkRegistry
@@ -52,7 +52,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
5252

5353
// Update each quorum's aggregate pubkey
5454
_processQuorumApkUpdate(quorumNumbers, pubkey.negate());
55-
emit OperatorRemovedFromQuorums(operator, operatorToPubkeyHash[operator], quorumNumbers);
55+
emit OperatorRemovedFromQuorums(operator, getOperatorId(operator), quorumNumbers);
5656
}
5757

5858
/// @inheritdoc IBLSApkRegistry
@@ -78,7 +78,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
7878
) external onlyRegistryCoordinator returns (bytes32 operatorId) {
7979
bytes32 pubkeyHash = BN254.hashG1Point(params.pubkeyG1);
8080
require(pubkeyHash != ZERO_PK_HASH, ZeroPubKey());
81-
require(operatorToPubkeyHash[operator] == bytes32(0), OperatorAlreadyRegistered());
81+
require(getOperatorId(operator) == bytes32(0), OperatorAlreadyRegistered());
8282
require(pubkeyHashToOperator[pubkeyHash] == address(0), BLSPubkeyAlreadyRegistered());
8383

8484
// gamma = h(sigma, P, P', H(m))
@@ -167,7 +167,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
167167
address operator
168168
) public view returns (BN254.G1Point memory, bytes32) {
169169
BN254.G1Point memory pubkey = operatorToPubkey[operator];
170-
bytes32 pubkeyHash = operatorToPubkeyHash[operator];
170+
bytes32 pubkeyHash = getOperatorId(operator);
171171

172172
require(pubkeyHash != bytes32(0), OperatorNotRegistered());
173173

0 commit comments

Comments
 (0)