OracleExchangeRate

Git Source

Inherits: IExchangeRateProvider

Oracle exchange rate.

State Variables

oracle

Oracle address

address public oracle;

rateFunc

Rate function signature

bytes public rateFunc;

decimalsFunc

Decimals function signature

bytes public decimalsFunc;

Functions

constructor

Initialize the contract

constructor(address _oracle, bytes memory _rateFunc, bytes memory _decimalsFunc);

exchangeRate

Get the exchange rate

function exchangeRate() external view returns (uint256);

exchangeRateDecimals

Get the exchange rate decimals

function exchangeRateDecimals() external view returns (uint256);

Errors

InternalCallFailed

Error thrown when the internal call failed

error InternalCallFailed();