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

Function getModules

scripts/tokenInfo-v1.js:49–65  ·  view source on GitHub ↗
(type, token)

Source from the content-addressed store, hash-verified

47}
48
49async 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
67async function getLogsFromEtherscan(_address, _fromBlock, _toBlock, _eventSignature) {
68 let urlDomain = 'api';

Callers 1

getInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected