-
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
feat: use mapping instead of array for oracle observations #221
Conversation
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.
approved assuming it's cheaper
f7784a2
to
89ba783
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #221 +/- ##
=======================================
Coverage 68.21% 68.21%
=======================================
Files 12 12
Lines 623 623
=======================================
Hits 425 425
Misses 198 198 ☔ View full report in Codecov by Sentry. |
@@ -924,7 +924,7 @@ contract StablePairTest is BaseTest { | |||
bytes32 lEncoded = bytes32(abi.encodePacked(lLastInvariantAmp, lLastInvariant)); | |||
// hardcoding the slot for now as there is no way to access it publicly | |||
// this will break when we change the storage layout | |||
vm.store(address(_stablePair), bytes32(uint256(65_553)), lEncoded); | |||
vm.store(address(_stablePair), bytes32(uint256(18)), lEncoded); |
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.
had to change the storage slot as the storage layout has changed cuz we're no longer using an array for _observations
f292008
to
96520d1
Compare
96520d1
to
99cf211
Compare
Motivation
Solution
uint16
as the input type instead ofuint256
. But the gas changes are a mixed bag. Therefore not proceeding with that change