ATOM-USDC Oracle Contract 📜
PairIndex 3
PairIndex 3
Price feed for Cosmos Atom (ATOM) price as it relates to USDC.
All of these contract use the underlying Slinky oracle on chain.
All price feed contracts adhere to the Chainlink AggregatorV3Interface
An interface for a decentralized price aggregator with historical round data.
Functions
decimals
Get the number of decimals used for the price data.
solidity
function decimals() external view returns (uint8);
function decimals() external view returns (uint8);
Returns
Name | Type | Description |
---|---|---|
<none> | uint8 | The number of decimals as a uint8 value. |
description
Get the description of the price aggregator.
solidity
function description() external view returns (string memory);
function description() external view returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | The description as a string. |
version
Get the version of the price aggregator.
solidity
function version() external view returns (uint256);
function version() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The version as a uint256 value. |
getRoundData
Get historical round data for the specified round ID.
solidity
function getRoundData(uint80 _roundId)
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
function getRoundData(uint80 _roundId)
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
Parameters
Name | Type | Description |
---|---|---|
_roundId | uint80 | The round ID for which the data is requested. |
Returns
Name | Type | Description |
---|---|---|
roundId | uint80 | The round ID as a uint80 value. |
answer | int256 | The price answer as an int256 value. |
startedAt | uint256 | The timestamp when the round started as a uint256 value. |
updatedAt | uint256 | The timestamp when the round was updated as a uint256 value. |
answeredInRound | uint80 | The round ID when the answer was last updated as a uint80 value. |
latestRoundData
Get the latest round data.
solidity
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
Returns
Name | Type | Description |
---|---|---|
roundId | uint80 | The round ID as a uint80 value. |
answer | int256 | The price answer as an int256 value. |
startedAt | uint256 | The timestamp when the round started as a uint256 value. |
updatedAt | uint256 | The timestamp when the round was updated as a uint256 value. |
answeredInRound | uint80 | The round ID when the answer was last updated as a uint80 value. |