BalanceOf

ERC1155 Getter Plugin - BalanceOf

Description

Get the balance of an account's tokens.

Method

balanceOf(address, uint256)

Method Parameters

NamePlugin TypeDescription

account

FctAddress

id

FctValue

Returned Values

NamePlugin TypeSolidity Type

balance

FctValue

uint256

Example

Example with initParams

const balanceOf = new ERC1155.getter.BalanceOf({
 chainId: 1,
 initParams: {
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     owner: "0x...",
     id: "4"
   }
 }
})

Example without initParams

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

balanceOf.input.set({
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     owner: "0x...",
     id: "4"
   }
})

Learn more

Learn more about EIP1155 Multi Token standard here

Last updated