-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gas Optimizations #47
Comments
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 7 points. |
Unused transfer function in NestedReserve
The transfer function in NestedReserve can be only called by NestedFactory, yet the factory doesn't use it. There are specific unit tests for this function but it is not used in the protocol.
Removing it will save 61414 gas on deployment costs.
Note: it is possible you are leaving it there for the future in case NestedFactory will be upgraded and you want this functionality to be possible. If so, this issue is invalid. But maybe it's just an old leftover.
Unused ETH variable in FeeSplitter
FeeSplitter contains an unused ETH variable:
You can remove it for cleanliness and to save 500 gas at deployment.
Change NestedFactory's ETH variable to be immutable
By changing this variable in NestedFactory to immutable instead of constant:
You will save 30-70 gas on various calls.
The text was updated successfully, but these errors were encountered: