Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SortitionPool.withdrawRewards returns the amount of rewards withdrawn #163

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

pdyraga
Copy link
Member

@pdyraga pdyraga commented Apr 25, 2022

Depends on #162; Please do not merge until #162 is not in main.

This allows to emit an event in application contract with the amount of
rewards withdrawn. It will be helpful for the dApp when rendering
rewards page.

pdyraga added 2 commits April 25, 2022 08:48
This allows to emit an event in application contract with the amount of
rewards withdrawn. It will be helpful for the dApp when rendering
rewards page.
@pdyraga pdyraga requested review from eth-r and beaurancourt April 25, 2022 06:53
@pdyraga pdyraga self-assigned this Apr 25, 2022
Base automatically changed from rewards-info to main April 25, 2022 19:12
{
uint32 id = getOperatorID(operator);
Rewards.updateOperatorRewards(id, uint32(getPoolWeight(operator)));
uint96 earned = Rewards.withdrawOperatorRewards(id);
rewardToken.transfer(beneficiary, uint256(earned));
return earned;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not going to block this PR for it, but I just merged #162 that uses this function in tests.

Now that we have a return value, we should assert that the return value of withdrawRewards is correct!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants