Onchain data request

I’m building a memecoin launchpad with an input terminal to handle sales, i’ve hit a roadblock on pulling holders count for tokens launched. jsyk i’m using a factory contract for the app, where new coins are under Sub id, what’s the best way to get these data in real-time. i tried building an indexxer but it gets stuck in a loop.

There’s no direct RPC method to do something like select count(*) from UTXO_TABLE where asset_id = $1 group by owner.

So you will definitely need to get an indexer working, such as hyperindex from envio. Eventually it would be nice to have these kinds of stats baked into the block explorer by default (and similarly the block explorer API), but the explorer is lower priority atm. Let us know if you have issues getting envio working, and if you’re still stuck we can try to provide you with an example envio code snippet that can index this (i.e. # of distinct owners + contract ids which hold some kind of asset)

It would be great if you could share the code snippet so I can use it as a guide to get my indexer working.