Skip to content

Commit

Permalink
reduce SLOAD calls in supplyTokenTo
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg authored and PierrickGT committed Jul 8, 2021
1 parent 14389a9 commit 5326431
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/SushiYieldSource.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ contract SushiYieldSource is IYieldSource {
sushiAddr.approve(address(sushiBar), amount);

ISushiBar bar = sushiBar;

sushi.transferFrom(msg.sender, address(this), amount);
sushi.approve(address(bar), amount);

uint256 beforeBalance = bar.balanceOf(address(this));

bar.enter(amount);
Expand Down

0 comments on commit 5326431

Please sign in to comment.