Skip to content

Conversation

@hayesgm
Copy link
Collaborator

@hayesgm hayesgm commented Sep 8, 2020

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.

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");
Copy link
Contributor

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

Copy link
Collaborator Author

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

Copy link
Contributor

@jflatow jflatow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪 👏

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2020

Codecov Report

Merging #138 into master will increase coverage by 13.56%.
The diff coverage is 91.30%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
contracts/v1/OpenOracleV1.sol 91.30% <91.30%> (ø)
contracts/OpenOracleView.sol 50.00% <0.00%> (ø)
contracts/Uniswap/UniswapConfig.sol 98.21% <0.00%> (+19.84%) ⬆️

Copy link
Contributor

@coburncoburn coburncoburn left a 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'

@Asim-tech235
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants