@0x/dev-utils: Make ganache's allowUnlimitedCOntractSize option configurable via Web3Config.
`@0x/dev-utils`: Add `UnlimitedContractSize` to `EnvVars`.
This commit is contained in:
@@ -7,7 +7,11 @@
|
||||
"pr": 2031
|
||||
},
|
||||
{
|
||||
"note": "Set `allowUnlimitedContractSize` option when creating a ganache provider",
|
||||
"note": "Add `shouldAllowUnlimitedContractSize` to `Web3Config`.",
|
||||
"pr": 2075
|
||||
},
|
||||
{
|
||||
"note": "Add `UNLIMITED_CONTRACT_SIZE` to `EnvVars`.",
|
||||
"pr": 2075
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,6 +6,7 @@ export enum EnvVars {
|
||||
SolidityProfiler = 'SOLIDITY_PROFILER',
|
||||
SolidityRevertTrace = 'SOLIDITY_REVERT_TRACE',
|
||||
VerboseGanache = 'VERBOSE_GANACHE',
|
||||
UnlimitedContractSize = 'UNLIMITED_CONTRACT_SIZE',
|
||||
}
|
||||
|
||||
export const env = {
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface Web3Config {
|
||||
rpcUrl?: string; // default: localhost:8545
|
||||
shouldUseFakeGasEstimate?: boolean; // default: true
|
||||
ganacheDatabasePath?: string; // default: undefined, creates a tmp dir
|
||||
shouldAllowUnlimitedContractSize?: boolean;
|
||||
}
|
||||
|
||||
export const web3Factory = {
|
||||
@@ -58,9 +59,7 @@ export const web3Factory = {
|
||||
new GanacheSubprovider({
|
||||
vmErrorsOnRPCResponse: shouldThrowErrorsOnGanacheRPCResponse,
|
||||
db_path: config.ganacheDatabasePath,
|
||||
// HACK(dorothy-zbornak): Mainnet gas limit is 8M, but ganache won't
|
||||
// go beyond 7M, which means we can't deploy certain large contracts.
|
||||
allowUnlimitedContractSize: true,
|
||||
allowUnlimitedContractSize: config.shouldAllowUnlimitedContractSize,
|
||||
gasLimit: constants.GAS_LIMIT,
|
||||
logger,
|
||||
verbose: env.parseBoolean(EnvVars.VerboseGanache),
|
||||
|
||||
Reference in New Issue
Block a user