(tokenAddress)
| 32 | } |
| 33 | |
| 34 | async function getInfo(tokenAddress) { |
| 35 | let token = new web3.eth.Contract(securityTokenABI, tokenAddress); |
| 36 | console.log("Token - " + tokenAddress); |
| 37 | console.log("----------------------"); |
| 38 | //console.log("Owner: " + await token.methods.owner().call()); |
| 39 | console.log("Name: " + (await token.methods.name().call())); |
| 40 | console.log("Details: " + (await token.methods.tokenDetails().call())); |
| 41 | console.log("Symbol: " + (await token.methods.symbol().call())); |
| 42 | console.log("Granularity: " + (await token.methods.granularity().call())); |
| 43 | console.log("Total Supply: " + (await token.methods.totalSupply().call())); |
| 44 | console.log("Transfers Frozen: " + (await token.methods.transfersFrozen().call())); |
| 45 | console.log("Minting Frozen: " + (await token.methods.mintingFrozen().call())); |
| 46 | let controllerDisabled = await token.methods.controllerDisabled().call(); |
| 47 | if (controllerDisabled) { |
| 48 | console.log("Controller disabled: YES"); |
| 49 | } else { |
| 50 | console.log("Controller: " + (await token.methods.controller().call())); |
| 51 | } |
| 52 | console.log("Investors: " + (await token.methods.getInvestorCount().call())); |
| 53 | console.log("Latest Checkpoint: " + (await token.methods.currentCheckpointId().call())); |
| 54 | let gtmEventsCount = 0; |
| 55 | let gtmModules = await token.methods.getModulesByName(web3.utils.toHex("GeneralTransferManager")).call(); |
| 56 | for (const m of gtmModules) { |
| 57 | let gtmEvents = await getLogsFromEtherscan( |
| 58 | m, |
| 59 | 9299699, |
| 60 | "latest", |
| 61 | "ModifyWhitelist(address,uint256,address,uint256,uint256,uint256,bool)" |
| 62 | ); |
| 63 | gtmEventsCount += gtmEvents.length; |
| 64 | } |
| 65 | console.log("Count of GeneralTransferManager Events: " + gtmEventsCount); |
| 66 | console.log("Modules Attached (TransferManager):"); |
| 67 | await getModules(2, token); |
| 68 | console.log("Modules Attached (PermissionManager):"); |
| 69 | await getModules(1, token); |
| 70 | console.log("Modules Attached (STO):"); |
| 71 | await getModules(3, token); |
| 72 | console.log("Modules Attached (Checkpoint):"); |
| 73 | await getModules(4, token); |
| 74 | console.log("Modules Attached (Burn):"); |
| 75 | await getModules(5, token); |
| 76 | console.log(); |
| 77 | console.log(); |
| 78 | } |
| 79 | |
| 80 | async function getModules(type, token) { |
| 81 | let modules = await token.methods.getModulesByType(type).call(); |
no test coverage detected