Search Apps Documentation Source Content File Folder Download Copy Actions Download

v2 package

Overview

Package validators implements the on-chain validator set management through Proof of Contribution. The Realm exposes only a public executor for govdao proposals, that can suggest validator set changes.

Functions

GetChanges

func GetChanges(from int64) []validators.Validator
Execute

GetChanges returns the validator changes stored on the realm, since the given block number. This function is intended to be called by gno.land through the GnoSDK

Param

Command

gnokey query vm/qeval -remote "https://rpc.test10.testnets.gno.land" -data "gno.land/r/sys/validators/v2.GetChanges()"

Result

GetValidator

func GetValidator(addr address) validators.Validator
Execute

GetValidator returns the typed validator

Param

Command

gnokey query vm/qeval -remote "https://rpc.test10.testnets.gno.land" -data "gno.land/r/sys/validators/v2.GetValidator()"

Result

GetValidators

func GetValidators() []validators.Validator
Execute

GetValidators returns the typed validator set

Command

gnokey query vm/qeval -remote "https://rpc.test10.testnets.gno.land" -data "gno.land/r/sys/validators/v2.GetValidators()"

Result

IsValidator

func IsValidator(addr address) bool
Execute

IsValidator returns a flag indicating if the given bech32 address is part of the validator set

Param

Command

gnokey query vm/qeval -remote "https://rpc.test10.testnets.gno.land" -data "gno.land/r/sys/validators/v2.IsValidator()"

Result

NewPropRequest

func NewPropRequest(changesFn func() []validators.Validator, title, description string) dao.ProposalRequest
Execute

NewPropRequest creates a new proposal request that wraps a changes closure proposal. This wrapper is required to ensure the GovDAO Realm actually executed the callback.

Params

Command

gnokey query vm/qeval -remote "https://rpc.test10.testnets.gno.land" -data "gno.land/r/sys/validators/v2.NewPropRequest(,,)"

Result

Render

func Render(_ string) string
Execute

Param

Command

gnokey query vm/qeval -remote "https://rpc.test10.testnets.gno.land" -data "gno.land/r/sys/validators/v2.Render()"

Result