mirror of https://github.com/embarklabs/embark.git
set default gas
This commit is contained in:
parent
8783f04a9c
commit
6b26f2a9d7
|
@ -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];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue