Commit 499d8736 authored by Kelvin Fichter's avatar Kelvin Fichter

fix: solc import to avoid annoying crashes

parent 37290679
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
import fetch from 'node-fetch' import fetch from 'node-fetch'
import path from 'path' import path from 'path'
import fs from 'fs' import fs from 'fs'
import solc from 'solc'
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 { import {
COMPILER_VERSIONS_TO_SOLC, COMPILER_VERSIONS_TO_SOLC,
EMSCRIPTEN_BUILD_LIST, EMSCRIPTEN_BUILD_LIST,
...@@ -116,7 +116,7 @@ export const getMainContract = (contract: EtherscanContract, output) => { ...@@ -116,7 +116,7 @@ export const getMainContract = (contract: EtherscanContract, output) => {
} }
export const getSolc = (version: string, ovm?: boolean) => { export const getSolc = (version: string, ovm?: boolean) => {
return solc.setupMethods( return setupMethods(
require(path.join( require(path.join(
LOCAL_SOLC_DIR, LOCAL_SOLC_DIR,
ovm ? version : `solc-emscripten-wasm32-${version}.js` ovm ? version : `solc-emscripten-wasm32-${version}.js`
......
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