The endpoint /liquidity/pairs of the indexer currently (from #40) returns a sorted list of token pairs, but the data from the assets and IBC connections saved in the NPM chain-registry package may be stale. At the time of this writing the token untrn has a CoinGecko ID of neutron in the NPM package, however by using the NPM @chain-registry/client package and fetching fresher data from the main branch, the CoinGecko ID has been corrected to neutron-3 as of ~41 days ago which has not been released as an update to the chain-registry package.
The "looking up chain registry assets" comes with several levels of "freshness":
use the npm chain-registry package
has all current registered main and testnet asset, chain, and IBC info
gets out of date quickly: as soon as a new asset or IBC channel is registered
use npm @chain-registry/client package (and chain-registry package and live chain queries)
can download new assets, chains, and IBC info dynamically
requires a list of chain names so that it can download just the relevant chain, chain-assets, and IBC connection JSONs
relevant chain names can be found by querying the live chain and looking up chain_id in chain of chain-registry
gets out of date less quickly: but will still fail to detect newly registered chains after chain-registry was installed
Using the extra dynamic fetching of assets may not be worth the trouble because it doesn't solve the issue of how to identify assets of newly registered chains. And either of these solutions should work well if we can first resolve #39 and update the indexer on each chain-registry release if these releases are deemed to be frequent enough to be accurate for end users.
This continues on from Sort token pairs list by decreasing TVL#38
The endpoint
/liquidity/pairs
of the indexer currently (from #40) returns a sorted list of token pairs, but the data from the assets and IBC connections saved in the NPMchain-registry
package may be stale. At the time of this writing the tokenuntrn
has a CoinGecko ID ofneutron
in the NPM package, however by using the NPM@chain-registry/client
package and fetching fresher data from the main branch, the CoinGecko ID has been corrected toneutron-3
as of ~41 days ago which has not been released as an update to thechain-registry
package.The "looking up chain registry assets" comes with several levels of "freshness":
chain-registry
package@chain-registry/client
package (andchain-registry
package and live chain queries)chain_id
in chain ofchain-registry
chain-registry
was installedUsing the extra dynamic fetching of assets may not be worth the trouble because it doesn't solve the issue of how to identify assets of newly registered chains. And either of these solutions should work well if we can first resolve #39 and update the indexer on each
chain-registry
release if these releases are deemed to be frequent enough to be accurate for end users.