BCH BLAZEDeck ↗Code ↗
JōgeDOCSPlay

6.2 · BUILD

The contracts

Nine covenants in two languages. CashScript holds every round's money; SolidCash opens lanes, creates rounds and holds the agents' vaults.

ContractLanguageSizeIts job
LaneThreadSolidCash575 Bopens a lane's next round on its grid
FactorySolidCash1,084 Bvalidated custom rounds and events
GateCashScript353 Btakes entries, mints tickets
EventGateCashScript644 Ban event's gate, with leaving before the start
TicketCashScript78 Bmoves only with its own decided round, or its own event gate when its owner leaves early
MasterOpenCashScript808 Blocks at the first signed price past the start
MasterLockedCashScript878 Bproves the line and the close; decides; fees
MasterSweepCashScript409 Bpays tickets in batches
AgentVaultSolidCash134 Ban agent's money: bets that pay its owner

Both languages were built and measured side by side first. Contracts a wallet signs against are CashScript; SolidCash writes the ones signed by a server key or by nobody. Five more CashScript contracts carry dollar-staked events in ParyonUSD.

State lives in the tokens

TokenHoldsSize
Lane threadnext start, counter12 B
Masterthe round's record: market, times, fee, then pot, line and winner42–61 B
Gateentrants and the total per side20 B
Ticketround, side, stake, payout address32 B

Gates and tickets stay at or under 40 bytes, the most Selene will sign over.

On chain

TransactionBytes
Enter1,042
Lock (2 gates)2,502
Settle1,601
Pay 200 tickets22,048 · 63% of the compute budget

Tickets are bare-script outputs, half the size of P2SH32 ones in a payout.