BalanceOfBatch

ERC1155 Getter Plugin - BalanceOfBatch

Description

Get the balance of multiple account/token pairs

Method

balanceOfBatch(address[], uint256[])

Method Parameters

NamePlugin TypeDescription

accounts

FctAddressList

ids

FctValueList

Returned Values

NamePlugin TypeSolidity Type

firstBalance

FctValue

uint256

lastBalance

FctValue

uint256

Example

Example with initParams

const balanceOfBatch = new ERC1155.getter.BalanceOfBatch({
 chainId: 1,
 initParams: {
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     accounts: ["0x...", "0x..."]
     ids: ["4", "6"]
   }
 }
})

Example without initParams

const balanceOfBatch = new ERC1155.getter.BalanceOfBatch({ chainId: 1 })

balanceOfBatch.input.set({
   to: "0x495f947276749Ce646f68AC8c248420045cb7b5e" // OpenSea Shared Storefront
   methodParams: {
     accounts: ["0x...", "0x..."]
     ids: ["4", "6"]
   }
})

Learn more

Learn more about EIP1155 Multi Token standard here

Last updated