MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / initialize

Function initialize

CLI/commands/token_manager.js:638–654  ·  view source on GitHub ↗
(_tokenSymbol)

Source from the content-addressed store, hash-verified

636}
637
638async 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
656function welcome() {
657 common.logAsciiBull();

Callers 1

token_manager.jsFile · 0.70

Calls 3

welcomeFunction · 0.70
setupFunction · 0.70
selectTokenFunction · 0.70

Tested by

no test coverage detected