Skip to content
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(oracle): add univ3 and chainlink adapters #12

Merged
merged 17 commits into from
Aug 20, 2023
Merged

Conversation

Rubilmax
Copy link
Collaborator

@Rubilmax Rubilmax commented Aug 8, 2023

contracts/oracles/interfaces/IOracle.sol Outdated Show resolved Hide resolved
contracts/oracles/adapters/ChainlinkAggregatorAdapter.sol Outdated Show resolved Hide resolved
contracts/oracles/ChainlinkOracle.sol Outdated Show resolved Hide resolved
contracts/oracles/ChainlinkUniswapV3Oracle.sol Outdated Show resolved Hide resolved
contracts/oracles/ChainlinkUniswapV3Oracle.sol Outdated Show resolved Hide resolved
contracts/bulkers/BlueBulker.sol Outdated Show resolved Hide resolved
@Rubilmax Rubilmax marked this pull request as draft August 10, 2023 10:19
@MerlinEgalite MerlinEgalite self-assigned this Aug 19, 2023
@MerlinEgalite MerlinEgalite marked this pull request as ready for review August 19, 2023 14:16
@@ -6,6 +6,7 @@ import {IChainlinkAggregatorV3} from "../adapters/interfaces/IChainlinkAggregato
library ChainlinkAggregatorV3Lib {
function price(IChainlinkAggregatorV3 aggregator) internal view returns (uint256) {
(, int256 answer,,,) = aggregator.latestRoundData();
require(answer > 0, "ChainlinkAggregatorV3Lib: price is negative");
Copy link
Contributor

Choose a reason for hiding this comment

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

or zero

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes me think that we may not want to revert on 0, wdyt?

@MerlinEgalite MerlinEgalite merged commit f37a0b5 into main Aug 20, 2023
2 of 3 checks passed
@MerlinEgalite MerlinEgalite deleted the feat/oracles branch August 20, 2023 21:52
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.

Migrate oracles Uniswap and Chainlink
6 participants