| 539 | } |
| 540 | |
| 541 | async function archiveModule(modules) { |
| 542 | let options = modules.map(m => `${m.name} (${m.address})`); |
| 543 | let index = readlineSync.keyInSelect(options, 'Which module would you like to archive?'); |
| 544 | if (index != -1) { |
| 545 | console.log("\nSelected: ", options[index]); |
| 546 | let archiveModuleAction = securityToken.methods.archiveModule(modules[index].address); |
| 547 | await common.sendTransaction(archiveModuleAction, { factor: 2 }); |
| 548 | console.log(chalk.green(`${modules[index].name} has been archived successfully!`)); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | async function unarchiveModule(modules) { |
| 553 | let options = modules.map(m => `${m.name} (${m.address})`); |