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

Commit

Permalink
add flag for unlimited contract size
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseese committed Jul 2, 2018
1 parent 72c271d commit 08812ac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Options:
* `--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.
* `--allowUnlimitedContractSize`: Allows unlimited contract sizes while debugging. By enabling this flag, the check within the EVM for contract size limit of 2KB (see EIP-170) is bypassed. Enabling this flag **will** cause ganache-cli to behave differently than production environments.

Special Options:

Expand Down Expand Up @@ -114,6 +115,7 @@ Both `.provider()` and `.server()` take a single object which allows you to spec
* `"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.
* `"allowUnlimitedContractSize"`: `boolean` - Allows unlimited contract sizes while debugging. By setting this to `true`, the check within the EVM for contract size limit of 2KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. Setting this to true **will** cause ganache-core to behave differently than production environments. (default: `false`; **ONLY** set to `true` during debugging).

### Implemented Methods

Expand Down
6 changes: 6 additions & 0 deletions args.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ module.exports = exports = function(yargs, version) {
type: 'number',
default: 0x6691b7
})
.option('allowUnlimitedContractSize', {
group: 'Chain:',
describe: 'Allows unlimited contract sizes while debugging. By enabling this flag, the check within the EVM for contract size limit of 2KB (see EIP-170) is bypassed. Enabling this flag *will* cause ganache-cli to behave differently than production environments.',
type: 'boolean',
default: false
})
.option('debug', {
group: 'Other:',
describe: 'Output VM opcodes for debugging',
Expand Down
3 changes: 2 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ var options = {
db_path: argv.db || null,
account_keys_path: argv.acctKeys || null,
vmErrorsOnRPCResponse: !argv.noVMErrorsOnRPCResponse,
logger: logger
logger: logger,
allowUnlimitedContractSize: argv.allowUnlimitedContractSize || false
}

var fork_address;
Expand Down

0 comments on commit 08812ac

Please sign in to comment.