gazua

Integrating

Everything a wallet, bot or terminal needs to trade and index gazua launches without us.

Nothing about a launch depends on our website. The contracts are the product; this page is what you need to talk to them directly. Their addresses are on Addresses, read from this deployment rather than written down.

The contracts

ContractWhat it is for
GazuaFactoryLaunching. Deploys the token, registers the curve and the split, and runs the creator’s opening buy, in one call.
TokenDeployerCREATE2 deployment of the token, so its address is known before it exists.
GazuaTokenOne per launch. Fixed-supply ERC-20 with permit, no owner, no mint.
CurvePortalSingleton holding every launch’s curve. Quotes, buys, sells, fee collection, graduation.
GraduatorOpens the v4 pool and holds the permanently locked position.
GazuaHookCollects the launch’s fee inside pool swaps, on both sides.
PoolRouterPost-graduation swaps, with the permit inside the trade.
FeeRouterAccrual, dispatch and claimable balances.
RecipientRegistryThe split, the fee admin, and the takeover timelock.
DividendHubPer-share accounting and holder withdrawals.
SocialEscrowHandle-derived vaults, and the claim that assigns one an owner.
BatcherSeveral calls in one transaction, for bots.

Addresses are per deployment and are published with it. Write to support@gazua.xyz for the current set, or read them from the interface’s own configuration.

Quoting and trading the curve

  • previewBuy and previewSell run the same arithmetic the trade does, including the fee that applies at this instant — so during the opening seconds a preview already reflects the sniper tax.
  • buy / sell, with …WithPermit variants that fold the approval into the trade and …WithReferral variants that name a referrer.
  • Every entry point takes a minimum output and reverts if it cannot be met.
  • getCurve returns the whole immutable record plus live reserves. graduationProgressBps and spotPrice are conveniences over it.
  • currentBuyFeeBps and snipeEndsAt answer “what would this cost me right now” without simulating a trade.

Events worth indexing

EventFrom
TokenLaunchedFactory. Carries the metadata location, rates and pairing asset.
CurveRegisteredPortal. The curve shape, for reconstructing prices yourself.
Bought / SoldPortal. Amounts, fees, and any refund at the boundary.
BurnedPortal and hook. Both the supply destroyed and what it was worth, because they answer different questions.
CurveGraduated / GraduatedPortal, then graduator with the pool it opened.
Accrued / Dispatched / Credited / ClaimedFee router. The three stages, plus withdrawals.
RecipientsSet / AdminTransferred / TakeoverProposedRegistry. Splits and the seat.
Deposited / ShareChanged / WithdrawnDividend hub.

Two corrections an indexer has to make

A pool’s own Swap event understates the trade. The hook takes its fee from the input before the swap and from the output after it, so the pool records less going in and more coming out than the trader actually experienced. To reconstruct the trade: add the fee back on the input side, subtract it on the output side. A 0.05 unit buy was recorded as 0.0495.

v4’s Swap amounts are from the swapper’s point of view, so a positive token amount is a buy. The NatSpec describes them as pool deltas; the measured behaviour on a live chain is the opposite, and this is worth verifying against your own node rather than taking from either of us.

Claiming programmatically

  • dispatch(token, asset) is permissionless. Call it when a launch’s undivided fees are worth the gas.
  • claim, claimMany for yourself; claimFor, claimForMany, claimForAll to pay somebody else’s gas without taking anything.
  • claimSponsored takes an EIP-712 authorisation and a fee, and is restricted to registered payers. The domain and the nonce are per contract — the fee router and the dividend hub never settle each other’s balances.
  • claimable(account, token, asset) is the balance. Note the key: per account, per launch, per asset.

Common reverts

ErrorWhat happened
SlippageExceededThe trade could not deliver the minimum output. Nothing filled.
GraduatedThe curve is closed. Trade the pool instead.
ZeroAmountNothing to trade — including a curve so close to graduating that no buy still fits.
CreatorBuyGraduatesLaunchAn opening buy large enough to graduate the launch on its own.
EconomicsChangedThe protocol’s terms moved between your quote and your launch. Re-read and retry.
FeesPendingSplitA split cannot be replaced while fees are waiting to be dispatched.
BpsMustTotal10000A split that does not add up to 100%.
NotYetEffective / ProposalExpiredA takeover executed too early, or after its window closed.

Public API

Our indexer serves the same reads the interface uses — launches, trades, holders, earnings, candles and rates — over plain HTTP with no key. It is rate limited by what a route costs us to serve, and it is a convenience rather than a source of truth: everything in it is derived from the chain and can be rebuilt from it.