Update deploySystem
DeploySystem takes any parameter, unless the parameter is the name of a contract previousely deployed by this utility, in which case the parameter becomes that contract's deployed address
@@ -47,12 +47,13 @@ async function deploySystem(deploy_list) {
// eslint-disable-next-line camelcase,guard-for-in
for (const i in deploy_list) {
await deploy_list[i].contract.link(linkable)
- let contract
- if (deploy_list[i].param != undefined) {
- contract = await deploy_list[i].contract.new(deploy_list[i].param)
- } else {
- contract = await deploy_list[i].contract.new()
- }
+ const contract =
+ (deploy_list[i].param == undefined) ?
+ await deploy_list[i].contract.new():
+ (linkable[deploy_list[i].param] == undefined) ?
+ await deploy_list[i].contract.new(deploy_list[i].param):
+ await deploy_list[i].contract.new(linkable[deploy_list[i].param])
+
linkable[deploy_list[i].name] = contract.address
deployed[deploy_list[i].name] = contract
}
