We will first demonstrate the NFT query with the Sappy Seals collection then we will do the same for the Pudgy Penguins collection
https://www.loom.com/share/dc0daaac799a4943a4691163991ad394?sid=45b3d22d-0dd0-4922-8943-ffe40b6731d8
Perform SELECT
queries from Polygon zkEVM on the Sappy Seals NFT collection on Ethereum to see which NFTs an address owns over a specified block range.
Click on “Connect to Web3” to connect your wallet.
Expand the “queryNFT” section.
Populate the following fields with these values:
“query’: 0.00045
“storageContract”: 0x364C828eE171616a39897688A831c2499aD972ec
(the Sappy Seals contract address)
“offset”: 5
Populate “holder” with an address you’d like to query (eg. 0x1C70D0A86475CC707b48aA79F112857e7957274f
).
Populate the “startBlock” and “endBlock” fields to identify the Ethereum mainnet block range you’d like to query over (eg. 20365188 to 20365288).
Click the “Write” button to run the query.
If you are familiar with SQL, the query you send translates to this statement:
SELECT token_ids
FROM sappy_seals
WHERE owner = '0x1C70D0A86475CC707b48aA79F112857e7957274f'
AND block >= 20365188
AND block <= 20365288
LIMIT 5 OFFSET 5
Once you sign and broadcast the query tx, the Lagrange Proof Network will compute an off-chain proof that it submits on chain once ready.
respond
.Txn Hash
and navigate to the Logs
Tab. You should be able to see the token ids
which correspond to the NFTs of the holder