Skip to content

Commit

Permalink
chore: submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Oct 4, 2023
1 parent b1bd24d commit ca38c55
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/chainlink"]
path = lib/chainlink
url = https://github.com/smartcontractkit/chainlink
[submodule "lib/morpho-blue"]
path = lib/morpho-blue
url = https://github.com/morpho-labs/morpho-blue
1 change: 0 additions & 1 deletion lib/chainlink
Submodule chainlink deleted from 6163d1
2 changes: 1 addition & 1 deletion lib/morpho-blue
22 changes: 22 additions & 0 deletions src/chainlink/interfaces/AggregatorV3Interface.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @dev From
/// https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol.
interface AggregatorV3Interface {
function decimals() external view returns (uint8);

function description() external view returns (string memory);

function version() external view returns (uint256);

function getRoundData(uint80 _roundId)
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
2 changes: 1 addition & 1 deletion src/chainlink/libraries/DataFeedLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import {ErrorsLib} from "./ErrorsLib.sol";
import {AggregatorV3Interface} from "chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol";

library DataFeedLib {
/// @dev Performing some security checks and returns the latest price of a feed.
Expand Down
2 changes: 1 addition & 1 deletion test/chainlink/OracleTwoFeedsTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ contract OracleTwoFeedsTest is Test {
}

function testNegativeAnswer(int256 price) public {
vm.assume(price < 0);
price = bound(price, type(int256).min, -1);
FakeAggregator aggregator = new FakeAggregator();
OracleTwoFeeds oracle =
new OracleTwoFeeds(AggregatorV3Interface(address(aggregator)), AggregatorV3Interface(address(0)), 18, 0);
Expand Down

0 comments on commit ca38c55

Please sign in to comment.