forked from VenusProtocol/oracle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update deploy script accord to contract changes
- Loading branch information
Showing
7 changed files
with
46 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity 0.8.25; | ||
|
||
import { IStETH } from "../interfaces/IStETH.sol"; | ||
import { CorrelatedTokenOracle } from "./common/CorrelatedTokenOracle.sol"; | ||
import { EXP_SCALE } from "@venusprotocol/solidity-utilities/contracts/constants.sol"; | ||
|
||
/** | ||
* @title WstETHOracle renamed from WstETHOracleV2 in venus | ||
* @author Venus | ||
* @notice This oracle fetches the price of wstETH | ||
*/ | ||
contract WstETHOracle is CorrelatedTokenOracle { | ||
/// @notice Constructor for the implementation contract. | ||
/// @custom:oz-upgrades-unsafe-allow constructor | ||
constructor( | ||
address wstETH, | ||
address stETH, | ||
address resilientOracle | ||
) CorrelatedTokenOracle(wstETH, stETH, resilientOracle) {} | ||
|
||
/** | ||
* @notice Gets the stETH for 1 wstETH | ||
* @return amount Amount of stETH | ||
*/ | ||
function _getUnderlyingAmount() internal view override returns (uint256) { | ||
return IStETH(UNDERLYING_TOKEN).getPooledEthByShares(EXP_SCALE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters