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