()
| 14 | ).abi; |
| 15 | |
| 16 | async function getTokens() { |
| 17 | const securityTokenRegistryAddress = "0x240f9f86b1465bf1b8eb29bc88cbf65573dfdd97"; |
| 18 | const securityTokenRegistryABI = await getABIfromEtherscan(securityTokenRegistryAddress); |
| 19 | const securityTokenRegistry = new web3.eth.Contract(securityTokenRegistryABI, securityTokenRegistryAddress); |
| 20 | |
| 21 | let logs = await getLogsFromEtherscan( |
| 22 | securityTokenRegistry.options.address, |
| 23 | 0, |
| 24 | "latest", |
| 25 | "NewSecurityToken(string,string,address,address,uint256,address,bool,uint256)" |
| 26 | ); |
| 27 | console.log(logs.length); |
| 28 | for (let i = 0; i < logs.length; i++) { |
| 29 | let tokenAddress = "0x" + logs[i].topics[1].slice(26, 66); |
| 30 | await getInfo(tokenAddress); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | async function getInfo(tokenAddress) { |
| 35 | let token = new web3.eth.Contract(securityTokenABI, tokenAddress); |
no test coverage detected