From ba7d9732debfc43bb7ab6bd7679672b93500c8c1 Mon Sep 17 00:00:00 2001 From: Ross Campbell <41117279+Ro5s@users.noreply.github.com> Date: Thu, 15 Apr 2021 09:54:46 -0400 Subject: [PATCH] Update MasterChefV2.sol nits: add natspec to `withdrawAndHarvest()`, remove trailing spaces. --- contracts/MasterChefV2.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/MasterChefV2.sol b/contracts/MasterChefV2.sol index 3301a17bc3..b1b04d6bf3 100644 --- a/contracts/MasterChefV2.sol +++ b/contracts/MasterChefV2.sol @@ -229,7 +229,6 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable { // solhint-disable-next-line _rewarder.call{ gas: gasleft() - 5000 }(abi.encodeWithSelector(SIG_ON_SUSHI_REWARD, pid, to, 0, user.amount)); } - } /// @notice Withdraw LP tokens from MCV2. @@ -257,7 +256,6 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable { // solhint-disable-next-line _rewarder.call{ gas: gasleft() - 5000 }(abi.encodeWithSelector(SIG_ON_SUSHI_REWARD, pid, msg.sender, 0, user.amount)); } - } /// @notice Harvest proceeds for transaction sender to `to`. @@ -287,9 +285,12 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable { // solhint-disable-next-line _rewarder.call{ gas: gasleft() - 5000 }(abi.encodeWithSelector(SIG_ON_SUSHI_REWARD, pid, to, _pendingSushi, user.amount)); } - } - + + /// @notice Withdraw LP tokens from MCV2 and harvest proceeds for transaction sender to `to`. + /// @param pid The index of the pool. See `poolInfo`. + /// @param amount LP token amount to withdraw. + /// @param to Receiver of the LP tokens and SUSHI rewards. function withdrawAndHarvest(uint256 pid, uint256 amount, address to) public { PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; @@ -315,7 +316,6 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable { // solhint-disable-next-line _rewarder.call{ gas: gasleft() - 5000 }(abi.encodeWithSelector(SIG_ON_SUSHI_REWARD, pid, to, _pendingSushi, user.amount)); } - } /// @notice Harvests SUSHI from `MASTER_CHEF` MCV1 and pool `MASTER_PID` to this MCV2 contract.