Pool Interaction
🛠️ Fetching a Bonding Curve Pool
import { Connection, PublicKey } from "@solana/web3.js";
import { initGoFundMemeSDK } from "@gofundmeme/sdk";
const connection = new Connection("https://api.mainnet-beta.solana.com");
(async () => {
const gfmSDK = await initGoFundMemeSDK({ connection });
// Replace with the token mint address
const mintAddress = new PublicKey("THE TOKEN MINT ADDRESS");
// Fetch the Bonding Curve Pool
const bondingCurvePool = await gfmSDK.pools.bondingCurve.fetchBondingCurvePool(
{ mintB: mintAddress }
);
console.log("Bonding Curve Pool Data:", bondingCurvePool);
})();📊 Checking Pool Status
🛒 Buying Tokens on the Bonding Curve
💰 Selling Tokens Back for SOL
🏦 Fetching LP Fees & Harvester Rewards
📌 Example Response:
🌾 Harvesting LP Fees
Last updated