gov

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 45 Imported by: 1

Documentation

Overview

nolint DONTCOVER

Index

Constants

View Source
const (
	ModuleName         = types.ModuleName
	DefaultParamspace  = types.DefaultParamspace
	RouterKey          = types.RouterKey
	QuerierRoute       = types.QuerierRoute
	StoreKey           = types.StoreKey
	StatusNil          = types.StatusNil
	StatusWaiting      = types.StatusWaiting
	StatusVotingPeriod = types.StatusVotingPeriod
	StatusPassed       = types.StatusPassed
	StatusRejected     = types.StatusRejected
	StatusFailed       = types.StatusFailed
)

Variables

View Source
var (
	DefaultGenesisState  = types.DefaultGenesisState
	ValidateGenesis      = types.ValidateGenesis
	NewKeeper            = keeper.NewKeeper
	NewRouter            = types.NewRouter
	RegisterCodec        = types.RegisterCodec
	ModuleCdc            = types.ModuleCdc
	NewQuerier           = keeper.NewQuerier
	ParamKeyTable        = types.ParamKeyTable
	NewMsgSubmitProposal = types.NewMsgSubmitProposal
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, k Keeper)

func EndBlocker

func EndBlocker(ctx sdk.Context, keeper Keeper)

EndBlocker called every block, process inflation, update validator set.

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)

InitGenesis - store genesis parameters

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

NewHandler creates an sdk.Handler for all the gov type messages

func SortAddresses

func SortAddresses(addrs []sdk.AccAddress)

SortAddresses - Sorts Addresses

func SortByteArrays

func SortByteArrays(src [][]byte) [][]byte

SortByteArrays - sorts the provided byte array

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule implements an application module for the gov module.

func NewAppModule

func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper, supplyKeeper types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)

BeginBlock performs a no-op.

func (AppModule) EndBlock

EndBlock returns the end blocker for the gov module. It returns no validator updates.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the gov module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the gov module. It returns no validator updates.

func (AppModule) Name

func (AppModule) Name() string

Name returns the gov module's name.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the gov module.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns no sdk.Querier.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute returns the gov module's querier route name.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers module invariants

func (AppModule) Route

func (AppModule) Route() string

Route returns the message routing key for the gov module.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the gov module.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the gov module.

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns the root query command for the gov module.

func (AppModuleBasic) GetTxCmd

func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command for the gov module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the gov module's name.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the gov module's types for the given codec.

func (AppModuleBasic) RegisterRESTRoutes

func (a AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes registers the REST routes for the gov module.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis performs genesis state validation for the gov module.

type GenesisState

type GenesisState = types.GenesisState
var InitialGenesisState GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

ExportGenesis - output genesis parameters

type Keeper

type Keeper = keeper.Keeper

type MsgSubmitProposal

type MsgSubmitProposal = types.MsgSubmitProposal

type MsgVote

type MsgVote = types.MsgVote

type Proposal

type Proposal = types.Proposal

type Vote

type Vote = types.Vote

type VoteOption

type VoteOption = types.VoteOption

type Votes

type Votes = types.Votes

Directories

Path Synopsis
client
cli
internal
keeper
nolint
nolint

Jump to

Keyboard shortcuts

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