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

Function getLogsFromEtherscan

scripts/tokenInfo-v2.js:89–107  ·  view source on GitHub ↗
(_address, _fromBlock, _toBlock, _eventSignature)

Source from the content-addressed store, hash-verified

87}
88
89async function getLogsFromEtherscan(_address, _fromBlock, _toBlock, _eventSignature) {
90 let urlDomain = "api";
91 const options = {
92 url: `https://${urlDomain}.etherscan.io/api`,
93 qs: {
94 module: "logs",
95 action: "getLogs",
96 fromBlock: _fromBlock,
97 toBlock: _toBlock,
98 address: _address,
99 topic0: web3.utils.sha3(_eventSignature),
100 apikey: "THM9IUVC2DJJ6J5MTICDE6H1HGQK14X559"
101 },
102 method: "GET",
103 json: true
104 };
105 let data = await request(options);
106 return data.result;
107}
108
109async function getABIfromEtherscan(_address) {
110 let urlDomain = "api";

Callers 2

getTokensFunction · 0.70
getInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected