Skip to content

Commit

Permalink
IChainlinkOracle natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDeadCe11 committed Jul 24, 2024
1 parent 762cdb1 commit 6d79398
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/interfaces/oracles/IChainlinkOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,56 @@
pragma solidity 0.8.26;

interface IChainlinkOracle {
/**
* @notice returns the decimals of the result
*/
function decimals() external view returns (uint8 _decimals);

/**
* @notice returns the oracle description
*/
function description() external view returns (string memory _description);

/**
* @notice gets the answer for a specific roundId
* @param _roundId the round Id
* @return _answer the answer
*/
function getAnswer(uint256 _roundId) external view returns (int256 _answer);

/**
* @notice Retrieves Round data for a specific round
* @param __roundId the id of the desired round
* @return _roundId , _answer , _startedAt , _updateAt , _answeredInRound the round data
*/
function getRoundData(uint256 __roundId)
external
view
returns (uint256 _roundId, int256 _answer, uint256 _startedAt, uint256 _updatedAt, uint256 _answeredInRound);

/**
* @notice Retrieves the timestamp of a spcific round
* @param _roundId the round Id
* @return _timestamp the timestamp of the round
*/
function getTimestamp(uint256 _roundId) external view returns (uint256 _timestamp);

/**
* @notice Retrieves the latest round answer
* @return _latestAnswer the latest answer
*/
function latestAnswer() external view returns (int256 _latestAnswer);

/**
* @notice Retrieves the roundId of the latest round
* @return _latestRound the latest round Id
*/
function latestRound() external view returns (uint256 _latestRound);

/**
* @notice Retrieves Round data for the latest round
* @return _roundId , _answer , _startedAt , _updateAt , _answeredInRound the round data
*/
function latestRoundData()
external
view
Expand Down

0 comments on commit 6d79398

Please sign in to comment.