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.
| Instruction | Program | Signer | When |
|---|---|---|---|
create_platform_config | launchlab | Platform key | Once, by the platform setup script, when the PlatformConfig doesn’t exist yet. Built in engines/launchpad/launchlab/platform.ts. |
update_platform_config | launchlab | Platform key | By the platform setup script, for each field that differs from the spec in platform.ts. Built in engines/launchpad/launchlab/platform.ts. |
initialize_v2 | launchlab | Creator wallet and the new mint | Launch. 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_in | launchlab | Trader | A buy on the curve, SOL in. Also the creator’s first buy at launch. Built in chain/trade.ts. |
sell_exact_in | launchlab | Trader | A sell on the curve, flare tokens in. Built in chain/trade.ts. |
claim_platform_fee_from_vault | launchlab | Platform key | The keeper, when the platform fee vault holds enough to claim. Built in worker/keeper.ts. |
transfer | system | Platform key | The keeper, after it claims the platform fee vault: each creator’s share of the platform fee on their flare, in SOL. |
migrate_to_cpswap | launchlab | Raydium’s migration crank | Graduation, 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_input | cpmm | Trader | A buy or sell after graduation. Built in chain/trade.ts. |
collect_creator_fee_permissionless | cpmm | Platform 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_fees | lpLock | Platform key | The 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.