-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add Open Oracle v1 #138
base: master
Are you sure you want to change the base?
Add Open Oracle v1 #138
Conversation
This patch adds an open oracle v1 which is meant to align with the interface of the v1 oracle but support reading data from the open oracle. We simply use the token configuration information to pull the correct prices, in terms of Eth, for the given asset requeest.
} | ||
|
||
function getPrices(address asset) public override returns (uint256) { | ||
UniswapConfig.TokenConfig memory ethConfig = openOracleView.getTokenConfigBySymbol("ETH"); |
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.
holy crow, good thing those get configs were public
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.
Yeah, otherwise this would have been way more complex to build
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.
💪 👏
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
===========================================
+ Coverage 83.66% 97.23% +13.56%
===========================================
Files 5 7 +2
Lines 551 578 +27
Branches 148 151 +3
===========================================
+ Hits 461 562 +101
+ Misses 90 16 -74
|
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.
looks worth deploying to me, followed by some sanity checkin'
|
This patch adds an open oracle v1 which is meant to align with the interface of the v1 oracle but support reading data from the open oracle. We simply use the token configuration information to pull the correct prices, in terms of Eth, for the given asset requeest.