WstETHOracleImpl
Inherits: OracleError
This contract is used to get the exchange rate between wstETH and stETH
State Variables
_WSTETH_PRICE_SCALER_MULTIPLIER
constant value for price scaling to reduce gas usage
uint256 internal immutable _WSTETH_PRICE_SCALER_MULTIPLIER;
_WSTETH
WSTETH contract, e.g. on mainnet 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
IWstETH internal immutable _WSTETH;
Functions
constructor
constructor sets the wstETH wstETH_
token address.
constructor(IWstETH wstETH_);
_getWstETHExchangeRate
Get the exchange rate from wstETH contract
function _getWstETHExchangeRate() internal view returns (uint256 rate_);
Returns
Name | Type | Description |
---|---|---|
rate_ | uint256 | The exchange rate in WSTETH_OUTPUT_DECIMALS |
wstETHOracleData
returns all wWtETH oracle related data as utility for easy off-chain use / block explorer in a single view method
function wstETHOracleData() public view returns (uint256 wstETHExchangeRate_, IWstETH wstETH_);