mirror of https://github.com/embarklabs/embark.git
contract_deployer: Redeploy if track field is set to false.
Always deploy the contract regardless if already deployed when 'track' field in the contract configuration is specified and set to false. In line with #938 requirements: * If a contract has the track field set to false, that contract will always deploy. * If the track field is set to true, then the existing deployment tracking mechanism will be active for that contract. * If the field is not set, it should be assumed to true by default Refs: https://github.com/embark-framework/embark/issues/938
This commit is contained in:
parent
115bf1387d
commit
bcc1711061
|
@ -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") {
|
||||
|
|
Loading…
Reference in New Issue