diff --git a/lib/tests/test.js b/lib/tests/test.js index ad91ae77b..a6c836575 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -243,14 +243,13 @@ class Test { } else { data = self.contracts[contractName].options.data; } - //Object.assign(self.contracts[contractName], new self.web3.eth.Contract(contract.abiDefinition, contract.deployedAddress, - // {from: self.web3.eth.defaultAccount, gas: 6000000})); Object.assign(self.contracts[contractName], new EmbarkJS.Contract({abi: contract.abiDefinition, address: contract.deployedAddress, from: self.web3.eth.defaultAccount, gas: 6000000, web3: self.web3})); self.contracts[contractName].address = contract.deployedAddress; if (self.contracts[contractName].options) { self.contracts[contractName].options.from = self.contracts[contractName].options.from || self.web3.eth.defaultAccount; self.contracts[contractName].options.data = data; + self.contracts[contractName].options.gas = 6000000; } eachCb(); }, (err) => { @@ -297,6 +296,7 @@ class Test { this.contracts[contractName] = new EmbarkJS.Contract({abi: contract.abiDefinition, address: contract.address, from: this.web3.eth.defaultAccount, gas: 6000000, web3: this.web3}); this.contracts[contractName].address = contract.address; this.contracts[contractName].options.data = contract.code; + this.contracts[contractName].options.gas = 6000000; this.web3.eth.getAccounts().then((accounts) => { this.contracts[contractName].options.from = contract.from || accounts[0]; });