diff options
author | Fabio Berger <me@fabioberger.com> | 2018-09-30 14:31:34 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-09-30 14:31:34 +0800 |
commit | de7470d936ae800adb45752bc36c8325845c8896 (patch) | |
tree | d644c402f1f10794dd15aba7e4a9223b46b1832e /packages/dev-utils/src/web3_factory.ts | |
parent | b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc (diff) | |
parent | ac14dd2b29b42ef4d2a46db9b70d4d30cf9bd40f (diff) | |
download | dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.gz dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.bz2 dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.lz dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.xz dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.zst dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.zip |
merge development
Diffstat (limited to 'packages/dev-utils/src/web3_factory.ts')
-rw-r--r-- | packages/dev-utils/src/web3_factory.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts index 8e713fa68..7c86d3df4 100644 --- a/packages/dev-utils/src/web3_factory.ts +++ b/packages/dev-utils/src/web3_factory.ts @@ -14,6 +14,7 @@ import { env, EnvVars } from './env'; export interface Web3Config { hasAddresses?: boolean; // default: true shouldUseInProcessGanache?: boolean; // default: false + shouldThrowErrorsOnGanacheRPCResponse?: boolean; // default: true rpcUrl?: string; // default: localhost:8545 shouldUseFakeGasEstimate?: boolean; // default: true } @@ -41,15 +42,19 @@ export const web3Factory = { if (!_.isUndefined(config.rpcUrl)) { throw new Error('Cannot use both GanacheSubrovider and RPCSubprovider'); } + const shouldThrowErrorsOnGanacheRPCResponse = + _.isUndefined(config.shouldThrowErrorsOnGanacheRPCResponse) || + config.shouldThrowErrorsOnGanacheRPCResponse; provider.addProvider( new GanacheSubprovider({ + vmErrorsOnRPCResponse: shouldThrowErrorsOnGanacheRPCResponse, gasLimit: constants.GAS_LIMIT, logger, verbose: env.parseBoolean(EnvVars.VerboseGanache), port: 8545, network_id: 50, mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic', - }), + } as any), // TODO remove any once types are merged in DefinitelyTyped ); } else { provider.addProvider(new RPCSubprovider(config.rpcUrl || constants.RPC_URL)); |