Skip to content

feat: add Solana SDK#96

Merged
Sabnock01 merged 11 commits intomainfrom
feat/add-solana-sdk
Mar 17, 2026
Merged

feat: add Solana SDK#96
Sabnock01 merged 11 commits intomainfrom
feat/add-solana-sdk

Conversation

@Sabnock01
Copy link
Collaborator

@Sabnock01 Sabnock01 commented Mar 16, 2026

Summary

  • Adds a full Solana SDK alongside the existing EVM SDK, behind a separate @whetstone-research/doppler-sdk/solana entry point
  • Reorganizes the module structure: all EVM code moves to src/evm/, Solana code lives in src/solana/, shared utilities in src/core/
  • Inlines Codama-generated TypeScript codecs for all 5 Solana programs directly into src/solana/generated/ — no separate npm package or file: dependency required

What's included

Solana SDK (src/solana/)

  • initializer/ — instruction builders and account fetchers for the Initializer program (initialize config/launch, swap, migrate, abort, preview)
  • migrators/cpmmMigrator/ — instruction encoders and state fetchers for the CPMM Migrator program
  • instructions/ — low-level instruction builders for the CPMM pool (add/remove liquidity, swap, fees, oracle, admin operations)
  • client/ — higher-level read clients for config, pool, oracle, and position accounts
  • react/ — React hooks (usePool, useSwap, useOracle, usePosition, useLiquidity, useFees) and UI components (SwapCard, LiquidityPanel, PoolStats, PositionCard, ConnectWallet) with wallet and AMM providers

Codama-generated codecs (src/solana/generated/)

  • ~160 TypeScript files generated from Anchor IDLs for: cpmm, cpmmMigrator, initializer, predictionMigrator, trustedOracle
  • IDL JSON files committed to scripts/idl/; scripts/codegen.ts regenerates from them via pnpm generate:codecs
  • codegen.ts patches cpmm/types/index.ts post-generation to resolve a Codama naming collision (AddLiquidityArgs / CollectFeesArgs exported from both event and instruction-args files)
  • Marked as linguist-generated in .gitattributes

Module restructure

  • src/evm/ — all existing EVM code moved here (no functional changes)
  • src/core/ — shared market-cap helpers extracted here
  • Four tsup entry points: index, evm/index, solana/index, solana/react/index
  • All test and example import paths updated accordingly

CI

  • verify-solana-codecs.yml — triggers on IDL/codegen path changes; regenerates codecs and fails if there is a diff, ensuring src/solana/generated/ stays in sync
  • test.yml — new Solana Tests job runs pnpm test:solana on every PR; test-summary gate updated to require it

@whetstone-devops-app
Copy link

whetstone-devops-app bot commented Mar 16, 2026

✅ No Address Changes

Compared feat/add-solana-sdk with main

This PR does not modify any addresses currently used by the SDK.

While deployments.generated.ts or addresses.ts may have been updated, the runtime addresses referenced by ADDRESSES remain unchanged. This typically means:

  • New contracts were deployed but are not yet integrated into the SDK
  • Code formatting or comments were updated
  • Unused addresses in the generated file changed

Last checked: March 17, 2026 at 17:35:46 UTC

@Sabnock01 Sabnock01 requested a review from kinrezC March 16, 2026 19:01
@Sabnock01 Sabnock01 force-pushed the feat/add-solana-sdk branch from f1c54c8 to 8c8c3d4 Compare March 17, 2026 17:15
@Sabnock01 Sabnock01 merged commit fe96558 into main Mar 17, 2026
7 of 9 checks passed
@Sabnock01 Sabnock01 deleted the feat/add-solana-sdk branch March 17, 2026 17:45
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.

1 participant