Handle cases where deploy address isn't set

This commit is contained in:
Andre Medeiros 2018-09-18 16:30:32 -04:00
parent 71f14778c2
commit f54d572b3d
1 changed files with 7 additions and 1 deletions

View File

@ -44,7 +44,13 @@ class ContractDeployer {
}
let contractName = arg.substr(1);
self.events.request('contracts:contract', contractName, (referedContract) => {
cb(null, referedContract.deployedAddress);
if(referedContract.deployedAddress !== undefined) {
return cb(null, referedContract.deployedAddress);
}
// Because we're referring to a contract that is not being deployed (ie. an interface),
// we still need to provide a valid address so that the ABI checker won't fail.
cb(null, '0x0000000000000000000000000000000000000000');
});
}