Verify ownership of an ERC-721 token at a particular block
A marketplace listing may outlive a transfer. For an ownership check, ask the NFT contract about the specific token ID on a chosen block.
Encode the ownerOf call
Token ID 42 occupies a full ABI word after the four-byte selector. Send the following data with eth_call, set to to the verified collection address and supply the desired block parameter.
0x6352211e000000000000000000000000000000000000000000000000000000000000002a
Decode a successful 32-byte return word as an address. Compare that address with the expected owner on the same chain. A different collection can issue its own token 42, so record the contract address with the ID.
Distinguish an absent token from a failed read
ERC-721 requires ownerOf to throw for an invalid token. A generic RPC failure can also come from an unavailable historical state or an incorrect contract address. Check the error and the collection’s code before labeling a token burned. eips.ethereum.org ERC-721