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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

lotto package

Functions

AddNumber

func AddNumber(cur realm, owner address, number uint64)
Ask AI Claude ChatGPT

AddNumber increments the holding once per successful call, including retries. Only the direct admin or operator caller may register a number. Individual ticket identities, issuance times and past round balances are not retained.

Params

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/akkadia/beta/lotto" -func "AddNumber" -args $'' -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/akkadia/beta/lotto" -func "AddNumber" -args $'' -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
  

DeleteAll

func DeleteAll(cur realm)
Ask AI Claude ChatGPT

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/akkadia/beta/lotto" -func "DeleteAll" -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/akkadia/beta/lotto" -func "DeleteAll" -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
  

GetNumberCount

func GetNumberCount(number uint64, owner address) uint64
Ask AI Claude ChatGPT

GetNumberCount returns zero when the valid owner has no holding for number.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/akkadia/beta/lotto.GetNumberCount(,)"

Result

ListOwnersByNumber

func ListOwnersByNumber(number uint64, afterOwner string, limit int) []map[string]string
Ask AI Claude ChatGPT

ListOwnersByNumber returns fresh values in ascending address order. A cursor need not be stored. Each row carries the page cursor; an empty cursor or empty list ends pagination. Counts are decimal strings to preserve uint64 precision. Pages reflect current state, not a historical snapshot.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/akkadia/beta/lotto.ListOwnersByNumber(,,)"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/akkadia/beta/lotto.Render()"

Result