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

validator_scores package

Functions

AddCandidates

func AddCandidates(cur realm, number int, payload string)
Ask AI Claude ChatGPT

AddCandidates adds one candidate per payload line to the open edition. Publisher only. The whole payload is validated before anything is stored.

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/samcrew/validator_scores" -func "AddCandidates" -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/samcrew/validator_scores" -func "AddCandidates" -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
  

CandidateJSON

func CandidateJSON(operator string) string
Ask AI Claude ChatGPT

CandidateJSON returns the operator's entries across sealed editions, in edition order; "entries" is [] for an unknown address.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.CandidateJSON()"

Result

DiscardOpen

func DiscardOpen(cur realm)
Ask AI Claude ChatGPT

DiscardOpen drops the open edition. Publisher only. Its number is reused by the next OpenEdition. The slot is cleared first so the backing array does not keep the discarded edition stored.

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/samcrew/validator_scores" -func "DiscardOpen" -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/samcrew/validator_scores" -func "DiscardOpen" -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
  

EditionJSON

func EditionJSON(n int) string
Ask AI Claude ChatGPT

EditionJSON returns sealed edition n, or "null".

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.EditionJSON()"

Result

GetAdmin

func GetAdmin() string
Ask AI Claude ChatGPT

GetAdmin returns the admin address, for post-deployment checks.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.GetAdmin()"

Result

GetPublisher

func GetPublisher() string
Ask AI Claude ChatGPT

GetPublisher returns the current publisher address.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.GetPublisher()"

Result

LatestJSON

func LatestJSON() string
Ask AI Claude ChatGPT

LatestJSON returns the latest sealed edition, or "null".

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.LatestJSON()"

Result

OpenEdition

func OpenEdition(cur realm, computedAt, scorecardSHA256, arenas string) int
Ask AI Claude ChatGPT

OpenEdition starts a new edition and returns its number. Publisher only. arenas is a comma-separated list, for example "challenge,test13,firedrill".

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/samcrew/validator_scores" -func "OpenEdition" -args $'' -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/samcrew/validator_scores" -func "OpenEdition" -args $'' -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
  

OpenEditionJSON

func OpenEditionJSON() string
Ask AI Claude ChatGPT

OpenEditionJSON returns the open edition (number, scorecard hash and the operators already added, in the order added), or "null".

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.OpenEditionJSON()"

Result

Render

func Render(_ string) string
Ask AI Claude ChatGPT

Render shows the latest sealed edition as a Markdown table. The path is ignored.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/validator_scores.Render()"

Result

Seal

func Seal(cur realm, number int, expectedCount int)
Ask AI Claude ChatGPT

Seal closes the open edition for good. Publisher only. It fails unless the edition holds exactly expectedCount candidates (at least one).

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/samcrew/validator_scores" -func "Seal" -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/samcrew/validator_scores" -func "Seal" -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
  

SetPublisher

func SetPublisher(cur realm, addr address)
Ask AI Claude ChatGPT

SetPublisher replaces the publisher. Admin only.

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/samcrew/validator_scores" -func "SetPublisher" -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/samcrew/validator_scores" -func "SetPublisher" -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