governance

package
v0.2100.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 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)

	// KeyProposalSubmitted is an ABCI event attribute key for submitted
	// proposals (value is a CBOR serialized ProposalSubmittedEvent).
	KeyProposalSubmitted = []byte("proposal-submitted")
	// KeyVote is an ABCI event attribute key for submitted votes (value is a
	// CBOR serialized VoteEvent).
	KeyVote = []byte("vote")
	// KeyProposalFinalized is an ABCI event attribute key for finalized
	// proposals (value is a CBOR serialized ProposalFinalizedEvent).
	KeyProposalFinalized = []byte("proposal-finalized")
	// KeyProposalExecuted is an ABCI event attribute key for executed proposals
	// (value is a CBOR serialized ProposalExecutedEvent).
	KeyProposalExecuted = []byte("proposal-executed")
)

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