Chapter 08
Contracts
Addresses, functions, events and errors for LaunchFactory, PersonHook, PersonEscrow and Router.
LaunchFactory
launch(LaunchParams) - payable; creates the coin and pool, with an optional dev buy in the same transaction.
struct LaunchParams {
string name;
string symbol;
address quote; // address(0) = native ETH, else a registered stock token
bytes32 salt;
uint8 platform; // 0 X · 1 YouTube · 2 TikTok · 3 Instagram · 4 Snapchat · 5 Twitch · 6 Kick · 7 Farcaster
string handle; // canonical lowercase handle
uint256 devBuyQuote; // 0 = no dev buy
uint256 devBuyMinOut;
}
Emits Launched(id, token, personKey, quote, launcher, platform, handle, sqrtPriceX96, openingTick, liquidity). The factory computes personKey = keccak256(platform, handle) itself and rejects non-canonical handles (a-z 0-9 _ . - :, 1–64 bytes).
PersonHook
pools(id)→(token, quote, launcher, personKey, quoteIsCurrency0, seeded, launchedAt, haltMaxStaleness)personFees(id)→ claimable person fees for the poolpreviewBuyFees(quoteIn)→(protocolFee, personFee, total)- Emits
HookSwap(id, trader, recipient, isBuy, quoteAmount, tokenAmount, feeQuote)on every swap. - Errors:
PoolNotLive,LaunchLocked,ExactOutputNotSupported,QuoteHalted,NothingToClaim.
PersonEscrow
persons(personKey)→(wallet, platformUserId, boundAt)bindNonce(personKey)attest(Attestation a, bytes sig)- caller must bea.wallet; binds or rebinds (same platform user only).claim(bytes32[] ids, address to)- caller must be the bound wallet of every pool; pays each in its quote.cycleStart(id),sweepDue(id),sweep(PoolKey key)- the 90-day cycle.- Events:
PersonBound,Claimed,Swept. Errors:NotWallet,Expired,BadNonce,BadSignature,IdentityMismatch,NotBound,PersonIsBound,NotDue.
Router
buy(key, quoteIn, minOut, recipient, deadline)- payable for ETH quotes; approve the router for stock quotes.sell(key, tokensIn, minOut, recipient, deadline)- approve the router for the coin first.- Exact-input only. Errors:
TooLittleReceived,Expired,ValueMismatch.
QuoteRegistry and LPLocker
QuoteRegistry.priceUsd8(quote) and quoteHalted(quote, maxStaleness) back the opening price and HaltGuard. LPLocker owns every pool's single-sided position and has no withdraw path.