get-erc20-balance
v1.0.2
Published
This package allows getting balance of any given erc20 contract for any given wallet address using “balanceOf” method of ERC20 contract on any Ethereum chain.
Readme
get-erc20-balance
This package allows getting balance of any given erc20 contract for any given wallet address using “balanceOf” method of ERC20 contract on any Ethereum chain.
Installation
npm install get-erc20-balanceyarn add get-erc20-balanceUsage
- Create util class instance
import { ERC20Balance } from 'get-erc20-balance'
const erc20BalanceInstance = new ERC20Balance();API
ERC20BalanceInstance.getERC20BalanceOf(contractAddress: string, walletAddress: string, provider: ethers.Provider): Promise<String>
The method returns the balance of the given contract with a string representation:
