FallbackCLRSOracleL2 ​
Inherits:FluidOracleL2, FallbackCLRSOracle
Gets the exchange rate between the underlying asset and the peg asset by using: the price from a Chainlink price feed or a Redstone Oracle with one of them being used as main source and the other one acting as a fallback if the main source fails for any reason. Reverts if fetched rate is 0.
Functions ​
constructor ​
sets the main source, Chainlink Oracle and Redstone Oracle data.
solidity
constructor(string memory infoName_, CLRSConstructorParams memory cLRSParams_, address sequencerUptimeFeed_)
FallbackCLRSOracle(infoName_, cLRSParams_.mainSource, cLRSParams_.chainlinkParams, cLRSParams_.redstoneOracle)
FluidOracleL2(sequencerUptimeFeed_);
Parameters
Name | Type | Description |
---|---|---|
infoName_ | string | Oracle identify helper name. |
cLRSParams_ | CLRSConstructorParams | CLRS Fallback Oracle data |
sequencerUptimeFeed_ | address | L2 sequencer uptime Chainlink feed |
getExchangeRateOperate ​
solidity
function getExchangeRateOperate()
public
view
virtual
override(FallbackCLRSOracle, FluidOracleL2)
returns (uint256 exchangeRate_);
getExchangeRateLiquidate ​
solidity
function getExchangeRateLiquidate()
public
view
virtual
override(FallbackCLRSOracle, FluidOracleL2)
returns (uint256 exchangeRate_);
getExchangeRate ​
solidity
function getExchangeRate()
public
view
virtual
override(FallbackCLRSOracle, FluidOracleL2)
returns (uint256 exchangeRate_);
Structs ​
CLRSConstructorParams ​
solidity
struct CLRSConstructorParams {
uint8 mainSource;
ChainlinkConstructorParams chainlinkParams;
RedstoneOracleData redstoneOracle;
}