Skip to content

Commit

Permalink
change event names
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Jul 18, 2023
1 parent 8210958 commit f2f25d2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/contracts/interfaces/IBLSPubkeyRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import "../libraries/BN254.sol";
interface IBLSPubkeyRegistry is IRegistry {
// EVENTS
// Emitted when a new operator pubkey is registered for a set of quorums
event PubkeyAddedToQuorums(
event OperatorAddedToQuorums(
address operator,
bytes quorumNumbers
);

// Emitted when an operator pubkey is removed from a set of quorums
event PubkeyRemovedFromQuorums(
event OperatorRemovedToQuorums(
address operator,
bytes quorumNumbers
);
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/middleware/BLSPubkeyRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ contract BLSPubkeyRegistry is IBLSPubkeyRegistry, Test {
// update each quorum's aggregate pubkey
_processQuorumApkUpdate(quorumNumbers, pubkey);
// emit event so offchain actors can update their state
emit PubkeyAddedToQuorums(operator, quorumNumbers);
emit OperatorAddedToQuorums(operator, quorumNumbers);
return pubkeyHash;
}

Expand All @@ -87,7 +87,7 @@ contract BLSPubkeyRegistry is IBLSPubkeyRegistry, Test {
// update each quorum's aggregate pubkey
_processQuorumApkUpdate(quorumNumbers, pubkey.negate());

emit PubkeyRemovedFromQuorums(operator, quorumNumbers);
emit OperatorAddedToQuorums(operator, quorumNumbers);
return pubkeyHash;
}

Expand Down
18 changes: 9 additions & 9 deletions src/test/unit/BLSRegistryCoordinatorWithIndicesUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {
);

// Emitted when a new operator pubkey is registered for a set of quorums
event PubkeyAddedToQuorums(
event OperatorAddedToQuorums(
address operator,
bytes quorumNumbers
);

// Emitted when an operator pubkey is removed from a set of quorums
event PubkeyRemovedFromQuorums(
event OperatorRemovedToQuorums(
address operator,
bytes quorumNumbers
);
Expand Down Expand Up @@ -85,7 +85,7 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {

cheats.prank(defaultOperator);
cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyAddedToQuorums(defaultOperator, quorumNumbers);
emit OperatorAddedToQuorums(defaultOperator, quorumNumbers);
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
emit StakeUpdate(defaultOperatorId, defaultQuorumNumber, defaultStake);
cheats.expectEmit(true, true, true, true, address(indexRegistry));
Expand Down Expand Up @@ -130,7 +130,7 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {

cheats.prank(defaultOperator);
cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyAddedToQuorums(defaultOperator, quorumNumbers);
emit OperatorAddedToQuorums(defaultOperator, quorumNumbers);

for (uint i = 0; i < quorumNumbers.length; i++) {
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
Expand Down Expand Up @@ -275,7 +275,7 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {
operatorIdsToSwap[0] = defaultOperatorId;

cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyRemovedFromQuorums(defaultOperator, quorumNumbers);
emit OperatorAddedToQuorums(defaultOperator, quorumNumbers);
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
emit StakeUpdate(defaultOperatorId, defaultQuorumNumber, 0);

Expand Down Expand Up @@ -328,7 +328,7 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {
}

cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyRemovedFromQuorums(defaultOperator, quorumNumbers);
emit OperatorAddedToQuorums(defaultOperator, quorumNumbers);
for (uint i = 0; i < quorumNumbers.length; i++) {
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
emit StakeUpdate(defaultOperatorId, uint8(quorumNumbers[i]), 0);
Expand Down Expand Up @@ -404,7 +404,7 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {
}

cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyRemovedFromQuorums(operatorToDerigister, operatorToDeregisterQuorumNumbers);
emit OperatorAddedToQuorums(operatorToDerigister, operatorToDeregisterQuorumNumbers);

for (uint i = 0; i < operatorToDeregisterQuorumNumbers.length; i++) {
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
Expand Down Expand Up @@ -496,14 +496,14 @@ contract BLSRegistryCoordinatorWithIndicesUnit is MockAVSDeployer {
cheats.prank(operatorToRegister);
cheats.roll(registrationBlockNumber);
cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyAddedToQuorums(operatorToRegister, quorumNumbers);
emit OperatorAddedToQuorums(operatorToRegister, quorumNumbers);
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
emit StakeUpdate(operatorToRegisterId, defaultQuorumNumber, registeringStake);
cheats.expectEmit(true, true, true, true, address(indexRegistry));
emit QuorumIndexUpdate(operatorToRegisterId, defaultQuorumNumber, numOperators);

cheats.expectEmit(true, true, true, true, address(blsPubkeyRegistry));
emit PubkeyRemovedFromQuorums(operatorKickParams[0].operator, quorumNumbers);
emit OperatorAddedToQuorums(operatorKickParams[0].operator, quorumNumbers);
cheats.expectEmit(true, true, true, true, address(stakeRegistry));
emit StakeUpdate(operatorToKickId, defaultQuorumNumber, 0);
cheats.expectEmit(true, true, true, true, address(indexRegistry));
Expand Down

0 comments on commit f2f25d2

Please sign in to comment.