@@ -11,48 +11,48 @@ contract OracleFourFeeds is IOracle {
11
11
/* CONSTANT */
12
12
13
13
/// @notice First base feed.
14
- AggregatorV3Interface public immutable FIRST_BASE_FEED ;
14
+ AggregatorV3Interface public immutable BASE_FEED_1 ;
15
15
/// @notice Second base feed.
16
- AggregatorV3Interface public immutable SECOND_BASE_FEED ;
16
+ AggregatorV3Interface public immutable BASE_FEED_2 ;
17
17
/// @notice First quote feed.
18
- AggregatorV3Interface public immutable FIRST_QUOTE_FEED ;
18
+ AggregatorV3Interface public immutable QUOTE_FEED_1 ;
19
19
/// @notice Second quote feed.
20
- AggregatorV3Interface public immutable SECOND_QUOTE_FEED ;
20
+ AggregatorV3Interface public immutable QUOTE_FEED_2 ;
21
21
/// @notice Price scale factor, computed at contract creation.
22
22
uint256 public immutable SCALE_FACTOR;
23
23
24
24
/* CONSTRUCTOR */
25
25
26
- /// @param firstBaseFeed First base feed. Pass address zero if the price = 1.
27
- /// @param secondBaseFeed Second base feed. Pass address zero if the price = 1.
28
- /// @param firstQuoteFeed Quote feed. Pass address zero if the price = 1.
29
- /// @param secondQuoteFeed Quote feed. Pass address zero if the price = 1.
26
+ /// @param baseFeed1 First base feed. Pass address zero if the price = 1.
27
+ /// @param baseFeed2 Second base feed. Pass address zero if the price = 1.
28
+ /// @param quoteFeed1 First quote feed. Pass address zero if the price = 1.
29
+ /// @param quoteFeed2 Second quote feed. Pass address zero if the price = 1.
30
30
/// @param baseTokenDecimals Base token decimals.
31
31
/// @param quoteTokenDecimals Quote token decimals.
32
32
constructor (
33
- AggregatorV3Interface firstBaseFeed ,
34
- AggregatorV3Interface secondBaseFeed ,
35
- AggregatorV3Interface firstQuoteFeed ,
36
- AggregatorV3Interface secondQuoteFeed ,
33
+ AggregatorV3Interface baseFeed1 ,
34
+ AggregatorV3Interface baseFeed2 ,
35
+ AggregatorV3Interface quoteFeed1 ,
36
+ AggregatorV3Interface quoteFeed2 ,
37
37
uint256 baseTokenDecimals ,
38
38
uint256 quoteTokenDecimals
39
39
) {
40
- FIRST_BASE_FEED = firstBaseFeed ;
41
- SECOND_BASE_FEED = secondBaseFeed ;
42
- FIRST_QUOTE_FEED = firstQuoteFeed ;
43
- SECOND_QUOTE_FEED = secondQuoteFeed ;
40
+ BASE_FEED_1 = baseFeed1 ;
41
+ BASE_FEED_2 = baseFeed2 ;
42
+ QUOTE_FEED_1 = quoteFeed1 ;
43
+ QUOTE_FEED_2 = quoteFeed2 ;
44
44
SCALE_FACTOR = 10
45
45
** (
46
- 36 + quoteTokenDecimals + firstQuoteFeed .getDecimals () + secondQuoteFeed .getDecimals ()
47
- - firstBaseFeed .getDecimals () - secondBaseFeed .getDecimals () - baseTokenDecimals
46
+ 36 + quoteTokenDecimals + quoteFeed1 .getDecimals () + quoteFeed2 .getDecimals ()
47
+ - baseFeed1 .getDecimals () - baseFeed2 .getDecimals () - baseTokenDecimals
48
48
);
49
49
}
50
50
51
51
/* PRICE */
52
52
53
53
/// @inheritdoc IOracle
54
54
function price () external view returns (uint256 ) {
55
- return (FIRST_BASE_FEED .getPrice () * SECOND_BASE_FEED .getPrice () * SCALE_FACTOR)
56
- / (FIRST_QUOTE_FEED .getPrice () * SECOND_QUOTE_FEED .getPrice ());
55
+ return (BASE_FEED_1 .getPrice () * BASE_FEED_2 .getPrice () * SCALE_FACTOR)
56
+ / (QUOTE_FEED_1 .getPrice () * QUOTE_FEED_2 .getPrice ());
57
57
}
58
58
}
0 commit comments