mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-22 05:08:50 +00:00
add onDeploy cmds to contract depedencies
This commit is contained in:
parent
281ebc643d
commit
eb43fa2526
@ -132,7 +132,7 @@
|
|||||||
"no-labels": "error",
|
"no-labels": "error",
|
||||||
"no-lone-blocks": "error",
|
"no-lone-blocks": "error",
|
||||||
"no-lonely-if": "off",
|
"no-lonely-if": "off",
|
||||||
"no-loop-func": "error",
|
"no-loop-func": "off",
|
||||||
"no-magic-numbers": "off",
|
"no-magic-numbers": "off",
|
||||||
"no-mixed-operators": "error",
|
"no-mixed-operators": "error",
|
||||||
"no-mixed-requires": "error",
|
"no-mixed-requires": "error",
|
||||||
|
@ -168,6 +168,16 @@ class ContractsManager {
|
|||||||
self.contractDependencies[className].push(arg.substr(1));
|
self.contractDependencies[className].push(arg.substr(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// look in onDeploy for dependencies
|
||||||
|
if (contract.onDeploy === [] || contract.onDeploy === undefined) continue;
|
||||||
|
let regex = /\$\w+/g;
|
||||||
|
contract.onDeploy.map((cmd) => {
|
||||||
|
cmd.replace(regex, (match) => {
|
||||||
|
self.contractDependencies[className] = self.contractDependencies[className] || [];
|
||||||
|
self.contractDependencies[className].push(match.substr(1));
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user