Documentation ¶
Overview ¶
nolint DONTCOVER
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k Keeper)
- func EndBlocker(ctx sdk.Context, keeper Keeper)
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
- func NewHandler(keeper Keeper) sdk.Handler
- func SortAddresses(addrs []sdk.AccAddress)
- func SortByteArrays(src [][]byte) [][]byte
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (a AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type GenesisState
- type Keeper
- type MsgSubmitProposal
- type MsgVote
- type Proposal
- type Vote
- type VoteOption
- type Votes
Constants ¶
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 ¶
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 EndBlocker ¶
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 ¶
NewHandler creates an sdk.Handler for all the gov type messages
func SortByteArrays ¶
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 ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
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) NewHandler ¶
NewHandler returns an sdk.Handler for the gov module.
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns no sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the gov module's querier route name.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants registers module invariants
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 MsgSubmitProposal ¶
type MsgSubmitProposal = types.MsgSubmitProposal
type VoteOption ¶
type VoteOption = types.VoteOption