holaplex / indexer

Index Solana data using a Geyser plugin (downstream service cluster)
https://holaplex.com
GNU Affero General Public License v3.0
169 stars 39 forks source link

[GQL] `nfts` query is returning invalid accounts #562

Open roederw opened 2 years ago

roederw commented 2 years ago

Query used to get bad data:

{"operationName":"GetNfts","variables":{"creators":["7UXmEd3bZgCbdjzxxAgxms3n389id1rKAWNaw1riEbTd"],"offset":0,"limit":100000},"query":"query GetNfts($creators: [PublicKey!]!, $limit: Int!, $offset: Int!) {\n nfts(creators: $creators, limit: $limit, offset: $offset) {\n address\n mintAddress\n updateAuthorityAddress\n creators {\n address\n verified\n __typename\n }\n __typename\n }\n}"}

Example of a bad account returned:

{ “__typename”: “Nft”, “address”: “4s8WY9ecF3xNpvWokhHg7utBuUa5YoDGQqCUi8L6fBed”, “mintAddress”: “2bqhNunJoXEM22MGgaRDGH9nVtARjfBvfzP89mgqVFrW”, “updateAuthorityAddress”: “817RTX5pWtuTkCUiMtR5wfwvCYwdSQyJ5RyF489UwkpJ”, “creators”: [ { “__typename”: “NftCreator”, “address”: “7UXmEd3bZgCbdjzxxAgxms3n389id1rKAWNaw1riEbTd”, “verified”: true }, { “__typename”: “NftCreator”, “address”: “817RTX5pWtuTkCUiMtR5wfwvCYwdSQyJ5RyF489UwkpJ”, “verified”: false } ] },

https://explorer.solana.com/address/2bqhNunJoXEM22MGgaRDGH9nVtARjfBvfzP89mgqVFrW

roederw commented 2 years ago

Looks like there are two entries for this NFT.

{ "__typename": "Nft", "name": "Debu #7", "address": "4s8WY9ecF3xNpvWokhHg7utBuUa5YoDGQqCUi8L6fBed", "mintAddress": "2bqhNunJoXEM22MGgaRDGH9nVtARjfBvfzP89mgqVFrW", "updateAuthorityAddress": "817RTX5pWtuTkCUiMtR5wfwvCYwdSQyJ5RyF489UwkpJ", "creators": [ { "__typename": "NftCreator", "address": "7UXmEd3bZgCbdjzxxAgxms3n389id1rKAWNaw1riEbTd", "verified": true }, { "__typename": "NftCreator", "address": "817RTX5pWtuTkCUiMtR5wfwvCYwdSQyJ5RyF489UwkpJ", "verified": false } ] },

{ "__typename": "Nft", "name": "Debu #7", "address": "B9qyFzMRTVYc95mak1Tdgu7nhaeRMaGAsFQJmm2vLcXC", "mintAddress": "APWX8KD73QjBsyaVxEhsD9auMTKfAXhTf73tVbqG8BDE", "updateAuthorityAddress": "817RTX5pWtuTkCUiMtR5wfwvCYwdSQyJ5RyF489UwkpJ", "creators": [ { "__typename": "NftCreator", "address": "7UXmEd3bZgCbdjzxxAgxms3n389id1rKAWNaw1riEbTd", "verified": true }, { "__typename": "NftCreator", "address": "817RTX5pWtuTkCUiMtR5wfwvCYwdSQyJ5RyF489UwkpJ", "verified": false } ] }

kespinola commented 2 years ago

@roederw we've recently started to account for burned NFTs is that the case for these?