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 package

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

Balance

func Balance(cur realm) int64
Ask AI Claude ChatGPT

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.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops" -func "Balance" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops" -func "Balance" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Render

func Render(path string) string
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops.Render()"

Result

Withdraw

func Withdraw(cur realm, amount int64) int64
Ask AI Claude ChatGPT

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.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops" -func "Withdraw" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops" -func "Withdraw" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

WithdrawAll

func WithdrawAll(cur realm) int64
Ask AI Claude ChatGPT

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.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops" -func "WithdrawAll" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/ops" -func "WithdrawAll" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx