Skip to content

Commit

Permalink
WithdrawalRequestProcessed event
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchepetov committed Aug 6, 2024
1 parent 54f9bc1 commit a1755a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/hardhat/contracts/RewardPoolV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ contract RewardPoolV2 is ERC20WrapperUpgradeable, OwnableUpgradeable {

event WithdrawalDelayChanged(uint256 newWithdrawalDelay);
event WithdrawalRequested(
uint256 indexed requestId,
address indexed requester,
uint256 indexed requestId,
uint256 value,
uint64 withdrawAfter
);
event WithdrawalRequestProcessed(uint256 indexed requestId, address indexed to);

error OnlyRequesterCanWithdrawToAnotherAddress(address requester);
error RequestDoesNotExist(uint256 requestId);
Expand Down Expand Up @@ -82,7 +83,7 @@ contract RewardPoolV2 is ERC20WrapperUpgradeable, OwnableUpgradeable {
withdrawAfter: withdrawAfter
});

emit WithdrawalRequested(requestId, msg.sender, value, withdrawAfter);
emit WithdrawalRequested(msg.sender, requestId, value, withdrawAfter);

return requestId;
}
Expand Down Expand Up @@ -150,6 +151,7 @@ contract RewardPoolV2 is ERC20WrapperUpgradeable, OwnableUpgradeable {
revert OnlyRequesterCanWithdrawToAnotherAddress(requester);

delete withdrawalRequests[requestId];
emit WithdrawalRequestProcessed(requestId, account);

return value;
}
Expand Down

0 comments on commit a1755a0

Please sign in to comment.