Skip to content

feat(cct-sdk): Add get supported tokens solana op - #319

Open
mervin-link wants to merge 6 commits into
feat/DAPP-10787-get-token-admin-registry-configfrom
feat/DAPP-10812-get-supported-tokens
Open

feat(cct-sdk): Add get supported tokens solana op#319
mervin-link wants to merge 6 commits into
feat/DAPP-10787-get-token-admin-registry-configfrom
feat/DAPP-10812-get-supported-tokens

Conversation

@mervin-link

@mervin-link mervin-link commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What

  • DAPP-10812
  • Expose the existing SolanaChain.getSupportedTokens implementation through the Solana CCT facade, with CCT input validation and Router resolution.
  • Improve Solana token-pool decode diagnostics and missing-state recovery guidance.

Why

  • Allow CCT SDK consumers to list token mints configured in a Solana Router’s TokenAdminRegistry
  • Make token-pool configuration failures easier to diagnose

Notes

  • All error changes are follow ups from this comment (2. Follow-up polish batch).

@mervin-link
mervin-link requested a review from apedrob July 30, 2026 17:14
@mervin-link
mervin-link requested review from a team, PabloMansanet and aelmanaa as code owners July 30, 2026 17:14
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

You must have Developer access to commit code to Chainlink Labs on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles

@aelmanaa aelmanaa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I verified it live on devnet with a triple-source proof: the CCT op, core, and a from-scratch getProgramAccounts enumeration all return the identical 655-mint set against the real ccip-router 1.6.2 router, and I confirmed the enumeration's PDA invariant against a live router-owned v2 TAR. npm run check -w ccip-sdk is green and the touched tests (86) pass. My comments are all Low/Nit: the EVMTokenManager facade asymmetry (①, a follow-up, and milder than the 10787 analog because the shared read is already on Chain), a doc-the-no-pagination note (②), a perf note on the inherited unbounded scan in core (③, not this PR's fix), and an OffRamp-path test (④). None block. APPROVE (mergeable).

Comment thread ccip-sdk/src/cct/solana/index.ts Outdated
/** Creates a CCT data decode error. */
constructor(message = 'Unable to decode CCT data', options?: CCIPErrorOptions) {
super(CCIPErrorCode.CCT_DATA_DECODE_FAILED, message, {
constructor(account: string, options?: CCIPErrorOptions) {

@aelmanaa aelmanaa Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Nit — collateral breaking constructor change, acceptable] CCTDataDecodeError changed from (message?, options?) to (account: string, options?). This new shape is strictly better (structured context.account, CCIPError.from normalizing non-Error causes, both tested). Single caller updated (programs/token-pool.ts:65). No action needed — noting for the record since it's outside the getSupportedTokens feature proper.
One of the advantages here is that you can reuse this error and each time directly parse the account address from error.context.account (instead of parsing from a non structured string)

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.

2 participants