MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / changeBudget

Function changeBudget

CLI/commands/token_manager.js:574–585  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

572}
573
574async 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
588async function showUserInfo(_user) {

Callers 1

listModuleOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected