mirror of https://github.com/embarklabs/embark.git
move getCode to blockchain
This commit is contained in:
parent
ae93d78cc2
commit
1547a115a4
|
@ -82,6 +82,10 @@ class Blockchain {
|
|||
this.web3.eth.getAccounts(cb);
|
||||
}
|
||||
|
||||
getCode(address, cb) {
|
||||
this.web3.eth.getCode(address, cb);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Blockchain;
|
||||
|
|
|
@ -115,7 +115,7 @@ class Deploy {
|
|||
return self.contractToDeploy(contract, params, callback);
|
||||
}
|
||||
|
||||
this.web3.eth.getCode(trackedContract.address, function(_getCodeErr, codeInChain) {
|
||||
this.blockchain.getCode(trackedContract.address, function(_getCodeErr, codeInChain) {
|
||||
if (codeInChain !== "0x") {
|
||||
self.contractAlreadyDeployed(contract, trackedContract, callback);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue