mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-20 02:58:05 +00:00
check if contract exists
This commit is contained in:
parent
67ff803397
commit
3d2a14e28b
@ -82,7 +82,7 @@ Deploy.prototype.deploy_contracts = function(env) {
|
|||||||
else {
|
else {
|
||||||
var chainContract = this.chainManager.getContract(className, contract.compiled.code, realArgs);
|
var chainContract = this.chainManager.getContract(className, contract.compiled.code, realArgs);
|
||||||
|
|
||||||
if (chainContract != undefined) {
|
if (chainContract != undefined && web3.eth.getCode(chainContract.address) !== "0x") {
|
||||||
console.log("contract " + className + " is unchanged and already deployed at " + chainContract.address);
|
console.log("contract " + className + " is unchanged and already deployed at " + chainContract.address);
|
||||||
this.deployedContracts[className] = chainContract.address;
|
this.deployedContracts[className] = chainContract.address;
|
||||||
this.execute_cmds(contract.onDeploy);
|
this.execute_cmds(contract.onDeploy);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user