Open
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.
coburncoburn
reviewed
Sep 8, 2020
| } | ||
|
|
||
| function getPrices(address asset) public override returns (uint256) { | ||
| UniswapConfig.TokenConfig memory ethConfig = openOracleView.getTokenConfigBySymbol("ETH"); |
Contributor
There was a problem hiding this comment.
holy crow, good thing those get configs were public
Collaborator
Author
There was a problem hiding this comment.
Yeah, otherwise this would have been way more complex to build
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
|
coburncoburn
approved these changes
Sep 8, 2020
Contributor
coburncoburn
left a comment
There was a problem hiding this comment.
looks worth deploying to me, followed by some sanity checkin'
melyalex
approved these changes
Oct 2, 2020
|
Thugnasty777
approved these changes
May 19, 2021
philipjonsen
approved these changes
Apr 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.