| 14 | //////////////////////////////////////////ENTRY INTO SCRIPT////////////////////////////////////////// |
| 15 | |
| 16 | async function startScript(tokenSymbol, transferTo, transferAmount) { |
| 17 | _tokenSymbol = tokenSymbol; |
| 18 | _transferTo = transferTo; |
| 19 | _transferAmount = transferAmount; |
| 20 | |
| 21 | try { |
| 22 | let securityTokenRegistryAddress = await contracts.securityTokenRegistry(); |
| 23 | let securityTokenRegistryABI = abis.securityTokenRegistry(); |
| 24 | securityTokenRegistry = new web3.eth.Contract(securityTokenRegistryABI, securityTokenRegistryAddress); |
| 25 | securityTokenRegistry.setProvider(web3.currentProvider); |
| 26 | transfer(); |
| 27 | } catch (err) { |
| 28 | console.log(err) |
| 29 | console.log('\x1b[31m%s\x1b[0m', "There was a problem getting the contracts. Make sure they are deployed to the selected network."); |
| 30 | return; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | async function transfer() { |
| 35 | // Let's check if token has already been deployed, if it has, skip to STO |