Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Add --noVMErrorsOnRPCResponse flag to ganache-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincburns committed Jan 23, 2018
1 parent 0c6df5d commit ed52891
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Options:
* `--db`: Specify a path to a directory to save the chain database. If a database already exists, ganache-cli will initialize that chain instead of creating a new one.
* `--debug`: Output VM opcodes for debugging
* `--mem`: Output ganache-cli memory usage statistics. This replaces normal output.
* '--noVMErrorsOnRPCResponse': Do not transmit transaction failures as RPC errors. Enable this flag for error reporting behaviour which is compatible with other clients such as geth and Parity.

Special Options:

Expand Down Expand Up @@ -111,6 +112,7 @@ Both `.provider()` and `.server()` take a single object which allows you to spec
* `"unlocked_accounts"`: `Array` - array of addresses or address indexes specifying which accounts should be unlocked.
* `"db_path"`: `String` - Specify a path to a directory to save the chain database. If a database already exists, `ganache-cli` will initialize that chain instead of creating a new one.
* `"account_keys_path"`: `String` - Specifies a file to save accounts and private keys to, for testing.
* `"vmErrorsOnRPCResponse"`: `boolean` - Whether or not to transmit transaction failures as RPC errors. Set to `false` for error reporting behaviour which is compatible with other clients such as geth and Parity.

### Implemented Methods

Expand Down
9 changes: 6 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (argv.help || argv['?']) {
console.log(" --fork/-f <url> (Fork from another currently running Ethereum client at a given block)");
console.log("");
console.log(" --db <db path> (directory to save chain db)");
console.log(" --seed <seed value for PRNG, default random>");
console.log(" --seed/-s <seed value for PRNG, default random>");
console.log(" --deterministic/-d (uses fixed seed)");
console.log(" --mnemonic/-m <mnemonic>");
console.log("");
Expand All @@ -45,10 +45,12 @@ if (argv.help || argv['?']) {
console.log(" integer or 0x-prefixed hex value specifying the amount of wei in that account.)");
console.log("");
console.log(" --acctKeys <path to file> (saves generated accounts and private keys as JSON object in specified file)");
console.log(" --secure/-s (Lock accounts by default)");
console.log(" --secure/-n (Lock accounts by default)");
console.log(" --unlock <accounts> (Comma-separated list of accounts or indices to unlock)");
console.log("");
console.log(" --blocktime/-b <block time in seconds>");
console.log(" --noVMErrorsOnRPCResponse (Do not transmit transaction failures as RPC errors. Enable this flag for error reporting behaviour which is compatible with other clients such as geth and Parity.)");
console.log("");
console.log(" --blocktime/-b <block time in seconds> (Will instamine if option omitted. Avoid using unless your test cases require interval mining.)");
console.log(" --networkId/-i <network id> (default current time)");
console.log(" --gasPrice/-g <gas price> (default 20000000000)");
console.log(" --gasLimit/-l <gas limit> (default 90000)");
Expand Down Expand Up @@ -125,6 +127,7 @@ var options = {
secure: argv.n || argv.secure || false,
db_path: argv.db || null,
account_keys_path: argv.acctKeys || null,
vmErrorsOnRPCResponse: !argv.noVMErrorsOnRPCResponse,
logger: logger
}

Expand Down

0 comments on commit ed52891

Please sign in to comment.