Build on crossr
Solana program
- Anchor 0.31 IDL and types ship in
@crossr/shared(launchpadIdl,CrossrLaunchpad); PDAs viaconfigPda,curvePda(programId, launchId),mintPda,ata. Build aProgramwith the deployment'sprogramIdfromdeployment(501). create_leg(launchId, manifest, legIndex, creatorSig?)from the Solana wallet, withmanifestArgs(manifest). The signature ispersonal_signbymanifest.creatorovercreatorBindingMessage(launchId, pubkey), ornullwhenmanifest.creator == derivedEvmAddress(pubkey). Passtreasuryfrom theConfigaccount; other accounts resolve from the IDL. Set a 400k compute-unit limit.- SPL quotes:
create_leg_spl(launchId, quoteTag, manifest, legIndex, sig?)withquoteTag = solanaQuoteTag(mint), thenbuy_spl/sell_spl/swap_splwith the trader's quote token account; the treasury and creator quote ATAs are created on demand.NEXT_PUBLIC_QUOTESlists the mints for the UI. buy(lamports, minTokensOut, deadline),sell(tokens, minLamportsOut, deadline),swap(amountIn, minOut, isBuy, deadline)after graduation. Passcurve,mint,treasuryand the curve'screatorexplicitly (accountsPartial). Quote with the samequoteBuy/quoteSellovercurveState(curve), plussolanaSnipeTaxBpsandquotePoolSwap.- Events (
LaunchManifest,LegCreated,Trade,Graduated,PoolSwap, …) are Anchor events in the transaction logs; the indexer follows the program's signatures. Token amounts are 9-decimal base units; the API reportstoken_decimalsper leg and stores Solana prices as lamports per whole token with 18 fractional digits.