Open code423n4 opened 2 years ago
Not true with optimizer, only valid for require
467 gas
Require would save gas at cost of functionality, not an optimization
Pretty sure you're getting savings only on the first revert, because this optimizes for the "bad path" will give it 0 gas savings
Total Gas Saved: 467
Change to:
// gas cost 45419
========================================================================
Change to:
// gas cost 23056
========================================================================
if
can save gas https://github.com/code-423n4/2022-02-concur/blob/main/contracts/MasterChef.sol#L118 // gas cost 24404Change to:
// gas cost 24392
========================================================================
Change to:
// gas cost 24162