Skip to content

Commit

Permalink
Add penalty into Withdrawn event
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Nov 27, 2024
1 parent bf8fa72 commit d1726a4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/sfc/SFC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,13 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version {
);
event Delegated(address indexed delegator, uint256 indexed toValidatorID, uint256 amount);
event Undelegated(address indexed delegator, uint256 indexed toValidatorID, uint256 indexed wrID, uint256 amount);
event Withdrawn(address indexed delegator, uint256 indexed toValidatorID, uint256 indexed wrID, uint256 amount);
event Withdrawn(
address indexed delegator,
uint256 indexed toValidatorID,
uint256 indexed wrID,
uint256 amount,
uint256 penalty
);
event ClaimedRewards(address indexed delegator, uint256 indexed toValidatorID, uint256 rewards);
event RestakedRewards(address indexed delegator, uint256 indexed toValidatorID, uint256 rewards);
event BurntFTM(uint256 amount);
Expand Down Expand Up @@ -735,7 +741,7 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version {
}
_burnFTM(penalty);

emit Withdrawn(delegator, toValidatorID, wrID, amount);
emit Withdrawn(delegator, toValidatorID, wrID, amount - penalty, penalty);
}

/// Get highest epoch for which can be claimed rewards for the given validator.
Expand Down

0 comments on commit d1726a4

Please sign in to comment.