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

Getting error when creating a pool on Raydium #100

Open
abhi3700 opened this issue Nov 17, 2024 · 2 comments
Open

Getting error when creating a pool on Raydium #100

abhi3700 opened this issue Nov 17, 2024 · 2 comments

Comments

@abhi3700
Copy link

I have tried interacting with RaydiumCLMM v3 on Solana.

The error is quite unexpected when I create a pool with a pair of custom tokens.

Error: Error processing Instruction 0: custom program error: 0x0

Caused by:
    Error processing Instruction 0: custom program error: 0x0

It seems my PDA might be initialized or something. I tried to log the possible PDAs created in the process:

mint0:Dj3X6GtmRMUuWaokGpX9qeNedFRZuHfsbKsmxNd5uPiw, mint1:Dj3X6GtmRMUuWaokGpX9qeNedFRZuHfsbKsmxNd5uPiw, price:1.5
tick:4054, price:1.5, sqrt_price_x64:22592555198148960256, amm_config_key:AXBWHam6uWKxjYYu2HBXYPAzjsvmkudouA1UCzGP3koJ
[src/instructions.rs:36:5] &payer.pubkey() = CGdKiDkufmnjMhQDtbBKbCLc7jgT9jTXe5pdnywcNeXd
[src/instructions.rs:50:5] &pool_account_key = 4Ufp6WCYosfKW29rSKTpxv8uhio9bNSua3wbdPNuhEbH
[src/instructions.rs:59:5] &token_vault_0 = 37VA3bQTbxjQawkagk66XfJUTdjoKHXnKx6ZJWevdDHp
[src/instructions.rs:68:5] &token_vault_1 = 37VA3bQTbxjQawkagk66XfJUTdjoKHXnKx6ZJWevdDHp
[src/instructions.rs:76:5] &observation_key = 5F7rAxpAzk7Y69f8bKMkKMqwmmnyXUAeocyzvzsCtL2B

Here is my github repo: https://github.com/abhi3700/raydium-solana.
You can follow the client code here: https://github.com/abhi3700/raydium-solana/blob/be5bd1b6ea0910e2b83c63c014e8d223fc085a77/client/src/main.rs

I am not sure what am I missing.
Can anyone help me please?

@raydium-io raydium-io deleted a comment from SmithDEVV Nov 19, 2024
@RainRaydium
Copy link
Collaborator

Hi, do you have any txs?
And why do you use the same mint(Dj3X6GtmRMUuWaokGpX9qeNedFRZuHfsbKsmxNd5uPiw) to create pool?

@raydium-io raydium-io deleted a comment from abhi3700 Nov 19, 2024
@abhi3700
Copy link
Author

abhi3700 commented Nov 19, 2024

Hi, do you have any txs? And why do you use the same mint(Dj3X6GtmRMUuWaokGpX9qeNedFRZuHfsbKsmxNd5uPiw) to create pool?

Hi!

Fixed a small bug. Sorry, my bad!
This is the actual error:

mint0:2FGEMK1D324CHEdLyZTzZ3k8croXEqLHQAnvonuTMifH, mint1:8jHJmZhCcc6Vp5Hdb9kh6hPyDjyQow5iNSNuv7BbjB6T, price:1.5
tick:4054, price:1.5, sqrt_price_x64:22592555198148960256, amm_config_key:B9H7TR8PSjJT7nuW2tuPkFC63z7drtMZ4LoCtD7PrCN1
[src/instructions.rs:36:5] &payer.pubkey() = CGdKiDkufmnjMhQDtbBKbCLc7jgT9jTXe5pdnywcNeXd
[src/instructions.rs:50:5] &pool_account_key = 58RXesTm4Vx7SzPqMyYVcnNHxaLBq36x8ywtSxzYytWm
[src/instructions.rs:59:5] &token_vault_0 = A5PFuPmCMy1n4pS2nBY5rBmia6L6u3dtV3wShHD2SJJY
[src/instructions.rs:68:5] &token_vault_1 = HoU4Pbu9rVziYgZP9vxWCwpJCEkATnVi7BUgxoppX3w4
[src/instructions.rs:76:5] &observation_key = 22kXcJcU14qKmihPLsKaCTDmT7PdJRjsKuRQpRHzzbFn
Error: Error processing Instruction 0: custom program error: 0x7d6

Caused by:
    Error processing Instruction 0: custom program error: 0x7d6

Here is the error details: https://explorer.solana.com/tx/4DgymQUjesdvw3ZwABKLbAUG495VmJ2imwNiPp5sM3ifv7tKJZCMDMaPz9Z92DLpi3Ca1QmkJrBTFNAAM5LXkzLx?cluster=devnet

> Program logged: "Instruction: CreatePool"
> Program invoked: System Program
  > Program returned success
> Program invoked: System Program
  > Program returned success
> Program invoked: Token Program
  > Program logged: "Instruction: InitializeAccount3"
  > Program consumed: 4214 of 180401 compute units
  > Program returned success
> Program invoked: System Program
  > Program returned success
> Program invoked: Token Program
  > Program logged: "Instruction: InitializeAccount3"
  > Program consumed: 4214 of 160459 compute units
  > Program returned success
> Program invoked: System Program
  > Program returned success
> Program logged: "AnchorError caused by account: tick_array_bitmap. Error Code: ConstraintSeeds. Error Number: 2006. Error Message: A seeds constraint was violated."
> Program logged: "Left:"
> Program logged: "B1a3jMFVGtScTkzTevKLdSKEqmZ5EkxgfHiZDvKNJByu"
> Program logged: "Right:"
> Program logged: "AuK3GoVv1CMtQr68r6HxEM1YbZxeBXsiFdLwLjRne61o"
> Program consumed: 57838 of 200000 compute units
> Program returned error: "custom program error: 0x7d6"

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

No branches or pull requests

2 participants