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

lotto package

Functions

AddNumber

func AddNumber(cur realm, owner address, number uint64)

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 "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" 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 "http://127.0.0.1:26657" call.tx
  

DeleteAll

func DeleteAll(cur realm)

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 "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" 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 "http://127.0.0.1:26657" call.tx
  

GetNumberCount

func GetNumberCount(number uint64, owner address) uint64

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

Params

Command

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

Result

ListOwnersByNumber

func ListOwnersByNumber(number uint64, afterOwner string, limit int) []map[string]string

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 "http://127.0.0.1:26657" -data "gno.land/r/akkadia/beta/lotto.ListOwnersByNumber(,,)"

Result

Render

func Render(path string) string

Param

Command

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

Result