[SOLVED] Moralis [/nft/{address}/token_id] API indexed the NFT contract data incorrectly

Hey I noticed issues today with Moralis API
It is showing incorrect data about my ERC1155 NFT contract

My theory is that the data about my NFT ERC1155 were incorrectly indexed
because they show incorrect amount for each token_id

some API calls i did:




it is on Avalanche fuji testnet

contract 0xbba97ea3912c598a39ce0802d5cd67dd3d873457

token ids: 0, 1, 2

the amount should be 200 for-each

but it is
0xbba97ea3912c598a39ce0802d5cd67dd3d873457:0 amount 29
0xbba97ea3912c598a39ce0802d5cd67dd3d873457:1 amount 1
0xbba97ea3912c598a39ce0802d5cd67dd3d873457:2 amount 1

It was showing correct data on 30 Jan, 31 Jan, 1st Feb 2022 amount 200

The data are incorrect from 2nd Feb 2022

but what is even weirder in the API response:

synced_at is 2022-01-30T21:59:37.463Z

and I am 100% sure it was amount: 200 at Sunday the 30 of January

I even burned a token to kind of force the resync of contract indexing and I called /nft/{address}/sync endpoint it is still synced at 2022-01-30

thanks for reporting, we will investigate

owners endpoint works fine?

yes owners works fine :slight_smile:

as an addition:

if I do this in code:

const res = await Web3API.token.syncNFTContract({
                chain: "0xa869",
                address: "0xbba97ea3912c598a39ce0802d5cd67dd3d873457".toUpperCase()
            console.log('syncNFTContract', res);

the same, nothing changes

and the response of syncNFTContract is returning undefined

and it would be great if it could return something, so we can have retries with exponential backoff due to rate limiting

I think that you could try to sync specific token_ids, this function may work when the contract was never synced

syncNFTContract has only
chain and address as options

there is reSyncMetadata function but it is only for metadata

and I have an issue with the amount not the metadata

can you use owners endpoint until we fix it?

I will give you some context :slight_smile:

No, I can’t use the owner’s endpoint because I need to display the supply of specific token_address:token_id on the marketplace
the way it looks like is:

total_suply / on_sale

like 200 / 40

you can see it here

it is not breaking the functionality of my app but it just looks confusing and wrong :slight_smile:

I cant do now workaround hotfixes because it is my Moralis x Avalanche hackathon submission
so it has code freeze I guess

As long as it will be flagged and fixed soon I am fine with that

Hey :wave:
do you know when more less that could be fixed :slight_smile: ?

Can you check now? It should be fixed

1 Like

Yes, all looks correct now! :tada:
Thank you :slightly_smiling_face:

1 Like