-
Notifications
You must be signed in to change notification settings - Fork 11
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
Contract size improvements #1046
base: develop
Are you sure you want to change the base?
Conversation
…Adjustment' method logic into Pool contracts, update 'getExchangeRate' visibility to external
@@ -250,7 +250,7 @@ library Buckets { | |||
uint256 bucketLP_, | |||
uint256 bucketDeposit_, | |||
uint256 bucketPrice_ | |||
) internal pure returns (uint256) { | |||
) external pure returns (uint256) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating getExchangeRate
method visibility to external
created inconsistency in Buckets
Library but is only called in view method in Pool
contract.
Even though this really just looks like simple copy paste of moving different parts of the program around I am reluctant to make this change as close as we are to deployment. If we had another 4 days of invariant runs ahead of us before deploying to mainnet I would say fine but I think its too big a risk to make src changes like this without the invariant testing to back it up. I'm of the opinion that we leave it in it's PR form now then if we ever need the extra contract space we can add it. |
Description
_determineInflatorState
method and add the method logic into thePool
contract._getCollateralDustPricePrecisionAdjustment
method and add the method logic into theERC20Pool
contract.getExchangeRate
method visibility in theBuckets
library toexternal
as that was only called inside thebucketExchangeRate
method in thePool
contract which is aview
method.Purpose
Impact
24,540B (99.85%)
to24,329B (98.99%)
.23,597B (96.01%)
to23,375B (95.11%)
.Tasks