FluidOracleL2 ​
Base contract that any Fluid Oracle L2 must implement
_SEQUENCER_ORACLE ​
solidity
contract IChainlinkAggregatorV3 _SEQUENCER_ORACLE
Chainlink L2 Sequencer Uptime feed to detect sequencer outages
_SEQUENCER_MAX_GRACE_PERIOD ​
solidity
uint256 _SEQUENCER_MAX_GRACE_PERIOD
max time period until oracle assumes normal behavior after a sequencer outage.
constructor ​
solidity
constructor(address sequencerUptimeFeed_) internal
sets the L2 sequencer uptime Chainlink feed
sequencerL2Data ​
solidity
function sequencerL2Data() public view returns (address sequencerUptimeFeed_, uint256 maxGracePeriod_, bool isSequencerUp_, uint256 lastUptimeStartedAt_, uint256 gracePeriod_, bool gracePeriodPassed_, uint256 lastOutageStartedAt_, bool isSequencerUpAndValid_)
returns all sequencer uptime feed related data
_ensureSequencerUpAndValid ​
solidity
function _ensureSequencerUpAndValid() internal view
ensures that the sequencer is up and grace period has passed
getExchangeRate ​
solidity
function getExchangeRate() external view virtual returns (uint256 exchangeRate_)
Deprecated. Use getExchangeRateOperate()
and getExchangeRateLiquidate()
instead. Only implemented for backwards compatibility.
getExchangeRateOperate ​
solidity
function getExchangeRateOperate() external view virtual returns (uint256 exchangeRate_)
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for operates
getExchangeRateLiquidate ​
solidity
function getExchangeRateLiquidate() external view virtual returns (uint256 exchangeRate_)
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for liquidations