Moralis.Web3API.account.getNFTs return wrong result

Hi @cryptokid

This is my code to get all the NFTs of 0x6B72dE7963dbc05E58eB1aAf31288107310c165E on BSC:

const options = { chain: 'bsc', address: '0x6B72dE7963dbc05E58eB1aAf31288107310c165E' };
           var result = await Moralis.Web3API.account.getNFTs(options);
           console.log(result);
           return;

Now, the problem is, when I run that code, Moralis only return 18 NFTs.

But when I check on bscscan, he has more than 18 NFTs:
https://bscscan.com/tokentxns-nft?a=0x6B72dE7963dbc05E58eB1aAf31288107310c165E

Can you help me check why this problem happened?

Thanks.

which NFTs are missing - do you have an example?
bscscan link you sent shows incoming and outgoing transactions not current nft balances

@ivan
He is my customer.
I’m sure he is still own our game’s NFT:
Mytoken NFT address is: 0x7a4d7919996a71eaf60376141ca0dff6e644673a
For example:
1/ https://bscscan.com/token/0x7a4d7919996a71eaf60376141ca0dff6e644673a?a=10551
2/ https://bscscan.com/token/0x7a4d7919996a71eaf60376141ca0dff6e644673a?a=10546
3/ https://bscscan.com/token/0x7a4d7919996a71eaf60376141ca0dff6e644673a?a=10553

This guy still hold my 10551,10546,10553…

But this is the result when I call getNFTs
No token from 0x7a4d7919996a71eaf60376141ca0dff6e644673a

{
  "total": 18,
  "page": 0,
  "page_size": 500,
  "result": [
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5043006",
      "block_number_minted": "13321832",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321832",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5001425",
      "block_number_minted": "13312655",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13312655",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042706",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5001424",
      "block_number_minted": "13312655",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13312655",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042704",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042708",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042705",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5001420",
      "block_number_minted": "13312655",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13312655",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5418199",
      "block_number_minted": "13396920",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13396920",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5001421",
      "block_number_minted": "13312655",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13312655",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042702",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5044058",
      "block_number_minted": "13322016",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13322016",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042703",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x7a4d7919996a71eaf60376141ca0dff6e644673a",
      "token_id": "10400",
      "block_number_minted": "13674069",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13674069",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Rooster Battle NFT",
      "symbol": "RBG",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5001423",
      "block_number_minted": "13312655",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13312655",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5044059",
      "block_number_minted": "13322016",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13322016",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5001422",
      "block_number_minted": "13312655",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13312655",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    },
    {
      "token_address": "0x30cc0553f6fa1faf6d7847891b9b36eb559dc618",
      "token_id": "5042707",
      "block_number_minted": "13321778",
      "owner_of": "0x6b72de7963dbc05e58eb1aaf31288107310c165e",
      "block_number": "13321778",
      "amount": "1",
      "contract_type": "ERC721",
      "name": "Bomber Hero",
      "symbol": "BHERO",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "is_valid": 0,
      "syncing": 1,
      "frozen": 0
    }
  ],
  "status": "SYNCED"
}

Please check and give me answer, @cryptokid, @ivan

1 Like

we’ll have to investigate, thanks for reporting

Can you check now if you get the right data?

@cryptokid
Yes, the data arrived. But is it possible that other customers will lose some data? How can we check?

We checked all the nfts for that smart contract address. You can list all the nfts associated with that smart contract address, for example to get all the owners. And check if something is missing.

Hi,

We still have random cases where we cannot get NFTs of a wallet. For example this one

https://bscscan.com/address/0x4040bdf108a645Aa6353f441E95a7dB75DD84337#tokentxnsErc721

He has token 9695 minted 1 day 21 hours ago, but this function (Moralis.Web3API.account.getNFTs) only returns the other NFTs, not our Rooster Battle NFT token.

How often does this data synced? Is there anyway we can trigger the sync for a specific wallet?

it looks like this is the current owner of that token id:
https://bscscan.com/address/0xabbb28e4f395781227feb3c57d72b5a3a8fa7be6#tokentxnsErc721

Hi,

I’m talking about RB Ticket NFT, not RBG. (same 9695 ID)

https://bscscan.com/token/0x4169e62ae29ff0b25d6c3963def130235d9fb2a6?a=0x4040bdf108a645aa6353f441e95a7db75dd84337

ok, got it, we’ll have to investigate

@cryptokid
Can you tell me the detail of the investigation?
The owner of 9695 (0x4040bdf108a645Aa6353f441E95a7dB75DD84337) cannot see that NFT in his inventory.

I still can check in bscscan: https://bscscan.com/token/0x4169e62ae29ff0b25d6c3963def130235d9fb2a6?a=0x4040bdf108a645aa6353f441e95a7db75dd84337

I tried to call from Moralis, but do not see that NFT:

Below is the code I can. It do not return 9695.

var NFTs = await Moralis.Web3API.account.getNFTs({'chain': '0x38', 'address': "0x4040bdf108a645Aa6353f441E95a7dB75DD84337"})

please give us the answer, because our user waited too long.

I don’t have an update on that investigation now

@nkduong, it should work now:

{
    "token_address": "0x4169e62ae29ff0b25d6c3963def130235d9fb2a6",
    "token_id": "9695",
    "block_number_minted": "13701308",
    "owner_of": "0x4040bdf108a645aa6353f441e95a7db75dd84337",
    "block_number": "13701308",
    "amount": "1",
    "contract_type": "ERC721",
    "name": "Rooster Battle Presale Ticket",
    "symbol": "RBTicket",
    "token_uri": null,
    "metadata": null,
    "synced_at": null,
    "is_valid": 0,
    "syncing": 1,
    "frozen": 0
}

Thank you @cryptokid. Is there any solution to avoid this problem in the future, or anyway we can manually sync data from the chain to our DB?

that shouldn’t have happened in the first place, we are working on improving that process so that it doesn’t happen again, if you find other cases you can post here