()
| 26 | }; |
| 27 | |
| 28 | async function selectContract() { |
| 29 | console.log('\n\x1b[34m%s\x1b[0m',"Contract Manager - Contract selection"); |
| 30 | let contractList = ['PolymathRegistry', 'FeatureRegistry', 'SecurityTokenRegistry', 'ModuleRegistry']; |
| 31 | |
| 32 | while (!currentContract) { |
| 33 | let index = readlineSync.keyInSelect(contractList, `Select a contract: `); |
| 34 | let selected = index == -1 ? 'CANCEL' : contractList[index]; |
| 35 | switch (selected) { |
| 36 | case 'PolymathRegistry': |
| 37 | console.log(chalk.red(` |
| 38 | ********************************* |
| 39 | This option is not yet available. |
| 40 | *********************************`)); |
| 41 | break; |
| 42 | case 'FeatureRegistry': |
| 43 | console.log(chalk.red(` |
| 44 | ********************************* |
| 45 | This option is not yet available. |
| 46 | *********************************`)); |
| 47 | break; |
| 48 | case 'SecurityTokenRegistry': |
| 49 | let strAdress = await contracts.securityTokenRegistry(); |
| 50 | let strABI = abis.securityTokenRegistry(); |
| 51 | currentContract = new web3.eth.Contract(strABI, strAdress); |
| 52 | await strActions(); |
| 53 | break; |
| 54 | case 'ModuleRegistry': |
| 55 | console.log(chalk.red(` |
| 56 | ********************************* |
| 57 | This option is not yet available. |
| 58 | *********************************`)); |
| 59 | break; |
| 60 | case 'CANCEL': |
| 61 | process.exit(0); |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | async function strActions() { |
| 67 | console.log('\n\x1b[34m%s\x1b[0m',"Security Token Registry - Main menu"); |
no test coverage detected