| 47 | } |
| 48 | |
| 49 | async function getModules(type, token) { |
| 50 | let index = 0; |
| 51 | while (true) { |
| 52 | try { |
| 53 | let res = await token.methods.modules(type, index).call(); |
| 54 | console.log(" Name: " + web3.utils.toAscii(res.name)); |
| 55 | console.log(" Address: " + res.moduleAddress); |
| 56 | } catch (err) { |
| 57 | // console.log(err); |
| 58 | if (index == 0) { |
| 59 | console.log(" None"); |
| 60 | } |
| 61 | return; |
| 62 | } |
| 63 | index = index + 1; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | async function getLogsFromEtherscan(_address, _fromBlock, _toBlock, _eventSignature) { |
| 68 | let urlDomain = 'api'; |