Skip to content

Commit

Permalink
organize scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat committed Jul 23, 2024
1 parent 0a82c5c commit 58b6685
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 601 deletions.
22 changes: 0 additions & 22 deletions script/dexrelayer/DeployDataLog.s.sol

This file was deleted.

35 changes: 0 additions & 35 deletions script/dexrelayer/DeployOracleFactories.s.sol

This file was deleted.

47 changes: 0 additions & 47 deletions script/dexrelayer/DeployOracles.s.sol

This file was deleted.

62 changes: 0 additions & 62 deletions script/dexrelayer/GetPrice.s.sol

This file was deleted.

68 changes: 0 additions & 68 deletions script/dexrelayer/Read.s.sol

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,6 @@ import {ChainlinkRelayerFactory} from '@contracts/factories/ChainlinkRelayerFact
import {DenominatedOracleFactory} from '@contracts/factories/DenominatedOracleFactory.sol';
import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol';

// BROADCAST
// source .env && forge script DeployEthUsdRelayer --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 DeployEthUsdRelayer --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --sender $DEFAULT_KEY_PUBLIC_ADDRESS

contract DeployEthUsdRelayer is Script, CommonMainnet {
function run() public {
vm.startBroadcast();

chainlinkRelayerFactory.deployChainlinkRelayerWithL2Validity(
MAINNET_CHAINLINK_ETH_USD_FEED,
MAINNET_CHAINLINK_SEQUENCER_FEED,
1 days,
MAINNET_CHAINLINK_L2VALIDITY_GRACE_PERIOD
);

vm.stopBroadcast();
}
}

// BROADCAST
// source .env && forge script DeployLinkGrtEthOracles --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 DeployLinkGrtEthOracles --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --sender $DEFAULT_KEY_PUBLIC_ADDRESS

contract DeployLinkGrtEthOracles is Script, CommonMainnet {
IBaseOracle public _linkUSDRelayer;
IBaseOracle public _grtUSDRelayer;
IBaseOracle public _ethDelayedOracle;

function run() public {
vm.startBroadcast();

_linkUSDRelayer = chainlinkRelayerFactory.deployChainlinkRelayerWithL2Validity(
MAINNET_CHAINLINK_LINK_USD_FEED,
MAINNET_CHAINLINK_SEQUENCER_FEED,
1 hours,
MAINNET_CHAINLINK_L2VALIDITY_GRACE_PERIOD
);
_grtUSDRelayer = chainlinkRelayerFactory.deployChainlinkRelayerWithL2Validity(
MAINNET_CHAINLINK_GRT_USD_FEED,
MAINNET_CHAINLINK_SEQUENCER_FEED,
1 days,
MAINNET_CHAINLINK_L2VALIDITY_GRACE_PERIOD
);

IBaseOracle linkOracle = delayedOracleFactory.deployDelayedOracle(_linkUSDRelayer, MAINNET_ORACLE_DELAY);
IBaseOracle grtOracle = delayedOracleFactory.deployDelayedOracle(_grtUSDRelayer, MAINNET_ORACLE_DELAY);
IBaseOracle ethOracle = delayedOracleFactory.deployDelayedOracle(
IBaseOracle(MAINNET_CHAINLINK_L2VALIDITY_ETH_USD_RELAYER), MAINNET_ORACLE_DELAY
);

linkOracle.getResultWithValidity();
grtOracle.getResultWithValidity();
ethOracle.getResultWithValidity();

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
Expand Down
Loading

0 comments on commit 58b6685

Please sign in to comment.