Open code423n4 opened 2 years ago
My personal judgments:
Now, here is the methodology I used for calculating a score for each gas report. I first assigned each submission to be either small-optimization (1 point), medium-optimization (5 points) or large-optimization (10 points), depending on how useful the optimization is. The score of a gas report is the sum of these points, divided by the maximum number of points achieved by a gas report. This maximum number was 10 points, achieved by #67.
The number of points achieved by this report is 3 points. Thus the final score of this gas report is (3/10)*100 = 30.
Change to:
// gas cost 35465
========================================================================
add unchecked
// gas cost 22440
========================================================================
i = 0
because the default of uint is already 0 https://github.com/code-423n4/2022-02-nested/blob/main/contracts/FeeSplitter.sol#L126considered removing 0 value can save gas
========================================================================
SafeERC20
Gas Optimization https://github.com/code-423n4/2022-02-nested/blob/main/contracts/NestedFactory.sol#L19 by not declaring thisand for example, use this:
========================================================================
Change to:
// gas cost 24684
========================================================================
Change to:
// gas cost 24919
========================================================================