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

collatz/v0 package

Functions

Compute

func Compute(cur realm, n int)
Ask AI Claude ChatGPT

Compute walks the hailstone sequence for n and records the result attributed to the caller. It is a crossing (state-mutating) func.

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/daily/collatz/v0" -func "Compute" -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/daily/collatz/v0" -func "Compute" -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
  

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render shows the leaderboard at root, or the full hailstone sequence for a given n at path "/<n>".

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/collatz/v0.Render()"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/moul/x/daily/collatz/v0, for example a function call with arguments.