governance

package
v0.2103.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppID is the unique application identifier.
	AppID uint8 = 0x08

	// AppName is the ABCI application name.
	AppName string = "300_governance"
)

Variables

View Source
var (
	// EventType is the ABCI event type for governance events.
	EventType = api.EventTypeForApp(AppName)

	// QueryApp is a query for filtering transactions processed by the
	// governance application.
	QueryApp = api.QueryForApp(AppName)
)

Functions

func New

func New() api.Application

New constructs a new governance application instance.

Types

type Query

type Query interface {
	ActiveProposals(context.Context) ([]*governance.Proposal, error)
	Proposals(context.Context) ([]*governance.Proposal, error)
	Proposal(context.Context, uint64) (*governance.Proposal, error)
	Votes(context.Context, uint64) ([]*governance.VoteEntry, error)
	PendingUpgrades(context.Context) ([]*upgrade.Descriptor, error)
	Genesis(context.Context) (*governance.Genesis, error)
	ConsensusParameters(context.Context) (*governance.ConsensusParameters, error)
}

Query is the governance query interface.

type QueryFactory

type QueryFactory struct {
	// contains filtered or unexported fields
}

QueryFactory is the governance query factory.

func NewQueryFactory

func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory

NewQueryFactory returns a new QueryFactory backed by the given state instance.

func (*QueryFactory) QueryAt

func (qf *QueryFactory) QueryAt(ctx context.Context, height int64) (Query, error)

QueryAt returns the governance query interface for a specific height.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL