Open the app

Build

Integration guide

Read the round, buy lines, track them, and turn on claims.

Check your version

The contracts still use the working name Gigapot (for example Gigapot and GigapotLens). This reference follows contract code e1056f7. The test network runs older code from 19 September (8a20efb). The launch contracts add fee bands, a Backer allowlist, prize minimums and the 25% jackpot; their calls will be listed here once the audited ABI is final. Use the ABI that matches the contracts you call.

1. Read the round#

TypeScript
const roundId = await read("currentRound");
const processingId = await read("settlementRound");
const [round, pipeline, price] = await Promise.all([
  read("rounds", [roundId]),
  read("pipelineState", [processingId]),
  read("ticketPrice", [roundId]),
]);
// read() must decode the ABI result, including named fields.
const configurationPending = Number(round.bonusMax) === 0;

When bonusMax is 0

Show “Prizes are being set” (configuration pending). Offer Quick Pick only, and turn off chosen numbers.

GigapotLens gives summaries: lpValue, lpPosition and liquiditySnapshot. For raw Backer state, use lpAccount, sharesOf, epoch and depositCap.

2. Buy lines#

TypeScript
// Approve the exact spend, then buy.
await writeAsset("approve", [GIGAPOT, price * BigInt(count)]);
await writeGigapot("buyRandom", [count, recipient, referrers, splits, source]);

// Chosen lines: five ascending numbers + one bonus byte each.
// Only after bonusMax is set:
await writeGigapot("buyChosen", [numbers, recipient, referrers, splits, source]);

Trust the receipt

A sale can roll into the next round if the deadline passes. Check the round and batch in every mined receipt. RelayGateway can pin the round with expectedRound.

3. Track what happens#

Index TicketsBought, ChosenNumbers, SalesOpened, RoundConfigured, the queue and proof events, and TicketRights slice events.

  1. Purchased. A batch and its root slice exist.
  2. Verified. Proofs have checked the result.
  3. Claimable. A ClaimTreeRoot is published and slice proofs work.

Settled isn’t claimable yet

A trusted reportSettlement can move accounting forward before proofs are checked. Wait for verified settlement and a claim root.

4. Turn on claims#

Enable the claim button only after SettlementVerified and ClaimTreeRoot for that round. Then call TicketRights.claim(items, to, withdrawAmount) for the slices the user holds.

Each claim credits the full prize. Show what was paid and what is still owed if pool money is outside.

Updated 27 Sep 2026. Pages about money show the launch settings agreed on 24 Sep. The test network runs older code from 19 Sep. Nothing here is live with real money.