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

0.2.3 • Public • Published

@pelith/ethers-multicall npm version

Install

yarn add @pelith/ethers-multicall

Example

import { Contract as MulticallContract, Provider as MulticallProvider } from '@pelith/ethers-multicall';

const ethcallProvider = new MulticallProvider(web3Provider, chainId);
const tokenContract = new MulticallContract(address, ERC20_ABI);
const balances = await ethcallProvider.all([
  tokenContract.balanceOf(account1),
  tokenContract.balanceOf(account2),
]);

const balancesAtBlock = await ethcallProvider.all([
  tokenContract.balanceOf(account1),
  tokenContract.balanceOf(account2),
], blockTag);

Dependents (0)

Package Sidebar

Install

npm i @pelith/ethers-multicall

Weekly Downloads

2

Version

0.2.3

License

MIT

Unpacked Size

299 kB

Total Files

28

Last publish

Collaborators

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