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

Function startScript

CLI/commands/transfer.js:16–32  ·  view source on GitHub ↗
(tokenSymbol, transferTo, transferAmount)

Source from the content-addressed store, hash-verified

14//////////////////////////////////////////ENTRY INTO SCRIPT//////////////////////////////////////////
15
16async 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
34async function transfer() {
35 // Let's check if token has already been deployed, if it has, skip to STO

Callers 1

transfer.jsFile · 0.70

Calls 1

transferFunction · 0.85

Tested by

no test coverage detected