fix deploy intention so interfaces can be detected automatically

This commit is contained in:
Iuri Matias 2017-12-14 16:16:51 -05:00
parent 34cec58f32
commit 0a4a757af8
1 changed files with 12 additions and 8 deletions

View File

@ -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;