| 46 | } |
| 47 | |
| 48 | async function selectST() { |
| 49 | if (!tokenSymbol) |
| 50 | tokenSymbol = readlineSync.question('Enter the token symbol: '); |
| 51 | |
| 52 | let result = await securityTokenRegistry.methods.getSecurityTokenAddress(tokenSymbol).call(); |
| 53 | if (result == "0x0000000000000000000000000000000000000000") { |
| 54 | tokenSymbol = undefined; |
| 55 | console.log(chalk.red(`Token symbol provided is not a registered Security Token.`)); |
| 56 | await selectST(); |
| 57 | } else { |
| 58 | let securityTokenABI = abis.securityToken(); |
| 59 | securityToken = new web3.eth.Contract(securityTokenABI,result); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | async function addPermissionModule() { |
| 64 | let generalPermissionManagerAddress; |