Skip to content

Commit

Permalink
simulate success
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat committed Jul 4, 2024
1 parent 4c1a79c commit a9925d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions script/DeployOracle.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ pragma solidity 0.7.6;

import '@script/Registry.s.sol';
import {Script} from 'forge-std/Script.sol';
import {CommonMainnet} from '@script/Common.s.sol';

import {CamelotRelayerFactory} from '@contracts/factories/CamelotRelayerFactory.sol';
import {ChainlinkRelayerFactory} from '@contracts/factories/ChainlinkRelayerFactory.sol';
import {DenominatedOracleFactory} from '@contracts/factories/DenominatedOracleFactory.sol';
import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol';
import {CommonMainnet} from '@script/Common.s.sol';

// BROADCAST
// source .env && forge script DeployEthUsdRelayerMainnet --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --broadcast --verify --etherscan-api-key $ARB_ETHERSCAN_API_KEY
// 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 DeployEthUsdRelayerMainnet --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC
// source .env && forge script DeployEthUsdRelayer --with-gas-price 2000000000 -vvvvv --rpc-url $ARB_MAINNET_RPC --account defaultKey

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

chainlinkRelayerFactory.deployChainlinkRelayerWithL2Validity(
MAINNET_CHAINLINK_ETH_USD_FEED, MAINNET_CHAINLINK_SEQUENCER_FEED, MAINNET_ORACLE_INTERVAL, MAINNET_GRACE_PERIOD
Expand All @@ -28,18 +29,18 @@ contract DeployEthUsdRelayerMainnet is Script, CommonMainnet {
}

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

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

function run() public {
vm.startBroadcast(vm.envUint('ARB_MAINNET_DEPLOYER_PK'));
vm.startBroadcast();

_linkUSDRelayer = chainlinkRelayerFactory.deployChainlinkRelayerWithL2Validity(
MAINNET_CHAINLINK_LINK_USD_FEED, MAINNET_CHAINLINK_SEQUENCER_FEED, MAINNET_ORACLE_INTERVAL, MAINNET_GRACE_PERIOD
Expand Down
2 changes: 1 addition & 1 deletion script/Registry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ address constant MAINNET_DELAYED_ORACLE_FACTORY = 0x9Dd63fA54dEfd8820BCAb3e3cC39
address constant MAINNET_CAMELOT_ODG_WETH_RELAYER = 0xF7Ec9ad3192d4ec1E54d52B3E492B5B66AB02889;
// Chainlink
address constant MAINNET_CHAINLINK_ETH_USD_RELAYER = 0x3e6C1621f674da311E57646007fBfAd857084383;
address constant MAINNET_CHAINLINK_L2VALIDITY_ETH_USD_RELAYER = 0x3e6C1621f674da311E57646007fBfAd857084383;
address constant MAINNET_CHAINLINK_L2VALIDITY_ETH_USD_RELAYER = 0x4617Feb8B72167c3b8253a1327CddE44e54670Ce;
address constant MAINNET_CHAINLINK_RETH_ETH_RELAYER = 0x2b98972Ee61e8928F9dFa6504301296f0e7645Ca;
address constant MAINNET_CHAINLINK_WSTETH_ETH_RELAYER = 0x48D3B7605B8dc3Ae231Bd59e40513C9e9Ac6D33a;
address constant MAINNET_CHAINLINK_ARB_USD_RELAYER = 0x2635f731BB6981E72F92A781578952450759F762;
Expand Down

0 comments on commit a9925d7

Please sign in to comment.