Open the app

Build

Contract reference

Every call and event, in one place.

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.

A few terms

A round is one draw. A batch is every line from one purchase (batchId). A slice is a run of lines inside a batch that one wallet owns.

User calls#

User calls
CallWhoWhat it does
Gigapot.buyRandom(uint32 count, address to, address[] referrers, uint256[] splits, bytes32 source)AnyoneBuy random lines. Returns batchId. Works while the round is still being set up.
Gigapot.buyChosen(bytes numbers, address to, address[] referrers, uint256[] splits, bytes32 source)AnyoneSix bytes per line: five ascending numbers and a bonus. Reverts ConfigurationPending while bonusMax == 0.
Gigapot.deposit(amount) / requestWithdraw(shares) / cancelPending() / withdraw()BackerDeposit, queue an exit, cancel a pending action, collect. Can revert PendingSettlement.
TicketRights.rootSlice(roundId, batchId)AnyoneCreates a batch’s root slice for its original owner. Safe to call twice.
TicketRights.transfer / transferFor / split / splitForHolder or signatureMove or divide a slice, any time after purchase.
TicketRights.redeemVoucher / voucherDigestAnyoneSubmit a holder-signed voucher; the named recipient gets the slice.
TicketRights.claim / claimForHolder or signatureProve a slice and credit its full prize; optionally withdraw.
TicketRights.withdraw / withdrawForHolder or signatureWithdraw prize credit already recorded.
FeeVault.claimReferrals()ReferrerCollect referral commissions from purchases.

Reads#

Read calls
CallWhoWhat it does
currentRound() / settlementRound()ViewThe round on sale, and the round being processed.
rounds(roundId) / pipelineState(roundId)ViewRound settings, phase, result, queue and proof progress.
batchOf(roundId, batchId) / batchDetail(roundId, batchId)ViewBatch data. Chosen numbers also come from ChosenNumbers or calldata.
ticketPrice(roundId)ViewThe price for that round. Number ranges are normalMax and bonusMax.
lpAccount(account) / sharesOf(account) / epoch(roundId) / depositCap()ViewRaw Backer state, share units, epoch accounting and pool room.
GigapotLens.lpValue / lpPosition / liquiditySnapshotViewBacker value, position and available money.
TicketRights.slices / batchSlice; Lens.slice / rootSliceOfViewSlice and root IDs. rootSlice itself is a write.
unverifiedSettlements()ViewTrusted early reports still waiting for proofs.

Operator calls#

Operator and control calls
CallWhoWhat it does
advanceSales()AnyoneOpen the next sales round when due. Its prizes may still be pending.
materializeQueue(roundId, maxBatches)AnyoneAdd recorded batches to the queue hash, a few at a time.
proveQueue(arrayRoot, proof) / proveQueueFor(roundId, arrayRoot, proof)AnyoneProve the full queue after the deadline.
requestNumbers()AnyoneRequest numbers for settlementRound after the deadline. Doesn’t need the queue proof first.
settleRound(winners, duplicates, noReferral, proof) / verifySettlement(roundId, winners, duplicates, noReferral, proof)AnyoneVerify winner counts and settle. noReferral is not a cut from winnings.
reportSettlement(roundId, winners, duplicates, noReferral)Settlement operatorTrusted early report. Proofs are still needed before claims.
settleEmptyRound() / publishClaimTree(roundId, claimRoot, proof)AnyoneSettle a round with no lines, or publish a proven claim root.
forceNumbers(normals, bonus)OwnerFallback only after a randomness request provably died.
setFrozen(true) / setFrozen(false)Owner or guardian / ownerEither can pause; only the owner can unpause. Stops purchases and deposits only.
exportCapital(amount) / returnCapital(amount)Treasury rolesExport: treasurer only. Return: treasurer or treasury.
EarnVault.repay(amount, maxLoss)Operator or ownerReturn money through the Earn Vault and update what it owes.
When Backer calls revert

After launch, deposit and requestWithdraw need the sales and settlement heads to match, no unverifiedSettlements, and a SELLING or CLOSED phase. Otherwise they revert PendingSettlement. cancelPending has the same head checks. A pause doesn’t block withdrawal requests, but doesn’t skip these checks either.

Events#

Events to index
TopicEvents
Buying and setupTicketsBought, ChosenNumbers, RoundOpened, SalesOpened, RoundConfigured
Queue and numbersQueueMaterialized, QueueProved, NumbersRequested, NumbersDrawn
ResultsTierResults, SettlementReported, SettlementVerified, SettlementMismatch, RoundSettled, ClaimTreeRoot
Line ownershipSliceCreated, SliceTransferred, SliceShrunk, SliceClaimed, VoucherRedeemed, NonceBurned
MoneyPrizePaid, CapitalExported, CapitalReturned, Deposited, WithdrawQueued, PendingCancelled, Withdrawn, ReferralAccrued, ReferralPaid

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.