mirror of https://github.com/embarklabs/embark.git
move Contract object to blockchain module
This commit is contained in:
parent
84dcfca254
commit
9b1a78cdaa
|
@ -90,6 +90,10 @@ class Blockchain {
|
|||
this.web3.eth.getBlock(blockNumber, cb);
|
||||
}
|
||||
|
||||
ContractObject(params) {
|
||||
return new this.web3.eth.Contract(params.abi);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Blockchain;
|
||||
|
|
|
@ -308,7 +308,7 @@ class Deploy {
|
|||
});
|
||||
},
|
||||
function createDeployObject(next) {
|
||||
let contractObject = new self.web3.eth.Contract(contract.abiDefinition);
|
||||
let contractObject = self.blockchain.ContractObject({abi: contract.abiDefinition});
|
||||
|
||||
try {
|
||||
const dataCode = contractCode.startsWith('0x') ? contractCode : "0x" + contractCode;
|
||||
|
|
Loading…
Reference in New Issue