Skip to content

Commit

Permalink
Update Unipool.sol
Browse files Browse the repository at this point in the history
Add withdraw and stake requires
  • Loading branch information
CLINT authored Feb 10, 2020
1 parent 35dfa7c commit 7d1ffb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/Unipool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ contract Unipool is LPTokenWrapper, IRewardDistributionRecipient {
}

function stake(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
super.stake(amount);
emit Staked(msg.sender, amount);
}

function withdraw(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot withdraw 0");
super.withdraw(amount);
emit Withdrawn(msg.sender, amount);
}
Expand Down

0 comments on commit 7d1ffb2

Please sign in to comment.