diff --git a/lib/contracts/deploy.js b/lib/contracts/deploy.js index d14deab78..4e6eab711 100644 --- a/lib/contracts/deploy.js +++ b/lib/contracts/deploy.js @@ -66,6 +66,15 @@ class Deploy { realArgs = self.determineArguments(params || contract.args); if (contract.address !== undefined) { + try { + this.web3.utils.toChecksumAddress(contract.address); + } catch(e) { + self.logger.error("error deploying " + contract.className); + self.logger.error(e.message); + contract.error = e.message; + self.events.emit('contractsState', self.contractsManager.contractsState()); + return callback(e.message); + } contract.deployedAddress = contract.address; if (this.deployTracker) { self.deployTracker.trackContract(contract.className, contract.realRuntimeBytecode, realArgs, contract.address);