Gas Optimizations #247
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
[G-01] Boolean declaration not necessary
require(pool.shutdown == false, "pool is closed");
could be changed to require(!pool.shutdown, "pool is closed");
to save gas.It also presents inconsistency to other instances where bools do not have explicit declaration.
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/convex-platform/contracts/contracts/Booster.sol#L400
[G-02] For loop optimization
Gas could be saved by:
Example:
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraLocker.sol#L174-L185
The text was updated successfully, but these errors were encountered: