What does the amount
field mean in getNFTs endpoint: https://deep-index.moralis.io/api/v2/{address}/nft
? Could not find it in the docs.
I know I can own multiple of a single NFT. Is this amount
field related to that?
What does the amount
field mean in getNFTs endpoint: https://deep-index.moralis.io/api/v2/{address}/nft
? Could not find it in the docs.
I know I can own multiple of a single NFT. Is this amount
field related to that?
It could be related to that, for example if it would be an erc1155 then you could have any number for the same token id
Curious… for some NFTs, I noticed weird values. E.g:
Contract address: 0x59653e37f8c491c3be36e5dd4d503ca32b5ab2f4
Token ID: 0
Amount: 38797342817689
Contract address: 0x97a20815a061eae224c4fdf3109731f73743db73
Token ID: 6
Amount: 628858018
So, I imagine that won’t be the number of copies the wallet owns, right?
That said, what do these huge values mean, and when to consider the amount
field to be the number of copies and when not?
What API requests did you use to get that results with that amount?
in the first case it is an erc1155 token and there the amount can have any value, in the second case it shouldn’t have that value for that CryptoPuncs contract
I used https://deep-index.moralis.io/api/v2/:address/nft?chain=eth&format=decimal
With wallet 0x12f3F2fD2054B27B0BfC4a3d924fccf0963ba632
I’ll look tomorrow, you probably iterated over all the pages
by looking again now, it looks like both contracts are erc1155 contracts, in that case the amount can have values like that
TY for looking into this.
In that case, how do I know how many copies of a single NFT a user’s wallet own?
you could verify that information by making a call on chain in order to check the balance for a wallet address and a token id
https://etherscan.io/address/0x97a20815a061eae224c4fdf3109731f73743db73#readContract
=>
calling balanceOf for account 0x12f3F2fD2054B27B0BfC4a3d924fccf0963ba632 \
and token id 6
=>
[ balanceOf(address,uint256) method Response ]
uint256 : 27927685
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.