BalanceOf

ERC20 Getter Plugin - BalanceOf

Description

Get ERC20 Token balance of owner

Method

balanceOf(address)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

ERC20 Contract Address

Method Parameters

NamePlugin TypeDescription

owner

FctAddress

Address of owner

Returned Values

NamePlugin TypeSolidity Type

balance

FctValue

uint256

Example

Example with initParams

const balanceOf = new ERC20.getter.BalanceOf({
 chainId: 1,
 initParams: {
   to: "0xB1191F691A355b43542Bea9B8847bc73e7Abb137" // KIRO Address
   methodParams: {
     owner: "0x...",
   }
 }
})

Example without initParams

const balanceOf = new ERC20.getter.BalanceOf({ chainId: 1 })

balanceOf.input.set({
    to: "0xB1191F691A355b43542Bea9B8847bc73e7Abb137" // KIRO Address
    methodParams: {
        owner: "0x...",
    }
})

Learn more

Learn more about EIP20 token standard here

Last updated