-
Notifications
You must be signed in to change notification settings - Fork 780
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
chore: add automation script for injective assets #974
chore: add automation script for injective assets #974
Conversation
Hello team! Firstly, the asset.json is updated based on the chainlist provided by the Injective team. Could you please check if all of the data are included in the json file?? And the things that are not clear are the following:
|
@soaryong-c, happy to help clarify!
It seems you're referencing this denom from the
I see what you're saying that there is not a way to register the Astroport Injective factory denom as a token to display properly on your end based off the mapping in The most info we can get regarding this token is the following based off our tooling:
Since this token doesnt have a
yep, we can definitely filter out
yes, we can add a step to our CI/CD to make a PR to Cosmostation chainlist to update the For automation, I just need to know which tokens on the |
@shane-moore Additionally, when you submit a PR to add the token, could you add on the information where the token is using right now? (Similar to what you mentioned in the previous message that you are going to use the token in the helix) It is because for mintscan, we have a policy to only display the tokens that are actually using right now. Thank you again and we will close the current issue that is on the github. Let's continue the discussion regarding this topic on Telegram. |
Intent
DefiLlama
uses https://github.com/cosmostation/chainlist/blob/main/chain/injective/assets.json in order to calculate tvl for the dex, Helix. They useassets.json
to transform token amounts that exist on helix's orderbook from chain formatted numbers to human readable (usingassets.json
decimals property) and also use thecoingeckoId
to get usd price for the assets. The problem is that https://github.com/cosmostation/chainlist/blob/main/chain/injective/assets.json is missing many tokens that are tradable on the dex, which uses bank module under the hood, so they're not being counted towards tvl. Specifically, these assets, and you can imagine additional missing metadata overtime.assets.json
needs to be able to map adenom
to it's proper decimals + coingeckoId for all the assets on our bank module. In the open sourceinjective-ts
repo, there is a canonical map of all tokens used byinjective
related products. then, there are some helper functions in the@injectivelabs/sdk-ts
and@injectivelabs/sdk-ui-ts
packages that help narrow down which assets on the canonical token map exist in the bank module and also transform the tokens to a consistent format. I use these helpers in this PR as to showcase what I mean.automated-assets.json
to display how the injective canonical tokens map can be transformed into a format that is similar to https://github.com/cosmostation/chainlist/blob/main/chain/injective/assets.json. I say similar because there are certain fields such asorigin_chain
that we do not track in the canonical map, so I couldn't generate this field. I need some feedback from you folks on whether the token metadata inautomated-assets.json
is sufficient and accurate enough to be added to the tokens already included in https://github.com/cosmostation/chainlist/blob/main/chain/injective/assets.json.automated-assets.json
list retains any manually entered tokens that are already included in https://github.com/cosmostation/chainlist/blob/main/chain/injective/assets.json. I just added the ones that are missing by runningyarn build
.Approaches
I could use your help on a path forward. Here are some ideas:
script.ts
to where it generates sufficient token metadata to append to the existinginjective/assets.json
. Then, during your CI/CD,script.ts
could run and updateinjective/assets.json
on the fly.injective-ts
CI/CD that makes a PR to this repo to updateinjective/assets.json
usingscript.ts
whenever new denoms are added to our canonical map.Pertinent
Even without the automation, it's important to us to have the bank module denoms that are currently missing in
injective/assets.json
added, so that we can show TVL properly onDefiLlama
. Most important to add are the 14 denoms that are shown as missing above, whether they are added manually using the token metadata fromautomated-assets.json
or otherwise. Please help with this piece first, and we can handle the automation next.Thanks for helping us get this sorted!