mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
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…
x
Reference in New Issue
Block a user