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

Add coingecko_id to asset metadata #121

Closed
erwanor opened this issue Jan 23, 2025 · 2 comments · Fixed by #122
Closed

Add coingecko_id to asset metadata #121

erwanor opened this issue Jan 23, 2025 · 2 comments · Fixed by #122
Assignees

Comments

@erwanor
Copy link
Contributor

erwanor commented Jan 23, 2025

In penumbra-zone/penumbra#5000 we added a coingecko_id to the Metadata proto. Now, we should augment the penumbra-1 registry entries with an associated id:

  ATOM: "cosmos",
  btc: "bitcoin",
  eth: "ethereum",
  TIA: "celestia",
  OSMO: "osmosis",
  USDC: "usd-coin",
  WBTC: "wrapped-bitcoin",
  BTC: "bitcoin",

This will let us amend and merge penumbra-zone/penumbers#16 which was kindly done for us.

This means we have to:

  1. Bump the protos
  2. Augment the registry
  3. Publish it

It would be very helpful to document each steps to facilitate collaborations with other teams

@erwanor erwanor moved this to 📝 Todo in Penumbra web Jan 23, 2025
@JasonMHasperhoven JasonMHasperhoven self-assigned this Jan 24, 2025
@JasonMHasperhoven JasonMHasperhoven moved this from 📝 Todo to 🏗 In progress in Penumbra web Jan 24, 2025
@vacekj vacekj assigned vacekj and unassigned JasonMHasperhoven Jan 27, 2025
@vacekj
Copy link
Member

vacekj commented Jan 27, 2025

Since the CoinGecko API that serves all of the supported tokens and their addresses is behind a paid plan, I am going one by one and adding the ids manually for each token. Some of the tokens, like COOK, are not listed on CoinGecko, leaving those fields blank.

managed to get a free API key, querying the coingecko api automatically now. also here's all of their supported coins in a gsheet: https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?gid=0#gid=0

@vacekj
Copy link
Member

vacekj commented Jan 27, 2025

  1. added all relevant ids from the sheet mentioned above.
  2. updated the penumbra crates names and commit shas to the commit that introduces the coingecko_id field.
  3. Made a PR to core to add the coingecko_id field to the Metadata struct that processor.rs works with (relevant discussion here) - asset: add coingecko_id to Metadata struct penumbra-zone/penumbra#5007
  4. After that PR is merged, will finish and merge this one.

erwanor pushed a commit to penumbra-zone/penumbra that referenced this issue Jan 27, 2025
Extends the `Inner` struct in `denom_metadata.rs` to include a
`coingecko_id` field. Updates related methods to handle the new field,
including `From`, `TryFrom`, `Debug`, and default initialization.

## Issue ticket number and link

prax-wallet/registry#121

## Checklist before requesting a review

- [x] I have added guiding text to explain how a reviewer should test
these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:
@vacekj vacekj linked a pull request Jan 28, 2025 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Penumbra web Jan 28, 2025
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

Successfully merging a pull request may close this issue.

3 participants