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

store package

Overview

Package store keeps Gnogolf's data (every record, best, board, standing, round in play and hole) apart from its rules, so a new version of the rules takes the data on instead of starting empty. It knows nothing of golf: a few ordered collections of string keys to string values, written only by the one realm it names as its writer (the rules: golf/v2 at the launch), read by anyone. A new writer takes over three days after its code is on chain and says so (the owner proposes it, it calls Ready), on its own; the owner can stop every write at once (Pause), start the same rules again at once (Resume), and renounce the role for good.

Function

Resume

func Resume(cur realm)

Resume starts again, at once, the rules a Pause stopped: their code was in force already, so nothing new runs. Only the owner can.

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/nym-alexiscolin000/gnogolf/store" -func "Resume" -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/nym-alexiscolin000/gnogolf/store" -func "Resume" -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