0.1.0 • Published 4 years ago
@pelith/etherscan-api v0.1.0
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);
0.1.0
4 years ago