https://github.com/bitfancy/simple-raydium-cpi
raydium cpi example
https://github.com/bitfancy/simple-raydium-cpi
Last synced: 8 months ago
JSON representation
raydium cpi example
- Host: GitHub
- URL: https://github.com/bitfancy/simple-raydium-cpi
- Owner: BitFancy
- Created: 2025-02-13T16:08:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-13T17:07:12.000Z (about 1 year ago)
- Last Synced: 2025-05-07T13:56:54.178Z (10 months ago)
- Language: Rust
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raydium-cpi-example
Example of CPI call, relying on Raydium's CLMM/CPMM/AMM main contracts
## Environmental requirements
```
solana-cli 1.17.0
anchor-cli 0.29.0
```
If you are using a newer version of the anchor, please refer to examples and development environment requirements from other branches.
## Accounts
Some accounts are convenient for testing purposes.
### CPMM
| network | devnet | mainnet |
| ----------- | -------------------------------------------- | -------------------------------------------- |
| Program | CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C |
| AmmConfig | 9zSzfkYy6awexsHvmggeH36pfVUdDGyCcwmjT3AQPBj6 | D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2 |
| FeeReceiver | G11FKBRaAkHAKuLCgLM6K6NUc9rTjPAznRCjZifrTQe2 | DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8 |
### CLMM
| network | devnet | mainnet |
| --------- | -------------------------------------------- | -------------------------------------------- |
| Program | devi51mZmdwUJGU9hjN27vEz64Gps7uUefqxg27EAtH | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK |
| AmmConfig | CQYbhr6amxUER4p5SC44C63R4qw4NFc9Z4Db9vF4tZwG | 4BLNHtVe942GSs4teSZqGX24xwKNkqU7bGgNn3iUiUpw |
## Devnet Test
If your contract is completed and you want to deploy it on devnet, please pay attention to the `devnet` feature in the [example](https://github.com/raydium-io/raydium-cpi-example/blob/master/cpmm-cpi/programs/cpmm-cpi/Cargo.toml#L17). Use the following command when compiling:
```
anchor build -- --features devnet
```