Skip to content

Commit

Permalink
deployed Pendle PT LRT oracles
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeNervoXS committed Jun 12, 2024
1 parent 6bd497d commit 736652b
Show file tree
Hide file tree
Showing 11 changed files with 415 additions and 25 deletions.
52 changes: 52 additions & 0 deletions broadcast/PTezETHOracle.s.sol/1/run-1718178882.json

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions broadcast/PTezETHOracle.s.sol/1/run-1718179163.json

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions broadcast/PTezETHOracle.s.sol/1/run-latest.json

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions broadcast/PTweETHOracle.s.sol/1/run-1718178605.json

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions broadcast/PTweETHOracle.s.sol/1/run-1718178658.json

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions broadcast/PTweETHOracle.s.sol/1/run-1718178819.json

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions broadcast/PTweETHOracle.s.sol/1/run-1718179107.json

Large diffs are not rendered by default.

44 changes: 21 additions & 23 deletions broadcast/PTweETHOracle.s.sol/1/run-latest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"hardhat:compile": "hardhat compile",
"foundry:compile": "forge build",
"deploy": "forge script --skip test --broadcast --verify --slow -vvvv --rpc-url",
"deploy:fork": "FOUNDRY_PROFILE=dev forge script --skip test --slow --fork-url fork --broadcast -vvvv",
"deploy:fork": "forge script --skip test --slow --fork-url fork --broadcast -vvvv",
"check-upgradeability": "hardhat run scripts/upgradeability.ts",
"coverage": "hardhat coverage",
"coverage:foundry": "forge coverage --report lcov",
Expand Down
34 changes: 34 additions & 0 deletions scripts/foundry/mainnet/PTezETHOracle.s.sol
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();
}
}
2 changes: 1 addition & 1 deletion scripts/foundry/mainnet/PTweETHOracle.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract PTweETHOracleDeploy is Script, CommonUtils {
uint256 chainId = CHAIN_ETHEREUM;
address coreBorrow = _chainToContract(chainId, ContractType.CoreBorrow);
uint32 _TWAP_DURATION = 30 minutes;
uint256 _MAX_IMPLIED_RATE = 0.4 ether;
uint256 _MAX_IMPLIED_RATE = 0.25 ether;
// end TODO

MorphoFeedPTweETHDec24 oracle = new MorphoFeedPTweETHDec24(
Expand Down

0 comments on commit 736652b

Please sign in to comment.