@pelith/etherscan-api
v0.1.0
Published
## Example
Downloads
2
Keywords
Readme
Etherscan Api
Example
import { keccak256 } from "@ethersproject/keccak256";
import { toUtf8Bytes } from "@ethersproject/strings";
import etherscanApi from 'etherscan-api';
const apiKey = process.env.ETHERSCAN_APIKEY as string;
const api = etherscanApi(apiKey, 'bsc_mainnet');
const topicHash = keccak256(toUtf8Bytes('Submit(address,uint256[])'));
const logs = await api.log.getLogs(INTELLIGENCE_ADDRESS, startBlock.toString(), 'latest', topicHash);