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

wiki/v0 package

Overview

Package wiki is an open, on-chain encyclopedia: anyone can create and edit a page, every edit is a signed revision, and the whole history is public.

It is a thin realm over gno.land/p/moul/x/wiki/v0. The library owns content (titles, revisions, wikilinks, categories, diffs, rendering); this realm owns authority (who may edit what) and the chain wiring (block height, block time, the calling address, transaction links).

The split matters for reading the code: there is no policy in the library and no content logic here.

Function

SetCooldown

func SetCooldown(cur realm, blocks int)

SetCooldown sets the minimum number of blocks between two edits by the same address; 0 disables it.

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/moul/x/wiki/v0" -func "SetCooldown" -args $'' -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/moul/x/wiki/v0" -func "SetCooldown" -args $'' -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