()
| 952 | } |
| 953 | |
| 954 | async function countTransferManager() { |
| 955 | console.log('\n', chalk.blue(`Count Transfer Manager at ${currentTransferManager.options.address}`), '\n'); |
| 956 | |
| 957 | // Show current data |
| 958 | let displayMaxHolderCount = await currentTransferManager.methods.maxHolderCount().call(); |
| 959 | |
| 960 | console.log(`- Max holder count: ${displayMaxHolderCount}`); |
| 961 | |
| 962 | let options = ['Change max holder count'] |
| 963 | let index = readlineSync.keyInSelect(options, 'What do you want to do?', { cancel: 'RETURN' }); |
| 964 | let optionSelected = index !== -1 ? options[index] : 'RETURN'; |
| 965 | console.log('Selected:', optionSelected, '\n'); |
| 966 | switch (optionSelected) { |
| 967 | case 'Change max holder count': |
| 968 | let maxHolderCount = readlineSync.question('Enter the maximum no. of holders the SecurityToken is allowed to have: '); |
| 969 | let changeHolderCountAction = currentTransferManager.methods.changeHolderCount(maxHolderCount); |
| 970 | let changeHolderCountReceipt = await common.sendTransaction(changeHolderCountAction); |
| 971 | let changeHolderCountEvent = common.getEventFromLogs(currentTransferManager._jsonInterface, changeHolderCountReceipt.logs, 'ModifyHolderCount'); |
| 972 | console.log(chalk.green(`Max holder count has been set to ${changeHolderCountEvent._newHolderCount} sucessfully!`)); |
| 973 | break; |
| 974 | case 'RETURN': |
| 975 | return; |
| 976 | } |
| 977 | |
| 978 | await countTransferManager(); |
| 979 | } |
| 980 | |
| 981 | async function percentageTransferManager() { |
| 982 | console.log('\n', chalk.blue(`Percentage Transfer Manager at ${currentTransferManager.options.address}`), '\n'); |
no outgoing calls
no test coverage detected