IDefaultAdapter

Git Source

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

NameTypeDescription
<none>uint8decimalsCount 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

NameTypeDescription
roundIduint80Round identifier
answerint256Feed answer
startedAtuint256Round start timestamp
updatedAtuint256Round update timestamp
answeredInRounduint80The round in which the answer was computed

latestAnswer

Returns the latest answer

function latestAnswer() external view returns (int256);

Returns

NameTypeDescription
<none>int256answer Latest feed answer

latestTimestamp

Returns the latest timestamp

function latestTimestamp() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256timestamp Latest update timestamp

Structs

PriceConfig

struct PriceConfig {
    address defaultFeed; // chainlink & eOracle
    string toSymbol;
    uint256 underlyingDecimals;
}