0.0.16 • Published 12 months ago

getter-erc-20-balance v0.0.16

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Description

This npm package provides a class called ERC20Balance that allows you to retrieve the balance of an ERC20 contract for a given wallet address using getERC20BalanceOf method.

Installation

npm install getter-erc-20-balance

API

To import ERC20Balance class use:

import { ERC20Balance } from 'getter-erc-20-balance'

The ERC20Balance class provides the following method:

  • getERC20BalanceOf(contractAddress: string, walletAddress: string, provider: JsonRpcProvider): Promise<string>

This asynchronous method retrieves the balance of an ERC20 contract for the specified wallet address: 1. contractAddress (string): The address of the ERC20 contract. 2. walletAddress (string): The address for which the balance should be retrieved. 3. provider (JsonRpcProvider): An instance of JsonRpcProvider from the ethers.js library, connected to an Ethereum JSON-RPC provider.

Returns a Promise that resolves to the balance as a string

Good luck!

0.0.16

12 months ago

0.0.15

12 months ago

0.0.14

12 months ago

0.0.13

12 months ago

0.0.12

12 months ago

0.0.11

12 months ago

0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago