AggregatorV3Interface’s Methods

decimals

Get the number of decimal places of the answer.

Returns the number of decimal places.

function decimals() external view returns (uint8)

description

Get the description of the aggregator this proxy points to.

Returns the description of the aggregator.

function description() external view returns (string memory)

version

Get the version of the aggregator this proxy points to.

Returns the version of the aggregator.

function version() external view returns (uint256)

getRoundData

Get the details of the input round ID. The input round ID’s details are the same as getTimestamp(uint256 roundId) method.

Returns

  • roundId: The round ID.

  • answer: The answer of the round ID.

  • startedAt: Timestamp of when the round started. (In our case, this value is the same as updatedAt)

  • updatedAt: Timestamp of when the round was updated.

  • answeredInRound: The round ID of the round in which the answer was computed. (In our case, this value is the same as roundId)

function getRoundData(uint80 _roundId)
    external 
    view 
    returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    )

latestRoundData

Get the details of the latest round.

Returns

  • roundId: The round ID.

  • answer: The answer of the round ID.

  • startedAt: Timestamp of when the round started. (In our case, this value is the same as updatedAt)

  • updatedAt: Timestamp of when the round was updated.

  • answeredInRound: The round ID of the round in which the answer was computed. (In our case, this value is the same as roundId)

function latestRoundData()
    external 
    view 
        returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    )

Last updated