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 { WeETHOracleImpl } from "../implementations/weETHOracleImpl.sol";
|
|
import { IWeETH } from "../interfaces/external/IWeETH.sol";
|
|
|
|
/// @title WeETHOracle
|
|
/// @notice Gets the exchange rate between weETH and eETH directly from the weETH contract.
|
|
contract WeETHOracle is FluidOracle, WeETHOracleImpl {
|
|
/// @notice constructor sets the weETH `weETH_` token address.
|
|
constructor(string memory infoName_, IWeETH weETH_) WeETHOracleImpl(weETH_) FluidOracle(infoName_) {}
|
|
|
|
/// @inheritdoc FluidOracle
|
|
function getExchangeRateOperate() public view override returns (uint256 exchangeRate_) {
|
|
return _getWeETHExchangeRate();
|
|
}
|
|
|
|
/// @inheritdoc FluidOracle
|
|
function getExchangeRateLiquidate() external view override returns (uint256 exchangeRate_) {
|
|
return _getWeETHExchangeRate();
|
|
}
|
|
|
|
/// @inheritdoc FluidOracle
|
|
function getExchangeRate() external view override returns (uint256 exchangeRate_) {
|
|
return getExchangeRateOperate();
|
|
}
|
|
}
|