Commit 4df829b1 authored by kf's avatar kf Committed by Kelvin Fichter

fix: various minor issues with surgery script

parent d219683d
......@@ -89,7 +89,7 @@ const getChainId = async (
provider: ethers.providers.JsonRpcProvider
): Promise<number> => {
const response = await provider.send('eth_chainId', [])
return ethers.BigNumber.from(response.result).toNumber()
return ethers.BigNumber.from(response).toNumber()
}
export const loadSurgeryData = async (
......@@ -142,9 +142,10 @@ export const loadSurgeryData = async (
console.log('Loading genesis file...')
const genesis: GenesisFile = await readGenesisFile(configs.genesisFilePath)
if (genesis.config.chainId !== l2ChainId) {
throw new Error(
`Genesis File at ${configs.genesisFilePath} has chain id mismatch with remote L2 node` +
` got ${genesis.config.chainId} locally and ${l2ChainId} remote`
// Don't throw here because we might need to do a staging environment with a different chain ID
console.log(
`WARNING: Genesis File at ${configs.genesisFilePath} has chain id mismatch with remote L2 node` +
` got ${genesis.config.chainId} locally and ${l2ChainId} remotely`
)
}
const genesisDump: StateDump = []
......
......@@ -4,7 +4,7 @@ import path from 'path'
import fs from 'fs'
import { ethers } from 'ethers'
import { clone } from '@eth-optimism/core-utils'
import { setupMethods } from 'solc/wrapper'
import setupMethods from 'solc/wrapper'
import {
COMPILER_VERSIONS_TO_SOLC,
EMSCRIPTEN_BUILD_LIST,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment