ChainlinkOracleWrapper

A wrapper around a Chainlink price feed

Contract

​ChainlinkOracleWrapper.sol implements IOracle, CoreRef​

Description

Wraps a Chainlink oracle

Read-Only Functions

read

function read() external view returns (Decimal.D256 memory, bool);

Reads the oracle value and reports the peg as FEI per underlying. The boolean value returned informs whether the reported value is valid. Invalid means chainlink is reporting invalid data (<=0 price) or the contract is paused.

This method is pausable. If paused, it won't revert but it will return valid as false

isOutdated

function isOutdated() external view returns (bool);

Returns false unless Chainlink is reporting invalid data

chainlinkOracle

function chainlinkOracle() external returns (AggregatorV3Interface);

Returns the referenced Chainlink price feed for the oracle.

oracleDecimalsNormalizer

function oracleDecimalsNormalizer() external returns (uint256);

Return 10^(decimals) for the amount of decimals the Chainlink price feed uses

Public State-Changing Functions

update

function update() external returns (bool);

returns true as no update logic is needed

This method is pausable​

ABIs

​