@@ -33,7 +33,13 @@ contract Api3PartialAggregatorV2V3Interface is AggregatorV2V3Interface {
33
33
/// @dev AggregatorV2V3Interface users are already responsible with
34
34
/// validating the values that they receive (e.g., revert if the spot price
35
35
/// of an asset is negative). Therefore, this contract omits validation.
36
- function latestAnswer () external view override returns (int256 value ) {
36
+ function latestAnswer ()
37
+ external
38
+ view
39
+ virtual
40
+ override
41
+ returns (int256 value )
42
+ {
37
43
(value, ) = IProxy (api3Proxy).read ();
38
44
}
39
45
@@ -46,42 +52,51 @@ contract Api3PartialAggregatorV2V3Interface is AggregatorV2V3Interface {
46
52
function latestTimestamp ()
47
53
external
48
54
view
55
+ virtual
49
56
override
50
57
returns (uint256 timestamp )
51
58
{
52
59
(, timestamp) = IProxy (api3Proxy).read ();
53
60
}
54
61
55
62
/// @dev API3 feeds are updated asynchronously and not in rounds.
56
- function latestRound () external pure override returns (uint256 ) {
63
+ function latestRound () external view virtual override returns (uint256 ) {
57
64
revert FunctionIsNotSupported ();
58
65
}
59
66
60
67
/// @dev Functions that use the round ID as an argument are not supported.
61
- function getAnswer (uint256 ) external pure override returns (int256 ) {
68
+ function getAnswer (
69
+ uint256
70
+ ) external view virtual override returns (int256 ) {
62
71
revert FunctionIsNotSupported ();
63
72
}
64
73
65
74
/// @dev Functions that use the round ID as an argument are not supported.
66
- function getTimestamp (uint256 ) external pure returns (uint256 ) {
75
+ function getTimestamp (uint256 ) external view virtual returns (uint256 ) {
67
76
revert FunctionIsNotSupported ();
68
77
}
69
78
70
79
/// @dev API3 feeds always use 18 decimals.
71
- function decimals () external pure override returns (uint8 ) {
80
+ function decimals () external view virtual override returns (uint8 ) {
72
81
return 18 ;
73
82
}
74
83
75
84
/// @dev The deterministic proxy address acts as the description, and this
76
85
/// is left empty to save gas on contract deployment.
77
- function description () external pure override returns (string memory ) {
86
+ function description ()
87
+ external
88
+ view
89
+ virtual
90
+ override
91
+ returns (string memory )
92
+ {
78
93
return "" ;
79
94
}
80
95
81
96
/// @dev A unique version is chosen to easily check if an unverified
82
97
/// contract that acts as a Chainlink feed is an
83
98
/// Api3PartialAggregatorV2V3Interface.
84
- function version () external pure override returns (uint256 ) {
99
+ function version () external view virtual override returns (uint256 ) {
85
100
return 4913 ;
86
101
}
87
102
@@ -90,7 +105,8 @@ contract Api3PartialAggregatorV2V3Interface is AggregatorV2V3Interface {
90
105
uint80
91
106
)
92
107
external
93
- pure
108
+ view
109
+ virtual
94
110
override
95
111
returns (uint80 , int256 , uint256 , uint256 , uint80 )
96
112
{
@@ -103,6 +119,7 @@ contract Api3PartialAggregatorV2V3Interface is AggregatorV2V3Interface {
103
119
function latestRoundData ()
104
120
external
105
121
view
122
+ virtual
106
123
override
107
124
returns (
108
125
uint80 roundId ,
0 commit comments