Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

ops source realm

Package ops is the house's till.

Overview

Package ops is the house's till.

WHAT IT IS FOR. The three arcade realms each take a cut -- 5% of a draw ticket, 3% of a duel stake -- and each pushes it to ONE compile-time address, opsVaultAddr, which is the address derived from THIS package's path. Until this realm existed, that address had no code at it: the money left the games and landed somewhere nothing could ever spend from. That is AUDIT-2026-10-07.md RED-2 and the arcade's own source names it, in terms, as "still blocking for deployment ... the owner's address is the missing input".

This realm is that input, and nothing else. It holds wrapped GNOT and lets one address take it out.

WHAT IT DELIBERATELY DOES NOT DO, because every one of these is a way for a till to become a liability:

  • NO ACCESS TO ANY PRIZE POT. It cannot reach one. The draws pay winners from their own balances and this realm has no call into them. The owner key cannot touch a player's money because there is no code here that could.
  • NO OWNERSHIP TRANSFER. owner is a compile-time constant with no setter, so there is no function an attacker can reach to become the owner, and no function the owner can be tricked into calling. The cost is stated below.
  • NO PAUSE, NO UPGRADE, NO ADMIN. Nothing here can be turned off or changed after deployment, by anyone.
  • NO NATIVE COIN. chain/banker is not imported. This realm can move wrapped GNOT and nothing else, which is what the games actually send.

THE COST OF A FIXED OWNER, SAID PLAINLY RATHER THAN DISCOVERED LATER: if that key is lost, every coin in this realm is lost with it. There is no recovery path and cannot be one without adding exactly the kind of privileged function the list above refuses. That trade is the owner's and it was made knowingly.

Functions 4

func Balance

crossing Action
1func Balance(cur realm) int64
source

Balance is the wrapped GNOT this realm holds, read from wugnot rather than tracked in a counter of our own. A realm that keeps its own idea of its balance is a realm that can disagree with the truth.

func Withdraw

crossing Action
1func Withdraw(cur realm, amount int64) int64
source

Withdraw sends `amount` of wrapped GNOT to the owner.

THE DESTINATION IS NOT AN ARGUMENT. It is always the owner's own address, so there is no call shape in which this realm pays somebody else -- not by mistake, not by a malformed argument, not by a caller who has somehow got past requireOwner. A withdrawal function that takes a recipient is one typo away from being a drain.

func WithdrawAll

crossing Action
1func WithdrawAll(cur realm) int64
source

WithdrawAll empties the till to the owner. Refuses on an empty one rather than succeeding with a zero transfer: "it worked" and "there was nothing there" are different answers and a caller deserves to be told which.

Dependencies

Source Files 2