Skip to content

Commit

Permalink
Remove pendle (#77)
Browse files Browse the repository at this point in the history
* fixed compiler errors

* removed pendle tests

* finished removing pendle contracts

* removed console log from chainlink relayer
  • Loading branch information
MrDeadCe11 authored Jul 23, 2024
1 parent 250811c commit 55e4655
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 765 deletions.
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.

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.

50 changes: 0 additions & 50 deletions src/contracts/oracles/pendle/PendleYtToSyRelayer.sol

This file was deleted.

Loading

0 comments on commit 55e4655

Please sign in to comment.