Flare
App

Reference

Instructions

Every instruction Flare sends or follows.

Every instruction a Flare transaction carries, or that Flare's indexer follows, with who signs it and where the backend builds it. Arguments and account lists are LaunchLab's own, in its IDL.

InstructionProgramSignerWhen
create_platform_configlaunchlabPlatform keyOnce, by the platform setup script, when the PlatformConfig doesn’t exist yet. Built in engines/launchpad/launchlab/platform.ts.
update_platform_configlaunchlabPlatform keyBy the platform setup script, for each field that differs from the spec in platform.ts. Built in engines/launchpad/launchlab/platform.ts.
initialize_v2launchlabCreator wallet and the new mintLaunch. The creator’s first buy follows in the same transaction; the server co-signs with the mint key after the wallet signs. Built in chain/launch.ts.
buy_exact_inlaunchlabTraderA buy on the curve, SOL in. Also the creator’s first buy at launch. Built in chain/trade.ts.
sell_exact_inlaunchlabTraderA sell on the curve, flare tokens in. Built in chain/trade.ts.
claim_platform_fee_from_vaultlaunchlabPlatform keyThe keeper, when the platform fee vault holds enough to claim. Built in worker/keeper.ts.
transfersystemPlatform keyThe keeper, after it claims the platform fee vault: each creator’s share of the platform fee on their flare, in SOL.
migrate_to_cpswaplaunchlabRaydium’s migration crankGraduation, after the buy that sells the curve out. Flare never sends it; the indexer reads the new pool and Fee Key from it.
swap_base_inputcpmmTraderA buy or sell after graduation. Built in chain/trade.ts.
collect_creator_fee_permissionlesscpmmPlatform key (pays)The keeper, when a graduated pool has accrued creator fees. The platform key is each pool’s creator, so they land with it. Built in worker/keeper.ts.
collect_cp_feeslpLockPlatform keyThe keeper, harvesting the fee LP a graduated pool’s Fee Key has earned. Built in worker/keeper.ts.

Around the instructions

The transactions the API builds also carry what each instruction needs around it:

  • a compute budget;
  • the trader's token accounts, created if missing;
  • on a curve or pool buy, the SOL wrapped into a WSOL account first, and that account closed after, so the trader ends holding SOL.

The launch transaction is initialize_v2 followed by the creator's first buy, signed by the creator and the new mint. Every transaction compiles over Raydium's lookup table and the platform's own.

What Flare doesn't send

Flare never sends migrate_to_cpswap: only the wallet named in Raydium's GlobalConfig can, and Raydium's crank does it after a curve sells out. Nothing is sent at expiry; see Expiry.