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