(_tokenSymbol)
| 803 | } |
| 804 | |
| 805 | async function initialize(_tokenSymbol) { |
| 806 | welcome(); |
| 807 | await setup(); |
| 808 | if (typeof _tokenSymbol === 'undefined') { |
| 809 | tokenSymbol = await selectToken(); |
| 810 | } else { |
| 811 | tokenSymbol = _tokenSymbol; |
| 812 | } |
| 813 | let securityTokenAddress = await securityTokenRegistry.methods.getSecurityTokenAddress(tokenSymbol).call(); |
| 814 | if (securityTokenAddress == '0x0000000000000000000000000000000000000000') { |
| 815 | console.log(chalk.red(`Selected Security Token ${tokenSymbol} does not exist.`)); |
| 816 | process.exit(0); |
| 817 | } |
| 818 | let securityTokenABI = abis.securityToken(); |
| 819 | securityToken = new web3.eth.Contract(securityTokenABI, securityTokenAddress); |
| 820 | securityToken.setProvider(web3.currentProvider); |
| 821 | } |
| 822 | |
| 823 | function welcome() { |
| 824 | common.logAsciiBull(); |
no test coverage detected