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

feat: add solana caip adapters and market data #7798

Merged
merged 10 commits into from
Sep 25, 2024
Merged

Conversation

NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Sep 24, 2024

Description

We need to add the solana assets using coingecko, it's using CAIP2 to generate the assets.

I also added a flag for Solana so we can disable it at any places like any other chains
It does includes all assets coingecko supports

Also disable any thing not compatible with solana yet such as THORChain quotes

This PR also includes market data for SOL and Solana's assets

Issue (if applicable)

closes #7737
closes #7800

Risk

Low

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

  • Search for Solana, you should be able to see the solana asset page
  • Search for any Solana's assets (MEW, JUP, any other assets), you should be able to click on the asset page
  • Verify that SOL and solana's asset market data are fine
  • Do a general smoke test to see if any thing accessible with solana could crash, also smoke tests other market data

Engineering

n/a

Operations

n/a

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

image
image
image
image
image
image
image
image
image
image
image
image
image
image

@NeOMakinG NeOMakinG marked this pull request as ready for review September 24, 2024 21:41
@NeOMakinG NeOMakinG requested a review from a team as a code owner September 24, 2024 21:41
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually looks excellent, though a few missing pieces.

Tested locally, yarn generate:all regen is sad

@NeOMakinG caip diffs should include actual adapters regen to ensure they're working. While regenerating, I noticed that we're missing:

  • import/export of solana adapter in packages/caip/src/adapters/coingecko/generated/index.ts`
  • actual adapter JSON (will be automatically generated once you add the below and run generate:all script)
  • solana handling in parseData
image

Will test at runtime once added!

packages/caip/src/constants.ts Show resolved Hide resolved
packages/caip/src/constants.ts Show resolved Hide resolved
scripts/generateAssetData/generateAssetData.ts Outdated Show resolved Hide resolved
src/lib/account/account.ts Show resolved Hide resolved
src/lib/account/solana.ts Show resolved Hide resolved
src/state/slices/assetsSlice/assetsSlice.ts Show resolved Hide resolved
src/state/slices/portfolioSlice/utils/index.ts Outdated Show resolved Hide resolved
@NeOMakinG NeOMakinG changed the title feat: add solana caip adapters feat: add solana caip adapters and market data Sep 25, 2024
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Runtime pass

  • regen:all script is happy and generated Solana caip adapters / asset data are present in this diff
image
  • Sanity assets check with Solana flag off

https://jam.dev/c/3083913d-e2c7-4901-99e4-d6427a67df8d

Noticed while testing this: typing eth yields an ENS send option, which is wrong, though also happening in develop

image
  • Sanity assets check with Solana flag on

https://jam.dev/c/43574afe-04c0-4a23-9346-a013aeb870fc

  • Solana assets are present with Solana flag on (noticing chainName weirdness though disregard it as plugin isn't added yet)
image image image

@NeOMakinG NeOMakinG enabled auto-merge (squash) September 25, 2024 12:47
@NeOMakinG NeOMakinG merged commit 2760692 into develop Sep 25, 2024
3 checks passed
@NeOMakinG NeOMakinG deleted the caip-native-sol branch September 25, 2024 12:54
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 this pull request may close these issues.

Solana prep - Assets Market Data Solana prep - CAIP adapters
2 participants