Skip to content

Commit b7e95c3

Browse files
committed
chore: minor fixes
1 parent 79d1486 commit b7e95c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/ChainlinkOracle.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ contract ChainlinkOracle is IOracle {
4949
// common quote currency.
5050
// Chainlink feeds return pB1*b1FeedPrecision, pB2*b2FeedPrecision, pQ1*q1FeedPrecision and pQ2*q2FeedPrecision.
5151
// `price()` should return 1e36 * (pB1/1e(b1Decimals) * pB2/1e(b2Decimals)) / (pQ1/1e(q1Decimals) *
52-
// pQ2/1e(q2Decimals)).
52+
// pQ2/1e(q2Decimals))
5353
// Yet `price()` returns (pB1*1e(b1FeedPrecision) * pB2*1e(b2FeedPrecision) * SCALE_FACTOR) /
5454
// (pQ1*1e(q1FeedPrecision) * pQ2*1e(q2FeedPrecision))
5555
// So 1e36 * (pB1/1e(b1Decimals) * pB2/1e(b2Decimals)) / (pQ1/1e(q1Decimals) * pQ2/1e(q2Decimals)) =
@@ -61,8 +61,8 @@ contract ChainlinkOracle is IOracle {
6161
// b2Decimals - b1FeedPrecision - b2FeedPrecision)
6262
SCALE_FACTOR = 10
6363
** (
64-
36 + quoteTokenDecimals + quoteFeed1.getDecimals() + quoteFeed2.getDecimals() - baseFeed1.getDecimals()
65-
- baseFeed2.getDecimals() - baseTokenDecimals
64+
36 + quoteTokenDecimals + quoteFeed1.getDecimals() + quoteFeed2.getDecimals() - baseTokenDecimals
65+
- baseFeed1.getDecimals() - baseFeed2.getDecimals()
6666
);
6767
}
6868

test/ChainlinkOracleTest.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
44
import "forge-std/Test.sol";
55
import "src/ChainlinkOracle.sol";
66
import "src/libraries/ErrorsLib.sol";
7-
import "./mock/ChainlinkAggregatorMock.sol";
7+
import "./mocks/ChainlinkAggregatorMock.sol";
88

99
AggregatorV3Interface constant feedZero = AggregatorV3Interface(address(0));
1010
// 8 decimals of precision

0 commit comments

Comments
 (0)