Skip to content

Commit

Permalink
refactor: update StakeWithdrawn event signature to match StakeDeposited
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpetersatoshi authored and apbendi committed Nov 5, 2024
1 parent a750e29 commit 1709a2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/GovernanceStaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ abstract contract GovernanceStaker is INotifiableRewardReceiver, Multicall, EIP7
);

/// @notice Emitted when a depositor withdraws some portion of stake from a given deposit.
event StakeWithdrawn(DepositIdentifier indexed depositId, uint256 amount, uint256 depositBalance);
event StakeWithdrawn(
address owner, DepositIdentifier indexed depositId, uint256 amount, uint256 depositBalance
);

/// @notice Emitted when a deposit's delegatee is changed.
event DelegateeAltered(
Expand Down Expand Up @@ -949,7 +951,7 @@ abstract contract GovernanceStaker is INotifiableRewardReceiver, Multicall, EIP7
deposit.balance = _newBalance.toUint96();
deposit.earningPower = _newEarningPower.toUint96();
_stakeTokenSafeTransferFrom(address(surrogates[deposit.delegatee]), deposit.owner, _amount);
emit StakeWithdrawn(_depositId, _amount, deposit.balance);
emit StakeWithdrawn(deposit.owner, _depositId, _amount, deposit.balance);
}

/// @notice Internal convenience method which claims earned rewards.
Expand Down
2 changes: 1 addition & 1 deletion test/GovernanceStaker.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@ contract Withdraw is GovernanceStakerTest {

vm.expectEmit();
emit GovernanceStaker.StakeWithdrawn(
_depositId, _withdrawalAmount, _depositAmount - _withdrawalAmount
_depositor, _depositId, _withdrawalAmount, _depositAmount - _withdrawalAmount
);

vm.prank(_depositor);
Expand Down

0 comments on commit 1709a2f

Please sign in to comment.