check if contract exists

This commit is contained in:
Iuri Matias 2015-08-31 21:14:12 -04:00
parent 67ff803397
commit 3d2a14e28b

View File

@ -82,7 +82,7 @@ Deploy.prototype.deploy_contracts = function(env) {
else {
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);
this.deployedContracts[className] = chainContract.address;
this.execute_cmds(contract.onDeploy);