Skip to content

Commit

Permalink
fix: W16: Event inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vgorkavenko authored and dgusakov committed Sep 11, 2024
1 parent 3b268f9 commit 1eaef58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CSModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ contract CSModule is
uint256 indexed nodeOperatorId,
uint256 amount
);
event ELRewardsStealingPenaltyCompensated(
uint256 indexed nodeOperatorId,
uint256 amount
);
event ELRewardsStealingPenaltySettled(uint256 indexed nodeOperatorId);

error SenderIsNotEligible();
Expand Down Expand Up @@ -1089,6 +1093,7 @@ contract CSModule is
nodeOperatorId: nodeOperatorId,
incrementNonceIfUpdated: true
});
emit ELRewardsStealingPenaltyCompensated(nodeOperatorId, msg.value);
}

/// @notice Report Node Operator's key as withdrawn and settle withdrawn amount
Expand Down
6 changes: 6 additions & 0 deletions test/CSModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5925,6 +5925,9 @@ contract CSMCompensateELRewardsStealingPenalty is CSMCommon {

uint256 nonce = csm.getNonce();

vm.expectEmit(true, true, true, true, address(csm));
emit CSModule.ELRewardsStealingPenaltyCompensated(noId, amount + fine);

vm.expectCall(
address(accounting),
abi.encodeWithSelector(
Expand Down Expand Up @@ -5956,6 +5959,9 @@ contract CSMCompensateELRewardsStealingPenalty is CSMCommon {

uint256 nonce = csm.getNonce();

vm.expectEmit(true, true, true, true, address(csm));
emit CSModule.ELRewardsStealingPenaltyCompensated(noId, amount);

vm.expectCall(
address(accounting),
abi.encodeWithSelector(
Expand Down

0 comments on commit 1eaef58

Please sign in to comment.