From f54d572b3da49400c35d8bd78f18f900fe29c7ea Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Tue, 18 Sep 2018 16:30:32 -0400 Subject: [PATCH] Handle cases where deploy address isn't set --- lib/modules/deployment/contract_deployer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index 7b76ed4b1..adff47350 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -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'); }); }