Build
Owning and moving lines
Lines can be moved, split, gifted and claimed by whoever owns them.
Batches#
One purchase makes one batch: a single record that holds many lines. Ownership is tracked in slices. A slice is a run of lines inside a batch.
For developers
Apps may say “order”; the ABI says batchId. Random batches store a seed and a count. Chosen batches commit to the packed numbers and emit ChosenNumbers. Later, materializeQueue hashes the batches in small steps.
Moving lines#
You can move, split or gift lines right after you buy them. You don’t have to wait for the draw.
| Who | Call | What happens |
|---|---|---|
| Anyone | rootSlice(roundId, batchId) | Creates the batch’s first slice for its original owner. Nobody else can take it. |
| Holder | transfer / split | Send a whole slice, or cut it into smaller ones. |
| Recipient | redeemVoucher | Receive a gifted slice from a signed voucher. |
| Holder, after results | claim / claimFor | Prove the slice once and credit its full prize. |
Signed actions#
Someone else can act for you with your signature, such as a relayer paying gas, or a friend redeeming a gift. Each signature names one exact slice and its version.
struct SliceRef {
uint256 roundId;
uint256 batchId;
uint256 sliceId;
uint32 offset;
uint32 count;
uint24 version;
}The signature also covers the holder, a nonce and a deadline. When a slice changes, its version changes, so an old signature can’t be replayed, even if the slice returns to the same wallet.
- Direct
transfer / split / claim- Signed
transferFor / splitFor / claimFor- Voucher
redeemVoucher / voucherDigest- Credit
withdraw / withdrawFor
Claims#
Each claim item carries a SliceRef, twelve tier counts and a TierTree.RangeProof. TicketRights checks it against the accepted claim root. Highroll records winnerAmount = gross, so no commission is taken from winnings.
claim(items, to, withdrawAmount) with a zero amount only records the credit. A non-zero amount also pays out. The maximum uint asks for as much as credit and available money allow. Unpaid credit stays and can be retried.