-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bd497d
commit 736652b
Showing
11 changed files
with
415 additions
and
25 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,34 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.17; | ||
|
||
import "forge-std/Script.sol"; | ||
import { console } from "forge-std/console.sol"; | ||
import { MorphoFeedPTezETHDec24 } from "borrow-contracts/oracle/morpho/mainnet/MorphoFeedPTezETHDec24.sol"; | ||
import "utils/src/CommonUtils.sol"; | ||
import { IAccessControlManager } from "borrow-contracts/interfaces/IAccessControlManager.sol"; | ||
|
||
contract PTezETHOracleDeploy is Script, CommonUtils { | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); | ||
address deployer = vm.addr(deployerPrivateKey); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
// TODO | ||
uint256 chainId = CHAIN_ETHEREUM; | ||
address coreBorrow = _chainToContract(chainId, ContractType.CoreBorrow); | ||
uint32 _TWAP_DURATION = 30 minutes; | ||
uint256 _MAX_IMPLIED_RATE = 0.25 ether; | ||
// end TODO | ||
|
||
MorphoFeedPTezETHDec24 oracle = new MorphoFeedPTezETHDec24( | ||
IAccessControlManager(address(coreBorrow)), | ||
_MAX_IMPLIED_RATE, | ||
_TWAP_DURATION | ||
); | ||
(, int256 answer, , , ) = oracle.latestRoundData(); | ||
console.log("oracle value ", uint256(answer)); | ||
console.log("Successfully deployed PT-ezETH: ", address(oracle)); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
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