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 ( ...@@ -89,7 +89,7 @@ const getChainId = async (
provider: ethers.providers.JsonRpcProvider provider: ethers.providers.JsonRpcProvider
): Promise<number> => { ): Promise<number> => {
const response = await provider.send('eth_chainId', []) const response = await provider.send('eth_chainId', [])
return ethers.BigNumber.from(response.result).toNumber() return ethers.BigNumber.from(response).toNumber()
} }
export const loadSurgeryData = async ( export const loadSurgeryData = async (
...@@ -142,9 +142,10 @@ export const loadSurgeryData = async ( ...@@ -142,9 +142,10 @@ export const loadSurgeryData = async (
console.log('Loading genesis file...') console.log('Loading genesis file...')
const genesis: GenesisFile = await readGenesisFile(configs.genesisFilePath) const genesis: GenesisFile = await readGenesisFile(configs.genesisFilePath)
if (genesis.config.chainId !== l2ChainId) { if (genesis.config.chainId !== l2ChainId) {
throw new Error( // Don't throw here because we might need to do a staging environment with a different chain ID
`Genesis File at ${configs.genesisFilePath} has chain id mismatch with remote L2 node` + console.log(
` got ${genesis.config.chainId} locally and ${l2ChainId} remote` `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 = [] const genesisDump: StateDump = []
......
...@@ -4,7 +4,7 @@ import path from 'path' ...@@ -4,7 +4,7 @@ import path from 'path'
import fs from 'fs' import fs from 'fs'
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { clone } from '@eth-optimism/core-utils' import { clone } from '@eth-optimism/core-utils'
import { setupMethods } from 'solc/wrapper' import setupMethods from 'solc/wrapper'
import { import {
COMPILER_VERSIONS_TO_SOLC, COMPILER_VERSIONS_TO_SOLC,
EMSCRIPTEN_BUILD_LIST, 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