From d1726a44837521f5fbe0cf8d54f897cdd985f82e Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 27 Nov 2024 10:09:04 +0100 Subject: [PATCH] Add penalty into `Withdrawn` event --- contracts/sfc/SFC.sol | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contracts/sfc/SFC.sol b/contracts/sfc/SFC.sol index 5fa1377..3adbc73 100644 --- a/contracts/sfc/SFC.sol +++ b/contracts/sfc/SFC.sol @@ -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); @@ -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.