Skip to main content

ChainlinkOracleWrapper

Reads a Chainlink oracle value & wrap it under the standard Fei oracle interface

Functions

constructor

function constructor(
address _core,
address _chainlinkOracle
) public

ChainlinkOracleWrapper constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_chainlinkOracleaddressreference to the target Chainlink oracle

_init

function _init() internal

update

function update() external

updates the oracle price

no-op, Chainlink is updated automatically

isOutdated

function isOutdated() external returns (bool)

determine if read value is stale

Return Values

NameTypeDescription
[0]booltrue if read value is stale

read

function read() external returns (struct Decimal.D256, bool)

read the oracle price

Return Values

NameTypeDescription
[0]struct Decimal.D256oracle price
[1]booltrue if price is valid