How to getBalance of a dead/burn wallet?


I am trying to get balance of a specific token inside a dead/burn wallet (0x000000000000000000000000000000000000dEaD)

Is it possible to do it trough Moralis?

This is the peace of code i am using:

const optionsDead = {chain: 'bsc', address: "0x000000000000000000000000000000000000dead" }
const balancesDead = await Moralis.Web3API.account.getTokenBalances(optionsDead);

const tokenAddressDead =  "0x1c2425f50a1e98d5631b223e56760d21bc840c53";
const tokenBalanceDead = await balancesDead.find((token) => token.token_address === tokenAddressDead);


You may get a tjj in out error for addresses that have too many transactions.

I am getting an empty array. So with Moralis is not possible right now :disappointed_relieved:

you get an empty array on first query or on the second part with the filter?

Empty array on first (balancesDead) and undefined on second (tokenBalanceDead)

Same if you try with the address that has only zeros?

With only zeros after 40 seconds i receive an error:

POST https://.../server/functions/getTokenBalances 400
Uncaught (in promise) Error: Web3 API error while calling /:address/erc20
    at Function.<anonymous> (moralis.js:7733:23)
    at tryCatch (moralis.js:73345:40)
    at Generator.invoke [as _invoke] (moralis.js:73576:22)
    at Generator.throw (moralis.js:73401:21)
    at asyncGeneratorStep (moralis.js:29991:24)
    at _throw (moralis.js:30017:9)

Ok, this is the timeout case, I would say that it doesnโ€™t work.

I see, thank you!!!
Will do using old fashion 100+ lines of code :sob: :sweat_smile: :metal: :rocket:

How do you do it that way?

Using web3js =( Moralis will have it someday :nose:

I mean what steps to you make to get that data?

Basically using same getBalance that we have here. The difference would be in loading the required scripts, load abi via json.

When I get to this part of the code I can go into more detail about what worked and what didnโ€™t.