This article provides detailed instructions on how to find the poolId in Solana Explorer:
Finding Your Pool ID: A Step-by-Step Guide
Since you have created a Centralized Payment Mechanism for Marketplaces (CPMM) liquidity pool with Raydium SDK v2, it is important to identify the pool ID from Solana Explorer. This is crucial for several reasons, including task automation and troubleshooting. In this article, we will guide you through finding your poolId in Solana Explorer.
Qualifications
Before you proceed, make sure that:
- You have installed Raydium SDK v2 on your Solana node.
- You have configured a liquidity pool using the @raydium-io/raydium-sdk-v2 package.
- You have created a new transaction (tx) to interact with the liquidity pool.
Step 1: Create an Event
To find the PoolId, you need to create a transaction that interacts with the liquidity pool. So:
- Open Solana Explorer ([ and navigate to the Create Event tab.
- Select the event type (e.g. “Create Pool”).
- Fill in the required information:
- Pool Name: Enter the name of the pool.
- Pool ID: Note the “poolId” you want to find.
Step 2: Submit the Event
Now you need to submit this event to interact with the liquidity pool. So:
- Open the Event Editor in Solana Explorer ([
- Create a new event by clicking the “Run” button.
- Select the event type (e.g. “Create Pool”).
- Select a liquidity pool address from the list of available addresses.
Step 3: Get the Event ID
Once the transaction is complete, you will receive a printed report. You can retrieve the poolId as follows:
- Check the transaction result for the “id” property.
- The value should match the poolId you noted in step 1.
Example Use Case
Let’s say your pool address is “0x…”. If you entered a poolName in “My Centralized Payment Mechanism”, you can use the following transaction to retrieve the poolId:
const raydium = require('@raydium-io/raydium-sdk-v2');
async function getPoolId() {
const { pool, tx } = await raydium.createPool({
name: My centralized payment mechanism,
poolId: "0x...", // Note "poolId"
});
return tx.id;
}
getPoolId().then((poolId) => console.log(poolId));
Tips and Variations
- You can also use the “Transaction History” tab in Solana Explorer to view all transactions related to your liquidity pool. This can help you identify which event interacts with your pool.
- If you are using a custom script or node, remember to retrieve the poolId from the event output and pass it as an argument to the script.
By following these instructions, you should be able to find the poolId in Solana Explorer. Happy questioning!