mirror of
https://github.com/Instadapp/fluid-contracts-public.git
synced 2024-07-29 21:57:37 +00:00
d7a58e88ff
ARB: deploy protocols
29 lines
1.1 KiB
Solidity
29 lines
1.1 KiB
Solidity
// SPDX-License-Identifier: BUSL-1.1
|
|
pragma solidity 0.8.21;
|
|
|
|
import { FluidOracle } from "../fluidOracle.sol";
|
|
import { WstETHOracleImpl } from "../implementations/wstETHOracleImpl.sol";
|
|
import { IWstETH } from "../interfaces/external/IWstETH.sol";
|
|
|
|
/// @title WstETHOracle
|
|
/// @notice Gets the exchange rate between wstETH and stETH directly from the wstETH contract.
|
|
contract WstETHOracle is FluidOracle, WstETHOracleImpl {
|
|
/// @notice constructor sets the wstETH `wstETH_` token address.
|
|
constructor(string memory infoName_, IWstETH wstETH_) WstETHOracleImpl(wstETH_) FluidOracle(infoName_) {}
|
|
|
|
/// @inheritdoc FluidOracle
|
|
function getExchangeRateOperate() public view override returns (uint256 exchangeRate_) {
|
|
return _getWstETHExchangeRate();
|
|
}
|
|
|
|
/// @inheritdoc FluidOracle
|
|
function getExchangeRateLiquidate() external view override returns (uint256 exchangeRate_) {
|
|
return _getWstETHExchangeRate();
|
|
}
|
|
|
|
/// @inheritdoc FluidOracle
|
|
function getExchangeRate() external view override returns (uint256 exchangeRate_) {
|
|
return getExchangeRateOperate();
|
|
}
|
|
}
|