So, if we want to fit with this interface, a RewardsWithdrawn event should be emitted.
Considering that IApplication's RewardsWithdrawn has two parameters and TACoApplication's RewardPaid has four parameters, I see two feasible solutions:
withdrawRewards function in TACoApplication contract emits the IApplication's RewardsWithdrawn event in addition to the currently emitted RewardPaid event.
Modify IApplication's RewardsWithdrawn event so the parameters are the same as RewardPaid (sender | stakingProvider | beneficiary | reward instead of stakingProvider | reward). This solution is probably less realistic since this will need to update deployed contracts like tBTC and RandomBeacon:
Interface for Threshold applications includes an event
RewardsWithdrawn
intended to be emitted with the withdrawRewards is called (if it succeeds).https://github.com/threshold-network/solidity-contracts/blob/8fcf42c6fcb50bb7730155bd5b99239b7b30382d/contracts/staking/IApplication.sol#L26
But in TACo application this event is not emitted.
RewardPaid
is emitted instead.https://github.com/nucypher/nucypher-contracts/blob/07ce241f1186e46342fc74a213ab81d5a791862f/contracts/contracts/TACoApplication.sol#L559
So, if we want to fit with this interface, a
RewardsWithdrawn
event should be emitted.Considering that IApplication's
RewardsWithdrawn
has two parameters and TACoApplication'sRewardPaid
has four parameters, I see two feasible solutions:withdrawRewards
function inTACoApplication
contract emits the IApplication'sRewardsWithdrawn
event in addition to the currently emittedRewardPaid
event.Modify IApplication's
RewardsWithdrawn
event so the parameters are the same asRewardPaid
(sender | stakingProvider | beneficiary | reward
instead ofstakingProvider | reward
). This solution is probably less realistic since this will need to update deployed contracts like tBTC and RandomBeacon:https://github.com/keep-network/keep-core/blob/7b46b2179e525e848ced5fe67445c109da8f3dfb/solidity/ecdsa/contracts/WalletRegistry.sol#L364
Related issue: https://github.com/threshold-network/solidity-contracts/issues/156