@pelith/etherscan-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i @pelith/etherscan-api

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

219 kB

Total Files

30

Last publish

Collaborators

  • paul-pelith
  • lucien-pelith
  • pelith.com
  • pelith-hung
  • pelith-admin