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
| Contract | What it is for |
|---|---|
GazuaFactory | Launching. Deploys the token, registers the curve and the split, and runs the creator’s opening buy, in one call. |
TokenDeployer | CREATE2 deployment of the token, so its address is known before it exists. |
GazuaToken | One per launch. Fixed-supply ERC-20 with permit, no owner, no mint. |
CurvePortal | Singleton holding every launch’s curve. Quotes, buys, sells, fee collection, graduation. |
Graduator | Opens the v4 pool and holds the permanently locked position. |
GazuaHook | Collects the launch’s fee inside pool swaps, on both sides. |
PoolRouter | Post-graduation swaps, with the permit inside the trade. |
FeeRouter | Accrual, dispatch and claimable balances. |
RecipientRegistry | The split, the fee admin, and the takeover timelock. |
DividendHub | Per-share accounting and holder withdrawals. |
SocialEscrow | Handle-derived vaults, and the claim that assigns one an owner. |
Batcher | Several 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
previewBuyandpreviewSellrun 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…WithPermitvariants that fold the approval into the trade and…WithReferralvariants that name a referrer.- Every entry point takes a minimum output and reverts if it cannot be met.
getCurvereturns the whole immutable record plus live reserves.graduationProgressBpsandspotPriceare conveniences over it.currentBuyFeeBpsandsnipeEndsAtanswer “what would this cost me right now” without simulating a trade.
Events worth indexing
| Event | From |
|---|---|
TokenLaunched | Factory. Carries the metadata location, rates and pairing asset. |
CurveRegistered | Portal. The curve shape, for reconstructing prices yourself. |
Bought / Sold | Portal. Amounts, fees, and any refund at the boundary. |
Burned | Portal and hook. Both the supply destroyed and what it was worth, because they answer different questions. |
CurveGraduated / Graduated | Portal, then graduator with the pool it opened. |
Accrued / Dispatched / Credited / Claimed | Fee router. The three stages, plus withdrawals. |
RecipientsSet / AdminTransferred / TakeoverProposed | Registry. Splits and the seat. |
Deposited / ShareChanged / Withdrawn | Dividend 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,claimManyfor yourself;claimFor,claimForMany,claimForAllto pay somebody else’s gas without taking anything.claimSponsoredtakes 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
| Error | What happened |
|---|---|
SlippageExceeded | The trade could not deliver the minimum output. Nothing filled. |
Graduated | The curve is closed. Trade the pool instead. |
ZeroAmount | Nothing to trade — including a curve so close to graduating that no buy still fits. |
CreatorBuyGraduatesLaunch | An opening buy large enough to graduate the launch on its own. |
EconomicsChanged | The protocol’s terms moved between your quote and your launch. Re-read and retry. |
FeesPendingSplit | A split cannot be replaced while fees are waiting to be dispatched. |
BpsMustTotal10000 | A split that does not add up to 100%. |
NotYetEffective / ProposalExpired | A 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.
