TokenOfOwnerByIndex

ERC721 Getter Plugin - TokenOfOwnerByIndex

Description

Enumerate NFTs assigned to an owner

Method

tokenOfOwnerByIndex(address, uint256)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

ERC721 Contract Address

Method Parameters

NamePlugin TypeDescription

owner

FctAddress

Address of NFT Owner

index

FctValue

Index of NFT

Returned Values

NamePlugin TypeSolidity Type

tokenId

FctValue

uint256

Example

Example with initParams

const tokenOfOwnerByIndex = new ERC721.getter.TokenOfOwnerByIndex({
 chainId: 1,
 initParams: {
   to: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" // BAYC NFT Contract
   methodParams: {
     owner: "0x...",
     index: "2"
   }
 }
})

Example without initParams

const tokenOfOwnerByIndex = new ERC721.getter.TokenOfOwnerByIndex({ chainId: 1 })

tokenOfOwnerByIndex.input.set({
   to: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" // BAYC NFT Contract
   methodParams: {
     owner: "0x...",
     index: "2"
   }
})

Learn more

Learn more about EIP712 NFT standard here

Last updated