Skip to content

Commit b1bd24d

Browse files
committed
chore: fmt
1 parent 0063cb0 commit b1bd24d

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/chainlink/OracleFourFeeds.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ contract OracleFourFeeds is IOracle {
4343
QUOTE_FEED_2 = quoteFeed2;
4444
SCALE_FACTOR = 10
4545
** (
46-
36 + quoteTokenDecimals + quoteFeed1.getDecimals() + quoteFeed2.getDecimals()
47-
- baseFeed1.getDecimals() - baseFeed2.getDecimals() - baseTokenDecimals
46+
36 + quoteTokenDecimals + quoteFeed1.getDecimals() + quoteFeed2.getDecimals() - baseFeed1.getDecimals()
47+
- baseFeed2.getDecimals() - baseTokenDecimals
4848
);
4949
}
5050

test/chainlink/OracleFourFeedsTest.sol

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,28 @@ contract OracleFourFeedsTest is Test {
2020
}
2121

2222
function testOracleWbtcUsdc() public {
23-
OracleFourFeeds oracle = new OracleFourFeeds(wBtcBtcFeed, btcUsdFeed, usdcUsdFeed, AggregatorV3Interface(address(0)), 8, 6);
23+
OracleFourFeeds oracle =
24+
new OracleFourFeeds(wBtcBtcFeed, btcUsdFeed, usdcUsdFeed, AggregatorV3Interface(address(0)), 8, 6);
2425
(, int256 firstBaseAnswer,,,) = wBtcBtcFeed.latestRoundData();
2526
(, int256 secondBaseAnswer,,,) = btcUsdFeed.latestRoundData();
2627
(, int256 quoteAnswer,,,) = usdcUsdFeed.latestRoundData();
2728
assertEq(
2829
oracle.price(),
29-
(uint256(firstBaseAnswer) * uint256(secondBaseAnswer) * 10 ** (36 + 8 + 6 - 8 - 8 - 8)) / uint256(quoteAnswer)
30+
(uint256(firstBaseAnswer) * uint256(secondBaseAnswer) * 10 ** (36 + 8 + 6 - 8 - 8 - 8))
31+
/ uint256(quoteAnswer)
3032
);
3133
}
3234

3335
function testOracleUsdcWbtc() public {
34-
OracleFourFeeds oracle = new OracleFourFeeds(usdcUsdFeed, AggregatorV3Interface(address(0)), wBtcBtcFeed, btcUsdFeed, 6, 8);
36+
OracleFourFeeds oracle =
37+
new OracleFourFeeds(usdcUsdFeed, AggregatorV3Interface(address(0)), wBtcBtcFeed, btcUsdFeed, 6, 8);
3538
(, int256 baseAnswer,,,) = usdcUsdFeed.latestRoundData();
3639
(, int256 firstQuoteAnswer,,,) = wBtcBtcFeed.latestRoundData();
3740
(, int256 secondQuoteAnswer,,,) = btcUsdFeed.latestRoundData();
3841
assertEq(
3942
oracle.price(),
40-
(uint256(baseAnswer) * 10 ** (36 + 8 + 8 + 8 - 6 - 8)) / (uint256(firstQuoteAnswer) * uint256(secondQuoteAnswer))
43+
(uint256(baseAnswer) * 10 ** (36 + 8 + 8 + 8 - 6 - 8))
44+
/ (uint256(firstQuoteAnswer) * uint256(secondQuoteAnswer))
4145
);
4246
}
4347

test/chainlink/OracleTwoFeedsTest.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ contract OracleTwoFeedsTest is Test {
6767
assertApproxEqRel(oracle.price(), 1e36 / 1e6, 0.01 ether);
6868
}
6969

70-
function testNegativeAnswer(int price) public {
70+
function testNegativeAnswer(int256 price) public {
7171
vm.assume(price < 0);
7272
FakeAggregator aggregator = new FakeAggregator();
7373
OracleTwoFeeds oracle =

0 commit comments

Comments
 (0)