# SRC-20 User Balances

**URL:** <https://forum.fuel.network/t/src-20-user-balances/5308>\
**Category:** General\
**Created:** [May 16, 2024, 12:31pm UTC](https://forum.fuel.network/t/src-20-user-balances/5308 "2024-05-16T12:31:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alphaK3Y](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/alphak3y/32/1017_2.png) [@alphaK3Y](https://forum.fuel.network/u/alphaK3Y)\
**Post date:** [May 16, 2024, 12:31pm UTC](https://forum.fuel.network/t/src-20-user-balances/5308/1 "2024-05-16T12:31:45Z")

</div>

How do we query the user balance of an SRC-20?

I understand given the UTXO model we would have to add up all the transactions.

In Ethereum, we have to track the balances in storage due to the account-based model.

What is the best way to go about this on-chain?

---

<div class="post-metadata">

**Author:** ![naz3eh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/naz3eh/32/2025_2.png) [@naz3eh](https://forum.fuel.network/u/naz3eh)\
**Post date:** [May 16, 2024, 3:28pm UTC](https://forum.fuel.network/t/src-20-user-balances/5308/2 "2024-05-16T15:28:03Z")

</div>

Hey @alphaK3Y, to query the asset balance of an address, you can follow the docs for the [TS SDK](https://docs.fuel.network/docs/fuels-ts/wallets/checking-balances/#checking-balances) and [GraphQL API](https://docs.fuel.network/docs/graphql/recipes/#get-an-asset-balance-of-an-address).  
And if you want to do it on-chain, you can have a look at a similar forum question [here](https://forum.fuel.network/t/how-to-get-the-balance-of-an-eoa-address-in-sway/1360/5). lmk if you have any more questions

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/david/32/32_2.png) [@david](https://forum.fuel.network/u/david)\
**Post date:** [May 16, 2024, 5:40pm UTC](https://forum.fuel.network/t/src-20-user-balances/5308/3 "2024-05-16T17:40:26Z")

</div>

Hey @alphaK3Y, it’s not possible to fully read a user’s token balances on-chain (in a smart-contract or script), since the chain only has access to the UTXOs included in the transactions.

However, smart-contracts store their token balances using an accounts model _within_ the smart contract. So a smart contract can read the balance of another smart contract (assuming the contract was included in the transaction).

---

<div class="post-metadata">

**Author:** ![crypt0mate](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/crypt0mate/32/2445_2.png) [@crypt0mate](https://forum.fuel.network/u/crypt0mate)\
**Post date:** [May 16, 2024, 6:20pm UTC](https://forum.fuel.network/t/src-20-user-balances/5308/4 "2024-05-16T18:20:47Z")

</div>

@naz3eh How would one go about listing all addresses that hold a specific SRC-20 token?

---

<div class="post-metadata">

**Author:** ![naz3eh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/naz3eh/32/2025_2.png) [@naz3eh](https://forum.fuel.network/u/naz3eh)\
**Post date:** [May 18, 2024, 1:39am UTC](https://forum.fuel.network/t/src-20-user-balances/5308/5 "2024-05-18T01:39:07Z")

</div>

This is probably something that needs an indexer and would be possible once we have SubSquid or HyperFuel ready

---

<div class="post-metadata">

**Author:** ![Svennooo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/svennooo/32/2895_2.png) [@Svennooo](https://forum.fuel.network/u/Svennooo)\
**Post date:** [May 21, 2024, 11:56am UTC](https://forum.fuel.network/t/src-20-user-balances/5308/6 "2024-05-21T11:56:50Z")

</div>

Hey @crypt0mate, we would be keen to assist you with this use case.

This is a good use case for an indexer such as HyperIndex for Fuel. A handler to process transfers for asset, but FVM token transfers don’t emit a log, they emit a `transfer` receipt which we don’t support just yet. Mint, Burn, Transfer, and TransferOut to be supported soon.

Another way to do this, is to use HyperFuel to query for getting transfer receipts of a specific asset. You’d just need to then process these receipts to construct a current list of addresses that have a balance of the token.  
e.g. [hyperfuel-client-python/examples/received-asset.py at main · enviodev/hyperfuel-client-python · GitHub](https://github.com/enviodev/hyperfuel-client-python/blob/main/examples/received-asset.py)
