Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pendle #77

Merged
merged 4 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions script/Common.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol';
import {CamelotRelayerFactory} from '@contracts/factories/CamelotRelayerFactory.sol';
import {ChainlinkRelayerFactory} from '@contracts/factories/ChainlinkRelayerFactory.sol';
import {DenominatedOracleFactory} from '@contracts/factories/DenominatedOracleFactory.sol';
import {PendleRelayerFactory} from '@contracts/factories/pendle/PendleRelayerFactory.sol';
import {IDelayedOracleFactory} from '@interfaces/factories/IDelayedOracleFactory.sol';

abstract contract CommonMainnet is Script {
ChainlinkRelayerFactory public chainlinkRelayerFactory = ChainlinkRelayerFactory(MAINNET_CHAINLINK_RELAYER_FACTORY);
CamelotRelayerFactory public camelotRelayerFactory = CamelotRelayerFactory(MAINNET_CAMELOT_RELAYER_FACTORY);
DenominatedOracleFactory public denominatedOracleFactory =
DenominatedOracleFactory(MAINNET_DENOMINATED_ORACLE_FACTORY);
PendleRelayerFactory public pendleRelayerFactory = PendleRelayerFactory(MAINNET_PENDLE_RELAYER_FACTORY);
IDelayedOracleFactory public delayedOracleFactory = IDelayedOracleFactory(MAINNET_DELAYED_ORACLE_FACTORY);
}

Expand Down
48 changes: 0 additions & 48 deletions script/DeployOracle.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,51 +72,3 @@ contract DeployLinkGrtEthOracles is Script, CommonMainnet {
vm.stopBroadcast();
}
}

// BROADCAST
// source .env && forge script DeployRethPtToSyPendleRelayerMainnet rtEthOracles --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --broadcast --verify --etherscan-api-key $ARB_ETHERSCAN_API_KEY --account defaultKey --sender $DEFAULT_KEY_PUBLIC_ADDRESS
// SIMULATE
// source .env && forge script DeployRethPtToSyPendleRelayerMainnet rtEthOracles --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --account defaultKey --sender $DEFAULT_KEY_PUBLIC
contract DeployRethPtToSyPendleRelayerMainnet is CommonMainnet {
function run() public {
vm.startBroadcast();
IBaseOracle _pendleRethPtToSyFeed = pendleRelayerFactory.deployPendlePtRelayer(
MAINNET_PENDLE_RETH_MARKET, MAINNET_PENDLE_ORACLE, MAINNET_PENDLE_TWAP_DURATION
);

IBaseOracle _rethToUSDOracle = denominatedOracleFactory.deployDenominatedOracle(
_pendleRethPtToSyFeed, IBaseOracle(MAINNET_DENOMINATED_RETH_USD_ORACLE), false
);

IBaseOracle __rethToUSDOracleDelayedOracle =
delayedOracleFactory.deployDelayedOracle(_wstethyToUSDOracle, MAINNET_ORACLE_DELAY);

__rethToUSDOracleDelayedOracle.symbol();
vm.stopBroadcast();
}
}

// BROADCAST
// source .env && forge script DeployWsethPtToSyPendleRelayerMainnet --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --broadcast --verify --etherscan-api-key $ARB_ETHERSCAN_API_KEY --account defaultKey --sender $DEFAULT_KEY_PUBLIC_ADDRESS

// SIMULATE
// source .env && forge script DeployWsethPtToSyPendleRelayerMainnet --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --account defaultKey --sender $DEFAULT_KEY_PUBLIC

contract DeployWstethPtToSyPendleRelayerMainnet is CommonMainnet {
function run() public {
vm.startBroadcast();
IBaseOracle _pendleWstethPtToSyFeed = pendleRelayerFactory.deployPendlePtRelayer(
MAINNET_PENDLE_WSTETH_MARKET, MAINNET_PENDLE_ORACLE, MAINNET_PENDLE_TWAP_DURATION
);

IBaseOracle _wstethToUSDOracle = denominatedOracleFactory.deployDenominatedOracle(
_pendleRethPtToSyFeed, IBaseOracle(MAINNET_DENOMINATED_WSTETH_USD_ORACLE), false
);

IBaseOracle _wstethToUSDDelayedOracle =
delayedOracleFactory.deployDelayedOracle(_wstethToUSDOracle, MAINNET_ORACLE_DELAY);

_wstethToUSDDelayedOracle.symbol();
vm.stopBroadcast();
}
}
7 changes: 0 additions & 7 deletions script/Registry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,3 @@ address constant ETH_ARB_POOL = 0xe51635ae8136aBAc44906A8f230C2D235E9c195F;

//////RENZO
address constant MAINNET_CHAINLINK_EZETH_ETH_FEED = 0x11E1836bFF2ce9d6A5bec9cA79dc998210f3886d;

//Pendle
uint32 constant MAINNET_PENDLE_TWAP_DURATION = 900;
address constant MAINNET_PENDLE_ORACLE = 0x9a9Fa8338dd5E5B2188006f1Cd2Ef26d921650C2;
address constant MAINNET_PENDLE_RETH_MARKET = 0x14FbC760eFaF36781cB0eb3Cb255aD976117B9Bd;
address constant MAINNET_PENDLE_WSTETH_MARKET = 0x08a152834de126d2ef83D612ff36e4523FD0017F;

31 changes: 0 additions & 31 deletions script/dexrelayer/DeployPendleFactory.s.sol

This file was deleted.

20 changes: 0 additions & 20 deletions src/contracts/factories/pendle/PendleLpToSyRelayerChild.sol

This file was deleted.

20 changes: 0 additions & 20 deletions src/contracts/factories/pendle/PendlePtToSyRelayerChild.sol

This file was deleted.

59 changes: 0 additions & 59 deletions src/contracts/factories/pendle/PendleRelayerFactory.sol

This file was deleted.

20 changes: 0 additions & 20 deletions src/contracts/factories/pendle/PendleYtToSyRelayerChild.sol

This file was deleted.

5 changes: 3 additions & 2 deletions src/contracts/oracles/ChainlinkRelayer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
pragma solidity 0.7.6;

import {IChainlinkOracle} from '@interfaces/oracles/IChainlinkOracle.sol';

import 'forge-std/console2.sol';

Check failure on line 5 in src/contracts/oracles/ChainlinkRelayer.sol

View workflow job for this annotation

GitHub Actions / Run Linters (18.x)

Unexpected import of console file
/**
* @title ChainlinkRelayer
* @notice This contracts transforms a Chainlink price feed into a standard IBaseOracle feed
* It also verifies that the reading is new enough, compared to a STALE_THRESHOLD
*/

contract ChainlinkRelayer {
uint256 public immutable STALE_THRESHOLD;
int256 public immutable MULTIPLIER;
Expand Down Expand Up @@ -47,7 +48,7 @@
function read() public view virtual returns (uint256 _result) {
// Fetch values from Chainlink
(, int256 _aggregatorResult,, uint256 _aggregatorTimestamp,) = chainlinkFeed.latestRoundData();

console2.logInt(_aggregatorResult);

Check failure on line 51 in src/contracts/oracles/ChainlinkRelayer.sol

View workflow job for this annotation

GitHub Actions / Run Linters (18.x)

Unexpected console statement
MrDeadCe11 marked this conversation as resolved.
Show resolved Hide resolved
// Revert if price is invalid
require(_aggregatorResult != 0 && _isValidFeed(_aggregatorTimestamp), 'InvalidPriceFeed');

Expand Down
49 changes: 0 additions & 49 deletions src/contracts/oracles/pendle/PendleLpToSyRelayer.sol

This file was deleted.

52 changes: 0 additions & 52 deletions src/contracts/oracles/pendle/PendlePtToSyRelayer.sol

This file was deleted.

Loading
Loading