aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-utils
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2018-09-28 08:21:15 +0800
committerGitHub <noreply@github.com>2018-09-28 08:21:15 +0800
commita737cfa004ee1dc18be935f61fb9c289ed5623fd (patch)
tree16a47cea35e645614d0f01d62948266bd080bca1 /packages/dev-utils
parent94badedad434f5345dc041e72a3240ab760c993e (diff)
parent21f60721863c974e0565009100891db53b7fb42c (diff)
downloaddexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.tar
dexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.tar.gz
dexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.tar.bz2
dexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.tar.lz
dexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.tar.xz
dexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.tar.zst
dexon-sol-tools-a737cfa004ee1dc18be935f61fb9c289ed5623fd.zip
Merge pull request #1090 from 0xProject/bug/contract-wrappers/handle-revert-with-reason
[contract-wrappers] Test revert with reason when decoding call result
Diffstat (limited to 'packages/dev-utils')
-rw-r--r--packages/dev-utils/src/web3_factory.ts7
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));