(_tokenSymbol)
| 636 | } |
| 637 | |
| 638 | async function initialize(_tokenSymbol) { |
| 639 | welcome(); |
| 640 | await setup(); |
| 641 | if (typeof _tokenSymbol === 'undefined') { |
| 642 | tokenSymbol = await selectToken(); |
| 643 | } else { |
| 644 | tokenSymbol = _tokenSymbol; |
| 645 | } |
| 646 | let securityTokenAddress = await securityTokenRegistry.methods.getSecurityTokenAddress(tokenSymbol).call(); |
| 647 | if (securityTokenAddress == '0x0000000000000000000000000000000000000000') { |
| 648 | console.log(chalk.red(`Selected Security Token ${tokenSymbol} does not exist.`)); |
| 649 | process.exit(0); |
| 650 | } |
| 651 | let securityTokenABI = abis.securityToken(); |
| 652 | securityToken = new web3.eth.Contract(securityTokenABI, securityTokenAddress); |
| 653 | securityToken.setProvider(web3.currentProvider); |
| 654 | } |
| 655 | |
| 656 | function welcome() { |
| 657 | common.logAsciiBull(); |
no test coverage detected