RedstoneOracleImpl2 ​
This contract is used to get the exchange rate from a Redstone Oracle
_REDSTONE2_ORACLE ​
solidity
contract IRedstoneOracle _REDSTONE2_ORACLE
Redstone price oracle to check for the exchange rate
_REDSTONE2_INVERT_RATE ​
solidity
bool _REDSTONE2_INVERT_RATE
Flag to invert the price or not (to e.g. for WETH/USDC pool return prive of USDC per 1 WETH)
_REDSTONE2_PRICE_SCALER_MULTIPLIER ​
solidity
uint256 _REDSTONE2_PRICE_SCALER_MULTIPLIER
constant value for price scaling to reduce gas usage
_REDSTONE2_INVERT_PRICE_DIVIDEND ​
solidity
uint256 _REDSTONE2_INVERT_PRICE_DIVIDEND
constant value for inverting price to reduce gas usage
_REDSTONE2_ORACLE_NOT_SET_ADDRESS ​
solidity
address _REDSTONE2_ORACLE_NOT_SET_ADDRESS
constructor ​
solidity
constructor(struct RedstoneStructs.RedstoneOracleData oracleData_) internal
constructor sets the Redstone oracle data
_getRedstoneExchangeRate2 ​
solidity
function _getRedstoneExchangeRate2() internal view returns (uint256 rate_)
Get the exchange rate from Redstone oracle
Parameters ​
Name | Type | Description |
---|
redstoneOracleData2 ​
solidity
function redstoneOracleData2() public view returns (uint256 redstoneExchangeRate_, contract IRedstoneOracle redstoneOracle_, bool redstoneInvertRate_)
returns all Redstone oracle related data as utility for easy off-chain use / block explorer in a single view method