Factory
LaunchCreated is your discovery stream — but it carries no economics. Fetch the launch’s config() once per launch to price its curve. metadataURI is write-once: there is no setter and no update event, so index it from this log and never re-fetch. Pool creation at graduation logs on the DEX factory, not here.
Launch (one stream per clone)
- The launch is
log.address. There is no token or launch field — one contract, one token, one stream. traderis asymmetric by design: on a buy it is the recipient (who ends up holding); on a sell it is the seller (whose balance moved). The event follows whose balance in the launched token changed.quoteAmountis the reserve delta, whichever entry was used. A buyer paidquoteAmount + fee(minus any completion refund); a seller receivedquoteAmount − fee.soldis not monotonic — sells decrease it. It is curve state, not cumulative volume.CurveCompletedfires on the buy that fills the curve; between it andGraduated, trading reverts (the frozen window).
LaunchToken
Graduated, different topic0 (different parameter lists) — a holder’s tooling can watch the token alone.
Locker
Indexer rules of thumb
- Never infer state from balances. A launch accepts stray native transfers and counts none of them (
receive()is unguarded for a gas-budget reason);reserve()andprotocolFees()are the truth. sweepFees()emits nothing — trackprotocolFeesdeltas if you need it.- One
eth_callper launch (config()) turns the log stream into a priceable curve; everything after that is pure math. - Handle launch types: the same
LaunchCreatedstream will carry future implementations. Treat a launch’s ABI as a function of itslaunchType.