| 572 | } |
| 573 | |
| 574 | async function changeBudget() { |
| 575 | let options = modules.map(m => `${m.name} (${m.address})`); |
| 576 | let index = readlineSync.keyInSelect(options, 'Which module whould you like to remove?'); |
| 577 | if (index != -1) { |
| 578 | console.log("\nSelected: ", options[index]); |
| 579 | let increase = 0 == readlineSync.keyInSelect(['Increase', 'Decrease'], `Do you want to increase or decrease budget?`, { cancel: false }); |
| 580 | let amount = readlineSync.question(`Enter the amount of POLY to change in allowance`); |
| 581 | let changeModuleBudgetAction = securityToken.methods.changeModuleBudget(modules[index].address, web3.utils.toWei(amount), increase); |
| 582 | await common.sendTransaction(changeModuleBudgetAction); |
| 583 | console.log(chalk.green(`Module budget has been changed successfully!`)); |
| 584 | } |
| 585 | } |
| 586 | |
| 587 | // Helpers |
| 588 | async function showUserInfo(_user) { |