Skip to content

Commit ca38c55

Browse files
committed
chore: submodules
1 parent b1bd24d commit ca38c55

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "lib/forge-std"]
22
path = lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
4-
[submodule "lib/chainlink"]
5-
path = lib/chainlink
6-
url = https://github.com/smartcontractkit/chainlink
74
[submodule "lib/morpho-blue"]
85
path = lib/morpho-blue
96
url = https://github.com/morpho-labs/morpho-blue

lib/chainlink

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/morpho-blue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
/// @dev From
5+
/// https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol.
6+
interface AggregatorV3Interface {
7+
function decimals() external view returns (uint8);
8+
9+
function description() external view returns (string memory);
10+
11+
function version() external view returns (uint256);
12+
13+
function getRoundData(uint80 _roundId)
14+
external
15+
view
16+
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
17+
18+
function latestRoundData()
19+
external
20+
view
21+
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
22+
}

src/chainlink/libraries/DataFeedLib.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.0;
33

44
import {ErrorsLib} from "./ErrorsLib.sol";
5-
import {AggregatorV3Interface} from "chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
5+
import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol";
66

77
library DataFeedLib {
88
/// @dev Performing some security checks and returns the latest price of a feed.

test/chainlink/OracleTwoFeedsTest.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ contract OracleTwoFeedsTest is Test {
6868
}
6969

7070
function testNegativeAnswer(int256 price) public {
71-
vm.assume(price < 0);
71+
price = bound(price, type(int256).min, -1);
7272
FakeAggregator aggregator = new FakeAggregator();
7373
OracleTwoFeeds oracle =
7474
new OracleTwoFeeds(AggregatorV3Interface(address(aggregator)), AggregatorV3Interface(address(0)), 18, 0);

0 commit comments

Comments
 (0)