Skip to content

Commit

Permalink
refactor: use
Browse files Browse the repository at this point in the history
  • Loading branch information
0xClandestine committed Jan 27, 2025
1 parent 7cb4449 commit 7601b74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/BLSApkRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
_processQuorumApkUpdate(quorumNumbers, pubkey);

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

/// @inheritdoc IBLSApkRegistry
Expand All @@ -52,7 +52,7 @@ contract BLSApkRegistry is BLSApkRegistryStorage {

// Update each quorum's aggregate pubkey
_processQuorumApkUpdate(quorumNumbers, pubkey.negate());
emit OperatorRemovedFromQuorums(operator, operatorToPubkeyHash[operator], quorumNumbers);
emit OperatorRemovedFromQuorums(operator, getOperatorId(operator), quorumNumbers);
}

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

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

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

Expand Down

0 comments on commit 7601b74

Please sign in to comment.