Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index channels and their escrow account addresses #3

Open
toliaqat opened this issue Apr 8, 2024 · 0 comments
Open

Index channels and their escrow account addresses #3

toliaqat opened this issue Apr 8, 2024 · 0 comments
Assignees

Comments

@toliaqat
Copy link
Contributor

toliaqat commented Apr 8, 2024

Update 04/30: We have decided to index balances of all accounts instead of calling RPC endpoint for the data during our indexing. This is for performance reasons because calling RPC endpoint inside each handler call could significantly reduce indexing speed reducing our ability to launch new indexing features. By indexing all the account balances, we can get the same data as mentioned bellow, if we also index channels and their addresses.

Total Interchain IST needs to be fetched with custom RPC calls that are equal to the following commands. Subquery does not provide events that can be used for quickly getting this data. The custom RPC. calls needs to be added in the indexer code such that it runs with appropriate interval without causing indexing degradation due to these custom calls.

agd q --node=https://main.rpc.agoric.net:443 ibc channel  channels -ojson \|
jq -r '.channels[] \| select(.port_id == "transfer") \| .channel_id' \|
while read channel; do
addr=$(agd q ibc-transfer escrow-address transfer $channel)
agd q --node=https://main.rpc.agoric.net:443 bank balances --denom=uist -ojson $addr \|
jq -r '"\(.amount)\(.denom)"'
done
@toliaqat toliaqat self-assigned this Apr 8, 2024
@toliaqat toliaqat changed the title Custom RPC calls for "Total Interchain IST" in Inter Protocol Summary page Index channels and their escrow account addresses Apr 30, 2024
@toliaqat toliaqat removed their assignment Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants