AggregatorInterface v0.2.2 API Reference
An interface that defines the standard methods for accessing price feed data from an aggregator contract.
AggregatorInterface
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt)
Parameter | Type | Description |
---|
current | int256 | The updated answer |
roundId | uint256 | The round ID for which the answer was updated |
updatedAt | uint256 | The timestamp when the answer was updated |
event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt)
Parameter | Type | Description |
---|
roundId | uint256 | The round ID of the new round |
startedBy | address | The address of the account that started the round |
startedAt | uint256 | The timestamp when the round was started |
Retrieves the price answer for a specific round.
function getAnswer(uint256 roundId) external view returns (int256)
Parameter | Type | Description |
---|
roundId | uint256 | The round ID to get the answer for |
Parameter | Type | Description |
---|
(unnamed) | int256 | The answer for the given round ID |
Retrieves the timestamp for a specific round.
function getTimestamp(uint256 roundId) external view returns (uint256)
Parameter | Type | Description |
---|
roundId | uint256 | The round ID to get the timestamp for |
Parameter | Type | Description |
---|
(unnamed) | uint256 | The timestamp for the given round ID |
Retrieves the most recent price answer.
function latestAnswer() external view returns (int256)
Parameter | Type | Description |
---|
(unnamed) | int256 | The latest answer |
Retrieves the most recent round ID.
function latestRound() external view returns (uint256)
Parameter | Type | Description |
---|
(unnamed) | uint256 | The latest round ID |
Retrieves the timestamp of the most recent answer.
function latestTimestamp() external view returns (uint256)
Parameter | Type | Description |
---|
(unnamed) | uint256 | The timestamp of the latest answer |