1

I currently deployed a liquidity pool to Raydium. https://explorer.solana.com/tx/3VbKy14uCGGBNGzCgZTSZwVvNGinVr8PWz1Xhj6PZdL5bAp1yQmSTQVVXaWGjtf7pnruKSKN2WdDPyo8CVksr4VP When I created the liquidity pool I received

Liquidity Pool Created: ADbJ4uWMMpMSwdUGvn8EdTN6RSXJoiDwb7P3s1MusYj7
Base Token (LORO) Amount: 50000000000000000 (Decimals: 9)
Quote Token (WSOL) Amount: 1000000000 (Decimals: 9)
Transaction IDs: 3VbKy14uCGGBNGzCgZTSZwVvNGinVr8PWz1Xhj6PZdL5bAp1yQmSTQVVXaWGjtf7pnruKSKN2WdDPyo8CVksr4VP
success
txids [
  '3VbKy14uCGGBNGzCgZTSZwVvNGinVr8PWz1Xhj6PZdL5bAp1yQmSTQVVXaWGjtf7pnruKSKN2WdDPyo8CVksr4VP'
]

However, I'm unable to purchase the token as shown in the multiple attempts in for example here https://explorer.solana.com/tx/4Nc2fXvy21ZXb5GweTi5KN25mk35Ai7kQjMtt5NTYYWviKrrCEh3nfzmLyt8fuoyBpRaq7wsLKYaCWDJY2vBmMX5#ix-7 as shown in this transaction I'm getting the following error

> Program logged: "Error: InvalidStatus"
> Program consumed: 12734 of 1364002 compute units
> Program returned error: "custom program error: 0x16"

this is the script I used:

import {
  MarketV2,
  Token,
} from '@raydium-io/raydium-sdk';
import { PublicKey, Keypair } from '@solana/web3.js';

import {
  TOKEN_PROGRAM_ID,
} from '@raydium-io/raydium-sdk';

import {
  connection,
  DEFAULT_TOKEN,
  makeTxVersion,
  RAYDIUM_PROGRAM_ID,
  wallet,
} from '../config';
import { buildAndSendTx } from './util';

type TestTxInputInfo = {
  baseToken: Token
  quoteToken: Token
  wallet: Keypair
}

export async function createMarket(input: TestTxInputInfo) {
  // -------- step 1: make instructions --------
  console.log("Creating market...");

  const createMarketInstruments = await MarketV2.makeCreateMarketInstructionSimple({
    connection,
    wallet: input.wallet.publicKey,
    baseInfo: input.baseToken,
    quoteInfo: input.quoteToken,
    lotSize: 1, // default 1
    tickSize: 0.01, // default 0.01
    dexProgramId: RAYDIUM_PROGRAM_ID.OPENBOOK_MARKET,
    makeTxVersion,
  })
  console.log('MARKET ID');
  console.log(createMarketInstruments.address.marketId.toString())
  return { txids: await buildAndSendTx(createMarketInstruments.innerTransactions, { skipPreflight: true }) };

}

async function airdropSol() {
  console.log(`Requesting Airdrop...`);
  const airdropSignature = await connection.requestAirdrop(wallet.publicKey, 5000000000);
  try {
    const txId = await connection.confirmTransaction(airdropSignature);
    console.log(`Airdrop Transaction Id: ${airdropSignature}`);
    console.log(`https://explorer.solana.com/tx/${airdropSignature}?cluster=devnet`);
  } catch (err) {
    console.log(err);
  }
}

async function howToUse() {
  console.log("Running howToUse...");

  const loroMintAddress = new PublicKey("5Epi18QgbkAgFksv4Rj8g5e41NyAmokZE87TKT46EWXx");
  const baseToken = new Token(TOKEN_PROGRAM_ID, loroMintAddress, 9, 'LORO', 'HighOnLoro'); // Update decimals if needed
  const quoteToken = DEFAULT_TOKEN.WSOL; // Using Wrapped SOL as the quote token

  createMarket({
    baseToken,
    quoteToken,
    wallet: wallet, // This should be your wallet Keypair from config.ts
  }).then(({ txids }) => {
    console.log('Transaction IDs:', txids);
  }).catch(console.error);
}

howToUse().then(() => console.log('Completed')).catch(console.error);

ANy idea of what it might be? https://birdeye.so/token/5Epi18QgbkAgFksv4Rj8g5e41NyAmokZE87TKT46EWXx?chain=solana

2 Answers 2

2

the reason you're encountering this error is because the LP you've created has an opening time set for 2024/3/28 at 16:22:26 UTC.

Have a nice day.

2

The error indicates that your pool isn't live yet. Looking at the pool creation tx, it seems that you've set the open time to 1711642946 which is in about 6 days.

2
  • thanks a ton, where do you see that timestamp? Commented Mar 22 at 2:26
  • I see open_time: 1711642946 Commented Mar 22 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.