diff --git a/lib/contracts/contracts.js b/lib/contracts/contracts.js index b831097c..559fa327 100644 --- a/lib/contracts/contracts.js +++ b/lib/contracts/contracts.js @@ -43,14 +43,6 @@ class ContractsManager { } callback(); }, - function setDeployIntention(callback) { - let className, contract; - for (className in self.contracts) { - contract = self.contracts[className]; - contract.deploy = (contract.deploy === undefined) || contract.deploy; - } - callback(); - }, function prepareContractsFromCompilation(callback) { let className, compiledContract, contractConfig, contract; for (className in self.compiledContracts) { @@ -79,6 +71,18 @@ class ContractsManager { } callback(); }, + function setDeployIntention(callback) { + let className, contract; + for (className in self.contracts) { + contract = self.contracts[className]; + contract.deploy = (contract.deploy === undefined) || contract.deploy; + if (contract.code === "") { + self.logger.info("assuming " + className + " to be an interface"); + contract.deploy = false; + } + } + callback(); + }, /*eslint complexity: ["error", 11]*/ function dealWithSpecialConfigs(callback) { let className, contract, parentContractName, parentContract;