diff --git a/lib/api.js b/lib/api.js index 461dcfea..f7eb2df5 100644 --- a/lib/api.js +++ b/lib/api.js @@ -145,8 +145,15 @@ class API { this.collector = new DataCollector(this.instrumenter.instrumentationData); - this.providerOptions.gasLimit = this.gasLimitString; - this.providerOptions.allowUnlimitedContractSize = true; + this.providerOptions.gasLimit = + 'gasLimit' in this.providerOptions + ? this.providerOptions.gasLimit + : this.gasLimitString; + + this.providerOptions.allowUnlimitedContractSize = + 'allowUnlimitedContractSize' in this.providerOptions + ? this.providerOptions.allowUnlimitedContractSize + : true; // Attach to vm step of supplied client try {