()
| 6 | const generalTransferManagerABI = JSON.parse(require('fs').readFileSync('../CLI/data/GeneralTransferManager1-4-0.json').toString()).abi; |
| 7 | |
| 8 | async function getTokens() { |
| 9 | const securityTokenRegistryAddress = "0xEf58491224958d978fACF55D2120c55A24516B98"; |
| 10 | const securityTokenRegistryABI = await getABIfromEtherscan(securityTokenRegistryAddress); |
| 11 | const securityTokenRegistry = new web3.eth.Contract(securityTokenRegistryABI, securityTokenRegistryAddress); |
| 12 | |
| 13 | let logs = await getLogsFromEtherscan(securityTokenRegistry.options.address, web3.utils.hexToNumber('0x5C5C18'), 'latest', 'LogNewSecurityToken(string,address,address)'); |
| 14 | for (let i = 0; i < logs.length; i++) { |
| 15 | let tokenAddress = '0x' + logs[i].topics[1].slice(26, 66) |
| 16 | await getInfo(tokenAddress); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | async function getInfo(tokenAddress) { |
| 21 | let token = new web3.eth.Contract(securityTokenABI, tokenAddress); |
no test coverage detected