Skip to main content
2 of 3
added 28 characters in body
Jimii
  • 7.7k
  • 1
  • 8
  • 22

bondingCurve Error Number: 2006. Error Message: A seeds constraint was violated

I tried replacing "REDACTED" with the code below. I'm not sure if it's a good fix, but the code fails to create a new launch. Could you please provide some assistance? git code : https://github.com/bilix-software/pump-fun-token-launcher/blob/77bbc0fe2ae05896a23809f58cb43e112e9bdb4c/src/launch.ts#L60

    //const bondingCurve = new PublicKey("REDACTED")
    const TRADE_PROGRAM_ID = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
    const BONDING_ADDR = new Uint8Array([98, 111, 110, 100, 105, 110, 103, 45, 99, 117, 114, 118, 101]);
    const [bondingCurve] = PublicKey.findProgramAddressSync([BONDING_ADDR, mint.publicKey.toBuffer()], TRADE_PROGRAM_ID);
    //const associatedBondingCurve = new PublicKey("REDACTED")
    const [associatedBondingCurve] = PublicKey.findProgramAddressSync([bondingCurve.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.publicKey.toBuffer()], ASSOCIATED_TOKEN_PROGRAM_ID);

    //const metadata = new PublicKey("REDACTED")
    const META_ADDR = new Uint8Array([109, 101, 116, 97, 100, 97, 116, 97]);
    const METAPLEX_TOKEN_META = new PublicKey('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s');
    const [metadata] = PublicKey.findProgramAddressSync([META_ADDR, METAPLEX_TOKEN_META.toBuffer(), mint.publicKey.toBuffer()], METAPLEX_TOKEN_META);

================================================== Below is the error :

SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x7d6
    at Connection.sendEncodedTransaction (E:\dev\nodejs\dessertcorenode\node_modules\@solana\web3.js\lib\index.cjs.js:8052:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Connection.sendRawTransaction (E:\dev\nodejs\dessertcorenode\node_modules\@solana\web3.js\lib\index.cjs.js:8017:20)
    at async Connection.sendTransaction (E:\dev\nodejs\dessertcorenode\node_modules\@solana\web3.js\lib\index.cjs.js:8008:12)
    at async sendAndConfirmTransaction (E:\dev\nodejs\dessertcorenode\node_modules\@solana\web3.js\lib\index.cjs.js:2180:21) {
  logs: [
    'Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]',
    'Program log: Instruction: Create',
    'Program 11111111111111111111111111111111 invoke [2]',
    'Program 11111111111111111111111111111111 success',
    'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]',
    'Program log: Instruction: InitializeMint2',
    'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2780 of 188555 compute units',
    'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success',
    'Program log: AnchorError caused by account: bonding_curve. Error Code: ConstraintSeeds. Error Number: 2006. Error Message: A seeds constraint was violated.',
    'Program log: Left:',
    'Program log: 7Mu152gzqNCP4JuttXmsoN4J1EvsBsAWpKmHePUwRRgQ',
    'Program log: Right:',
    'Program log: 2w1JdkzwNnMug6aPV7UqhFQJ8mPxvX3fqbXqT9EihrjL',
    'Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 21828 of 200000 compute units',
    'Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P failed: custom program error: 0x7d6'
  ]
}
SAM
  • 31
  • 3