Skip to content

Conversation

@franRappazzini
Copy link

This pull request adds a complete example project, cpi-example-damm-v2, demonstrating how to initialize a Meteora DAMM v2 pool via CPI (Cross-Program Invocation) on Solana devnet using Anchor and TypeScript. The changes include Rust and TypeScript source code, configuration files, dependencies, a comprehensive README, and test scripts to provide a ready-to-use template for similar integrations.

The most important changes are:

Core Program and Integration:

  • Added a new Anchor program in Rust (programs/cpi-example-damm-v2/src/lib.rs) that exposes a cpi_initialize_pool instruction, allowing CPI into the Meteora DAMM v2 protocol to initialize a pool, with all required account validations and cross-program invocation logic.
  • Added a TypeScript test suite (tests/damm_v2.test.ts) that demonstrates end-to-end pool initialization and state verification using the Anchor and Meteora SDKs.

Project Setup and Configuration:

  • Added project configuration files: Anchor.toml, Cargo.toml, and package.json to specify toolchain, dependencies, build scripts, and workspace members for both Rust and TypeScript environments. [1] [2] [3] [4] [5] [6]
  • Added a migration deploy script (migrations/deploy.ts) as a template for Anchor migrations.

Documentation:

  • Added a detailed README.md with setup instructions, prerequisites, test and deployment steps, and troubleshooting tips for running the example on Solana devnet.

franRappazzini and others added 5 commits December 17, 2025 19:22
Create a complete example demonstrating how to use Cross-Program Invocation (CPI)
to initialize a pool. Includes Anchor program implementation and corresponding tests.
Refine documentation for the Anchor CPI example to improve clarity and guidance.
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