Pool Interaction
The Fair Launch mechanism in the GoFundMeme Protocol enables decentralized, transparent, and community-driven token launches. This system ensures equitable access to presale allocations while dynamically adjusting fundraising based on demand.
With the GoFundMeme SDK, you can seamlessly: β Fetch Fair Launch pool details β Fund or defund a pool β Claim presale allocations β Claim preallocations (marketing, team, etc.) β Harvest LP fees and rewards
Fetching a Fair Launch Pool
To interact with a Fair Launch pool, you must first fetch its data using the mint address of the token being launched.
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 your token mint address
const mintAddress = new PublicKey("THE TOKEN MINT ADDRESS");
// Fetch the Fair Launch Pool
const pool = await gfmSDK.pools.fairLaunch.fetchFairLaunchPool({
mintB: mintAddress,
});
console.log("Fair Launch Pool Data:", pool);
})();π Checking Pool Status
Once you've fetched the Fair Launch pool, you can check its status, expiration, and funding progress.
π° Funding the Pool
Participants can contribute SOL to the Fair Launch pool before it reaches its target.
πΈ Defunding (Withdrawing Contributions)
If the pool is still in the raising phase, participants can withdraw their contributions.
ποΈ Claiming Presale Allocations
After the Fair Launch concludes, contributors can claim their presale tokens.
π― Claiming Preallocation (Marketing, Team, etc.)
Some tokens are reserved for marketing, partnerships, or team allocations. These can be claimed separately.
π Fetching Presaler Rewards Summary
Presale contributors can check their unclaimed LP rewards before claiming.
π Example Response:
π Claiming Presaler LP Rewards
Once rewards are available, contributors can claim them.
π¦ Fetching LP Fees & Harvester Rewards
NOT supported on GFM-SDK-Frontend
Once the Fair Launch concludes, LP fees and harvester rewards can be tracked.
π Example Response:
πΎ Harvesting LP Fees
LP fees collected in the pool can be harvested by authorized crankers.
Last updated