Skip to main content

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)

Semantics that are easy to get wrong:
  • The launch is log.address. There is no token or launch field — one contract, one token, one stream.
  • trader is 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.
  • quoteAmount is the reserve delta, whichever entry was used. A buyer paid quoteAmount + fee (minus any completion refund); a seller received quoteAmount − fee.
  • sold is not monotonic — sells decrease it. It is curve state, not cumulative volume.
  • CurveCompleted fires on the buy that fills the curve; between it and Graduated, trading reverts (the frozen window).

LaunchToken

Same name as the launch’s Graduated, different topic0 (different parameter lists) — a holder’s tooling can watch the token alone.

Locker

Indexer rules of thumb

  1. 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() and protocolFees() are the truth.
  2. sweepFees() emits nothing — track protocolFees deltas if you need it.
  3. One eth_call per launch (config()) turns the log stream into a priceable curve; everything after that is pure math.
  4. Handle launch types: the same LaunchCreated stream will carry future implementations. Treat a launch’s ABI as a function of its launchType.