OwnerOf

ERC721 Getter Plugin - OwnerOf

Description

Find the owner of an NFT

Method

ownerOf(uint256)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

ERC721 Contract Address

Method Parameters

NamePlugin TypeDescription

tokenId

FctValue

Returned Values

NamePlugin TypeSolidity Type

owner

FctAddress

address

Example

Example with initParams

const ownerOf = new ERC721.getter.OwnerOf({
 chainId: 1,
 initParams: {
   to: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" // BAYC NFT Contract
   methodParams: {
     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