Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7961

Error "InvalidMarket" during transaction confirmation in Solana program

$
0
0

I'm encountering an error while confirming a transaction in my Solana program. The error message is "InvalidMarket", and the transaction fails with the custom program error 0xb. Below is the detailed log and relevant parts of my code:

Error Log:

> Program logged: "pc_lot_size:0, coin_lot_size:0"> Program logged: "Error: InvalidMarket"> Program consumed: 160491 of 200000 compute units> Program returned error: "custom program error: 0xb"

Relevant Code:

const initializeLpTransactions = await Liquidity.makeCreatePoolV4InstructionV2Simple({    connection,    programId: lp.LIQUIDITY_POOL_MODULE_PROGRAMS.AmmV4,    marketInfo: {        marketId: market,        programId: lp.LIQUIDITY_POOL_MODULE_PROGRAMS.OPENBOOK_MARKET,    },    baseMintInfo: baseToken,    quoteMintInfo: quoteToken,    baseAmount: addBaseAmount,    quoteAmount: addQuoteAmount,    startTime: new BN(Math.floor(startTime.getTime())),    ownerInfo: {        feePayer: pubKey,        wallet: pubKey,        tokenAccounts: walletTokenAccounts,        useSOLBalance: true,    },    associatedOnly: false,    checkCreateATAOwner: true,    makeTxVersion: TxVersion.V0,    feeDestinationId: lp.FEE_DESTINATION_ID,});const lpTransaction = initializeLpTransactions.innerTransactions;const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash("finalized");const LUT = (await connection.getAddressLookupTable(lp.DEFAULT_LUT)).value!;const createLiquidityPoolTx = lp.constructVersionedTx(  pubKey,  [    ...lpTransaction[0].instructions  ],  blockhash,  lastValidBlockHeight,  LUT);

Additional Information:

  • The error occurs specifically during the transaction confirmation phase.
  • The error 0xb indicates an InvalidMarket error in the custom program logic.
  • The accounts in explorer solana when I look for them, none of them have sol transferred, nor does it appear in the MintTo instructions, I think the accounts are not being initialised, but I don't see where the problem lies.

Any help or pointers on what might be causing this issue would be greatly appreciated.


Viewing all articles
Browse latest Browse all 7961

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>