Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

realmwatch package

Overview

RealmWatch — the on-chain leash for an autonomous agent.

An off-chain agent watches things and posts alerts. This realm is its public control and audit layer:

  • a registry of what the agent is allowed to watch,
  • an append-only log of everything the agent did,
  • a STOP flag and a per-epoch action cap that the REALM enforces.

The point: the cap and the kill switch do not live in the agent's code, where a bug (or a prompt injection) could talk the agent out of them. They live here, in the chain's state. A PostAlert that arrives while STOP is set, or after the epoch cap is spent, reverts. The agent cannot sweet-talk a smart contract.

Trust model:

  • The owner (deployer) configures: agent address, watches, cap, STOP. Only the owner can change configuration.
  • The registered agent address — and only it — can append log entries, and only within the cap and only while not stopped.
  • The agent may trip STOP itself (self-arrest), but only the owner can clear it.
  • All privileged entry points require a direct user call (maketx call from the EOA), never a realm-to-realm call, so caller identity cannot be laundered through another contract.

Function

SetStopped

func SetStopped(cur realm, stop bool)
Ask AI Claude ChatGPT

SetStopped is the kill switch. Owner only. While stopped, every agent post reverts on-chain.

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/g15gz99k0zsv59wgvyv5ulxzv5f2dkyzvh0zhaga/realmwatch" -func "SetStopped" -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/g15gz99k0zsv59wgvyv5ulxzv5f2dkyzvh0zhaga/realmwatch" -func "SetStopped" -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
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g15gz99k0zsv59wgvyv5ulxzv5f2dkyzvh0zhaga/realmwatch, for example a function call with arguments.