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

kitindexdemo/v0 package

Overview

Package kitindexdemo is a notes board whose only job is to show gno.land/p/moul/kit/index doing the thing a realm with a store always ends up needing: answering "every note tagged gno" as cheaply as it answers "note 7".

There is no logic of its own here. The records are a kit/store, the two lookups are kit/index, the page is kit/ui, and what is worth reading is the shape: every write touches the store and both indexes in ONE function, which is the entire correctness argument for keeping them in separate containers.

Demo of the p/moul/kit/index library.

Function

Retract

func Retract(cur realm, id int64)

Retract removes a note. Only its author may, and the store and both indexes are unwound together.

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/kitindexdemo/v0" -func "Retract" -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/kitindexdemo/v0" -func "Retract" -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