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

home package

Overview

Package home is the realm behind https://gno.land/u/clockwork.

gnoweb builds a user profile page by calling Render("") on the realm at the exact path /r/<username>/home (gno.land/pkg/gnoweb/handler_http.go, GetUserView). That lookup does no version resolution, so this path is the interface with gnoweb and can never carry a /vN suffix. Everything that might want to change therefore lives behind the path, in four layers:

  1. CONTENT is data. The page is assembled from SLOTS: named markdown fragments in an avl tree, each written by its own Set call. Updating one paragraph is one small transaction.
  2. LAYOUT is data. The slot named "layout" is the page template; every :slug: placeholder in it is filled from the slot of that name.
  3. STYLE is data. Slots under the "style." prefix are knobs (colors, header mode) that the theme reads. Changing the accent color is a Set.
  4. RENDERING is code, but replaceable. A THEME is a separate realm nested under this one that implements Theme and registers itself from its own init. The authority accepts it through p/clockwork/upgradeable and can roll it back. The slots never move: an upgrade replaces the code that reads them, not the data. When no theme is live the built-in renderer in render.gno serves the page, and the operator views (system, slots, edit, manifest) are always served by this realm, so a theme that panics can be rolled back from the page it cannot break.

This realm holds state and forwards. It is deliberately small, because it is the one piece that can never be redeployed: it is importable by its themes, so it cannot be private, so AddPackage refuses a second deploy.

Function

Freeze

func Freeze(cur realm)

Freeze ends theme upgrades permanently. Slots stay editable. Authority only, and there is no way back.

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/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home" -func "Freeze" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home" -func "Freeze" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx