-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added relayer factory deploy script for sepolia
- Loading branch information
1 parent
6c44326
commit bf94cf0
Showing
3 changed files
with
61 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.7.6; | ||
|
||
import '@script/Registry.s.sol'; | ||
import {Script} from 'forge-std/Script.sol'; | ||
import {PendleRelayerFactory} from '@contracts/factories/pendle/PendleRelayerFactory.sol'; | ||
import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; | ||
import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; | ||
|
||
// BROADCAST | ||
// source .env && forge script DeployPendleFactory --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_SEPOLIA_RPC --broadcast --verify --etherscan-api-key $ARB_ETHERSCAN_API_KEY | ||
|
||
// SIMULATE | ||
// source .env && forge script DeployPendleFactory --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_SEPOLIA_RPC | ||
|
||
contract DeployPendleFactory is Script { | ||
IBaseOracle public pendleLpToSyRelayer; | ||
IBaseOracle public pendleYtToSyRelayer; | ||
IBaseOracle public pendlePtToSyRelayer; | ||
|
||
PendleRelayerFactory public pendleRelayerFactory; | ||
|
||
function run() public { | ||
uint256 pk = vm.envUint('ARB_SEPOLIA_PK'); | ||
vm.startBroadcast(pk); | ||
pendleRelayerFactory = new PendleRelayerFactory(); | ||
IAuthorizable(address(pendleRelayerFactory)).addAuthorization(vm.addr(pk)); | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.7.6; | ||
|
||
import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; | ||
|
||
interface IPendleRelayerFactory { | ||
// --- Events --- | ||
event NewPendlePtRelayer(address indexed _market, address _oracle, uint32 _twapDuration); | ||
event NewPendleYtRelayer(address indexed _market, address _oracle, uint32 _twapDuration); | ||
event NewPendleLpRelayer(address indexed _market, address _oracle, uint32 _twapDuration); | ||
|
||
// --- Methods --- | ||
|
||
function deployPendlePtRelayer( | ||
address _market, | ||
address _oracle, | ||
uint32 _twapDuration | ||
) external returns (IBaseOracle _pendlePtRelayerChild); | ||
|
||
function deployPendleYtRelayer( | ||
address _market, | ||
address _oracle, | ||
uint32 _twapDuration | ||
) external returns (IBaseOracle _pendleYtRelayerChild); | ||
|
||
function deployPendleLpRelayer( | ||
address _market, | ||
address _oracle, | ||
uint32 _twapDuration | ||
) external returns (IBaseOracle _pendleLpRelayerChild); | ||
} |
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