Skip to content

IChainlinkAggregatorLike

Git Source

Interface for interacting with Chainlink price feed aggregators

This interface provides a simplified view of Chainlink aggregator contracts, focusing on the essential functions needed for price data retrieval. It follows the Chainlink AggregatorV3Interface pattern but with a reduced surface area.

Functions

decimals

Returns the number of decimals the aggregator responses represent

function decimals() external view returns (uint8);
Returns
NameTypeDescription
<none>uint8The number of decimals for the price data (e.g., 8 for USD pairs, 18 for ETH pairs)

latestRoundData

Returns detailed data for the latest round of price updates

This function provides comprehensive information about the latest price round, including timestamps and round identifiers. It is useful for verifying the freshness and reliability of the price data.

function latestRoundData()
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
Returns
NameTypeDescription
roundIduint80The identifier for the latest round
answerint256The latest price as a signed integer
startedAtuint256The timestamp when the round started
updatedAtuint256The timestamp when the round was last updated
answeredInRounduint80The round ID in which the answer was computed