IDefaultAdapter
Title: IDefaultAdapter
Author: Merge Layers Inc.
Default price adapter interface used for oracle feeds
Functions
decimals
Returns the decimals for the price feed
function decimals() external view returns (uint8);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint8 | decimalsCount Number of decimals |
latestRoundData
Returns the latest round data from the feed
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
Returns
| Name | Type | Description |
|---|---|---|
roundId | uint80 | Round identifier |
answer | int256 | Feed answer |
startedAt | uint256 | Round start timestamp |
updatedAt | uint256 | Round update timestamp |
answeredInRound | uint80 | The round in which the answer was computed |
latestAnswer
Returns the latest answer
function latestAnswer() external view returns (int256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | int256 | answer Latest feed answer |
latestTimestamp
Returns the latest timestamp
function latestTimestamp() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | timestamp Latest update timestamp |
Structs
PriceConfig
struct PriceConfig {
address defaultFeed; // chainlink & eOracle
string toSymbol;
uint256 underlyingDecimals;
}