| 42 | }; |
| 43 | |
| 44 | async function setup() { |
| 45 | try { |
| 46 | securityTokenRegistryAddress = await contracts.securityTokenRegistry(); |
| 47 | let securityTokenRegistryABI = abis.securityTokenRegistry(); |
| 48 | securityTokenRegistry = new web3.eth.Contract(securityTokenRegistryABI, securityTokenRegistryAddress); |
| 49 | securityTokenRegistry.setProvider(web3.currentProvider); |
| 50 | |
| 51 | let polytokenAddress = await contracts.polyToken(); |
| 52 | let polytokenABI = abis.polyToken(); |
| 53 | polyToken = new web3.eth.Contract(polytokenABI, polytokenAddress); |
| 54 | polyToken.setProvider(web3.currentProvider); |
| 55 | } catch (err) { |
| 56 | console.log(err) |
| 57 | console.log(chalk.red('\nThere was a problem getting the contracts. Make sure they are deployed to the selected network.')); |
| 58 | process.exit(0); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | async function step_ticker_registration(_ticker) { |
| 63 | console.log(chalk.blue('\nToken Symbol Registration')); |