diff --git a/op-verifier/deploy_l1/00_op_verifier.ts b/op-verifier/deploy_l1/00_op_verifier.ts index 6a047489..b041f8ba 100644 --- a/op-verifier/deploy_l1/00_op_verifier.ts +++ b/op-verifier/deploy_l1/00_op_verifier.ts @@ -2,23 +2,30 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types'; import {DeployFunction} from 'hardhat-deploy/types'; import fs from 'fs'; +const GATEWAY_URLS = { + 'opDevnetL1':'http://localhost:8080/{sender}/{data}.json', + 'goerli':'https://op-gateway-worker.ens-cf.workers.dev/{sender}/{data}.json', +} + +const L2_OUTPUT_ORACLE_ADDRESSES = { + 'goerli': '0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0' +} + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, getNamedAccounts, network} = hre; const {deploy} = deployments; const {deployer} = await getNamedAccounts(); let L2_OUTPUT_ORACLE_ADDRESS, GATEWAY_URL if(network.name === 'opDevnetL1'){ - GATEWAY_URL = 'http://localhost:8080/{sender}/{data}.json' const opAddresses = await (await fetch("http://localhost:8080/addresses.json")).json(); L2_OUTPUT_ORACLE_ADDRESS = opAddresses.L2OutputOracleProxy - }else if('goerli'){ - GATEWAY_URL = 'https://op-gateway-worker.ens-cf.workers.dev/{sender}/{data}.json' - L2_OUTPUT_ORACLE_ADDRESS = '0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0' + }else{ + L2_OUTPUT_ORACLE_ADDRESS = L2_OUTPUT_ORACLE_ADDRESSES[network.name] } console.log('OPVerifier', [[GATEWAY_URL], L2_OUTPUT_ORACLE_ADDRESS]) await deploy('OPVerifier', { from: deployer, - args: [[GATEWAY_URL], L2_OUTPUT_ORACLE_ADDRESS], + args: [[GATEWAY_URLS[network.name]], L2_OUTPUT_ORACLE_ADDRESS], log: true, }); };