ConstraintSeeds Error (0x7d6) for creator_vault with sdk.createAndBuy()
Hello, I'm encountering an error during transaction simulation when calling the sdk.createAndBuy function, related to a ConstraintSeeds violation for the creator_vault account (error code 0x7d6).
Problem Description
When attempting to create a new token and immediately buy a portion of it using the sdk.createAndBuy function, the transaction simulation fails. The error logs indicate a ConstraintSeeds violation for the creator_vault account (AnchorError, Error Number 2006, custom program error 0x7d6).
Steps to Reproduce
- Initialize
PumpFunSDKin a standard manner. - Prepare a new
mintKeypairfor the token, apayerKeypair, and the token metadata. - Call the
sdk.createAndBuy(payerKeypair, mintKeypair, tokenMetadata, ...)function with standard arguments.
Actual Outcome
The transaction simulation fails with error logs similar to the following:
Message: Transaction simulation failed: Error processing Instruction 4: custom program error: 0x7d6.
Logs:
[
...
"Program log: AnchorError caused by account: creator_vault. Error Code: ConstraintSeeds. Error Number: 2006. Error Message: A seeds constraint was violated.",
...
"Program ... failed: custom program error: 0x7d6"
]
Same here, really really waiting for IDL and to find out what else is missing -_-
I hope this helps you.
const [coinCreatorVaultAuthority] = PublicKey.findProgramAddressSync(
[
Buffer.from("creator_vault"), // seed from IDL
new PublicKey(user).toBuffer(), // coin_creator from pool
],
PUMP_AMM_PROGRAM
);
const coinCreatorVaultAta = spl.getAssociatedTokenAddressSync(
WSOL, // WSOL mint
coinCreatorVaultAuthority, // owner (the PDA we just derived)
true // allow owner off curve
);
I hope this helps you.
const [coinCreatorVaultAuthority] = PublicKey.findProgramAddressSync( [ Buffer.from("creator_vault"), // seed from IDL new PublicKey(user).toBuffer(), // coin_creator from pool ], PUMP_AMM_PROGRAM ); const coinCreatorVaultAta = spl.getAssociatedTokenAddressSync( WSOL, // WSOL mint coinCreatorVaultAuthority, // owner (the PDA we just derived) true // allow owner off curve );
could u share please more in details? and could u share proper IDL please as well?
Sorry for my delay. You can check this repo built customized transaction. https://github.com/plzbugmenot/Solana_Wallet_Manager_Script
any updates?
Any update