Merge pull request #966 from cryptomental/feature/track-fields-in-contract-configuration

contract_deployer: Redeploy if track field is set to false.
This commit is contained in:
Iuri Matias 2018-10-05 17:55:10 -04:00 committed by GitHub
commit a2a6ff6117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,11 @@ class ContractDeployer {
if (!trackedContract.address) {
return self.deployContract(contract, next);
}
// deploy the contract regardless if track field is defined and set to false
if (trackedContract.track === false) {
self.logFunction(contract)(contract.className.bold.cyan + __(" will be redeployed").green);
return self.deployContract(contract, next);
}
self.blockchain.getCode(trackedContract.address, function(_getCodeErr, codeInChain) {
if (codeInChain !== "0x") {