gov

package
v0.0.0-...-c763619 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:

Index

Constants

View Source
const (
	ModuleName        = types.ModuleName
	StoreKey          = types.StoreKey
	RouterKey         = types.RouterKey
	DefaultParamspace = types.DefaultParamspace
	ProposalTypeText  = types.ProposalTypeText
	QueryParams       = types.QueryParams

	StatusNil           = types.StatusNil
	StatusDepositPeriod = types.StatusDepositPeriod
	StatusVotingPeriod  = types.StatusVotingPeriod
	StatusPassed        = types.StatusPassed
	StatusRejected      = types.StatusRejected
	StatusFailed        = types.StatusFailed
)

Variables

View Source
var (
	// functions aliases
	RegisterCodec              = types.RegisterCodec
	RegisterProposalTypeCodec  = types.RegisterProposalTypeCodec
	ErrInvalidProposer         = types.ErrInvalidProposer
	ErrInvalidHeight           = types.ErrInvalidHeight
	ErrInvalidProposalContent  = types.ErrInvalidProposalContent
	ErrInvalidProposalType     = types.ErrInvalidProposalType
	ErrInvalidGenesis          = types.ErrInvalidGenesis
	ErrNoProposalHandlerExists = types.ErrNoProposalHandlerExists
	ProposalKey                = types.ProposalKey
	ActiveProposalByTimeKey    = types.ActiveProposalByTimeKey
	ActiveProposalQueueKey     = types.ActiveProposalQueueKey
	InactiveProposalByTimeKey  = types.InactiveProposalByTimeKey
	InactiveProposalQueueKey   = types.InactiveProposalQueueKey
	DepositKey                 = types.DepositKey
	VoteKey                    = types.VoteKey
	NewMsgSubmitProposal       = types.NewMsgSubmitProposal
	NewMsgDeposit              = types.NewMsgDeposit
	NewMsgVote                 = types.NewMsgVote
	ParamKeyTable              = types.ParamKeyTable
	NewDepositParams           = types.NewDepositParams
	NewTallyParams             = types.NewTallyParams
	NewVotingParams            = types.NewVotingParams
	NewParams                  = types.NewParams
	NewTallyResultFromMap      = types.NewTallyResultFromMap
	EmptyTallyResult           = types.EmptyTallyResult
	NewTextProposal            = types.NewTextProposal
	RegisterProposalType       = types.RegisterProposalType
	ContentFromProposalType    = types.ContentFromProposalType
	IsValidProposalType        = types.IsValidProposalType
	ProposalHandler            = types.ProposalHandler
	NewQueryProposalParams     = types.NewQueryProposalParams
	NewQueryDepositParams      = types.NewQueryDepositParams
	NewQueryVoteParams         = types.NewQueryVoteParams
	NewQueryProposalsParams    = types.NewQueryProposalsParams

	// variable aliases
	ModuleCdc                   = types.ModuleCdc
	ProposalsKeyPrefix          = types.ProposalsKeyPrefix
	ActiveProposalQueuePrefix   = types.ActiveProposalQueuePrefix
	InactiveProposalQueuePrefix = types.InactiveProposalQueuePrefix
	ProposalIDKey               = types.ProposalIDKey
	DepositsKeyPrefix           = types.DepositsKeyPrefix
	VotesKeyPrefix              = types.VotesKeyPrefix
	ParamStoreKeyDepositParams  = types.ParamStoreKeyDepositParams
	ParamStoreKeyVotingParams   = types.ParamStoreKeyVotingParams
	ParamStoreKeyTallyParams    = types.ParamStoreKeyTallyParams

	NewKeeper  = keeper.NewKeeper
	NewQuerier = keeper.NewQuerier
	NewRouter  = keeper.NewRouter
)

Functions

func EndBlocker

func EndBlocker(ctx sdk.Context, k keeper.Keeper)

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

func InitGenesis

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

InitGenesis - store genesis parameters

func ModuleAccountInvariant

func ModuleAccountInvariant(keeper keeper.Keeper) sdk.Invariant

ModuleAccountInvariant checks that the module account coins reflects the sum of deposit amounts held on store

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

NewHandler handle all "gov" type messages.

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, keeper keeper.Keeper)

RegisterInvariants registers all governance invariants

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis checks if parameters are within valid ranges

Types

type AppModule

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

AppModule defines app module

func NewAppModule

func NewAppModule(keeper Keeper, supplyKeeper keeper.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

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

BeginBlock implements module begin-block

func (AppModule) EndBlock

EndBlock implements module end-block

func (AppModule) ExportGenesis

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

ExportGenesis exports module genesis

func (AppModule) GenerateGenesisState

func (AppModule) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the staking module.

func (AppModule) InitGenesis

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

InitGenesis inits module genesis

func (AppModule) Name

func (AppModule) Name() string

Name gets module name

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler gets module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler gets module querier

func (AppModule) ProposalContents

ProposalContents doesn't return any content functions for governance proposals.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute module querier route name

func (AppModule) RandomizedParams

func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams creates randomized staking param changes for the simulator.

func (AppModule) RegisterInvariants

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

RegisterInvariants registers invariants

func (AppModule) RegisterStoreDecoder

func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for staking module's types

func (AppModule) Route

func (AppModule) Route() string

Route gets module message route name

func (AppModule) WeightedOperations

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the staking module operations with their respective weights.

type AppModuleBasic

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

AppModuleBasic defines app module basics object

func NewAppModuleBasic

func NewAppModuleBasic(proposalHandlers ...client.ProposalHandler) AppModuleBasic

NewAppModuleBasic creates a new AppModuleBasic object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis sets default genesis state

func (AppModuleBasic) GetQueryCmd

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

GetQueryCmd gets the root query command of this module

func (AppModuleBasic) GetQueryCmdV2

func (AppModuleBasic) GetTxCmd

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

GetTxCmd gets the root tx command of this module

func (AppModuleBasic) GetTxCmdV2

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name gets basic module name

func (AppModuleBasic) RegisterCodec

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

RegisterCodec registers module codec

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (a AppModuleBasic) RegisterGRPCGatewayRoutes(cliContext context.CLIContext, serveMux *runtime.ServeMux)

func (AppModuleBasic) RegisterInterfaces

func (a AppModuleBasic) RegisterInterfaces(registry anytypes.InterfaceRegistry)

func (AppModuleBasic) RegisterRESTRoutes

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

RegisterRESTRoutes registers rest routes

func (AppModuleBasic) RegisterRouterForGRPC

func (a AppModuleBasic) RegisterRouterForGRPC(cliCtx context.CLIContext, r *mux.Router)

func (AppModuleBasic) ValidateGenesis

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

ValidateGenesis validates module genesis

type Content

type Content = types.Content

type Deposit

type Deposit = types.Deposit

type DepositParams

type DepositParams = types.DepositParams

type Deposits

type Deposits = types.Deposits

type GenesisState

type GenesisState struct {
	StartingProposalID uint64            `json:"starting_proposal_id" yaml:"starting_proposal_id"`
	Deposits           Deposits          `json:"deposits" yaml:"deposits"`
	Votes              Votes             `json:"votes" yaml:"votes"`
	Proposals          []Proposal        `json:"proposals" yaml:"proposals"`
	WaitingProposals   map[string]uint64 `json:"waiting_proposals" yaml:"waiting_proposals"`
	DepositParams      DepositParams     `json:"deposit_params" yaml:"deposit_params"`
	VotingParams       VotingParams      `json:"voting_params" yaml:"voting_params"`
	TallyParams        TallyParams       `json:"tally_params" yaml:"tally_params"`
}

GenesisState - all staking state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState get raw genesis raw message for testing

func ExportGenesis

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

ExportGenesis - output genesis parameters

type Handler

type Handler = types.Handler

type Keeper

type Keeper = keeper.Keeper

type MsgDeposit

type MsgDeposit = types.MsgDeposit

type MsgSubmitProposal

type MsgSubmitProposal = types.MsgSubmitProposal

type MsgVote

type MsgVote = types.MsgVote

type Params

type Params = types.Params

type Proposal

type Proposal = types.Proposal

type ProposalStatus

type ProposalStatus = types.ProposalStatus

type Proposals

type Proposals = types.Proposals

type TallyParams

type TallyParams = types.TallyParams

type TallyResult

type TallyResult = types.TallyResult

type Vote

type Vote = types.Vote

type Votes

type Votes = types.Votes

type VotingParams

type VotingParams = types.VotingParams

Directories

Path Synopsis
cli
nolint
nolint

Jump to

Keyboard shortcuts

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