| 23 | let tokenSymbol |
| 24 | |
| 25 | async function setup() { |
| 26 | try { |
| 27 | let securityTokenRegistryAddress = await contracts.securityTokenRegistry(); |
| 28 | let securityTokenRegistryABI = abis.securityTokenRegistry(); |
| 29 | securityTokenRegistry = new web3.eth.Contract(securityTokenRegistryABI, securityTokenRegistryAddress); |
| 30 | securityTokenRegistry.setProvider(web3.currentProvider); |
| 31 | |
| 32 | let polytokenAddress = await contracts.polyToken(); |
| 33 | let polytokenABI = abis.polyToken(); |
| 34 | polyToken = new web3.eth.Contract(polytokenABI, polytokenAddress); |
| 35 | polyToken.setProvider(web3.currentProvider); |
| 36 | |
| 37 | let featureRegistryAddress = await contracts.featureRegistry(); |
| 38 | let featureRegistryABI = abis.featureRegistry(); |
| 39 | featureRegistry = new web3.eth.Contract(featureRegistryABI, featureRegistryAddress); |
| 40 | featureRegistry.setProvider(web3.currentProvider); |
| 41 | } catch (err) { |
| 42 | console.log(err); |
| 43 | console.log(chalk.red(`There was a problem getting the contracts. Make sure they are deployed to the selected network.`)); |
| 44 | process.exit(0); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // Start function |
| 49 | async function executeApp() { |