Documentation ¶
Index ¶
- Constants
- Variables
- func NewParamChangeProposalHandler(k *Keeper) govtypes.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (AppModule) GenerateGenesisState(simState *module.SimulationState)
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
- func (AppModule) QuerierRoute() string
- func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange
- func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (AppModule) Route() string
- func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(_ *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(_ context.CLIContext, _ *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type BankKeeper
- type GenesisState
- type GovKeeper
- type Keeper
- func (keeper Keeper) AfterDepositPeriodPassed(ctx sdk.Context, proposal govtypes.Proposal)
- func (keeper Keeper) AfterSubmitProposalHandler(ctx sdk.Context, proposal govtypes.Proposal)
- func (keeper Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg govtypes.MsgSubmitProposal) sdk.Error
- func (keeper Keeper) GetMaxDepositPeriod(ctx sdk.Context, content govtypes.Content) (maxDepositPeriod time.Duration)
- func (keeper Keeper) GetMinDeposit(ctx sdk.Context, content govtypes.Content) (minDeposit sdk.SysCoins)
- func (keeper Keeper) GetParams(ctx sdk.Context) types.Params
- func (keeper Keeper) GetVotingPeriod(ctx sdk.Context, content govtypes.Content) (votingPeriod time.Duration)
- func (keeper Keeper) RejectedHandler(ctx sdk.Context, content govtypes.Content)
- func (keeper *Keeper) SetBankKeeper(ck BankKeeper)
- func (keeper *Keeper) SetGovKeeper(gk GovKeeper)
- func (keeper *Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (keeper *Keeper) SetStakingKeeper(sk StakingKeeper)
- func (keeper Keeper) VoteHandler(ctx sdk.Context, proposal govtypes.Proposal, vote govtypes.Vote) (string, sdk.Error)
- type KeyTable
- type ParamChange
- type ParamSet
- type ParamSetPair
- type ParamSetPairs
- type ParameterChangeProposal
- type StakingKeeper
- type Subspace
Constants ¶
const ( ModuleName = sdkparams.ModuleName DefaultCodespace = types.DefaultCodespace DefaultParamspace = sdkparams.ModuleName StoreKey = sdkparams.StoreKey TStoreKey = sdkparams.TStoreKey RouterKey = sdkparams.RouterKey )
const
Variables ¶
var ( // nolint NewKeyTable = sdkparams.NewKeyTable NewParamChange = sdkparams.NewParamChange DefaultParams = types.DefaultParams NewParamSetPair = sdkparams.NewParamSetPair )
var ModuleCdc *codec.Codec
ModuleCdc is the codec of module
Functions ¶
func NewParamChangeProposalHandler ¶
NewParamChangeProposalHandler returns the rollback function of the param proposal handler
func RegisterCodec ¶
RegisterCodec registers all necessary param module types with a given codec.
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 is the struct of this app module
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis exports the module genesis state
func (AppModule) GenerateGenesisState ¶ added in v0.16.0
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 initializes the module genesis state
func (AppModule) NewHandler ¶
func (AppModule) NewQuerierHandler ¶
func (AppModule) ProposalContents ¶ added in v0.16.0
func (AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) QuerierRoute ¶
func (AppModule) RandomizedParams ¶ added in v0.16.0
func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange
RandomizedParams creates randomized staking param changes for the simulator.
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
nolint
func (AppModule) RegisterStoreDecoder ¶ added in v0.16.0
func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for staking module's types
func (AppModule) WeightedOperations ¶ added in v0.16.0
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{}
AppModuleBasic is the struct of app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns the default genesis state in json raw message
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec registers module codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(_ context.CLIContext, _ *mux.Router)
nolint
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis gives a quick validity check for module genesis
type BankKeeper ¶
BankKeeper shows the expected action of bank keeper
type GenesisState ¶
GenesisState contains all params state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns the default genesis state of this module
type GovKeeper ¶
type GovKeeper interface { InsertWaitingProposalQueue(ctx sdk.Context, blockHeight, proposalID uint64) RemoveFromWaitingProposalQueue(ctx sdk.Context, blockHeight, proposalID uint64) }
GovKeeper shows the expected action of gov keeper
type Keeper ¶
Keeper is the struct of params keeper
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key *sdk.KVStoreKey, tkey *sdk.TransientStoreKey) ( k Keeper)
NewKeeper creates a new instance of params keeper
func (Keeper) AfterDepositPeriodPassed ¶
func (Keeper) AfterSubmitProposalHandler ¶
nolint
func (Keeper) CheckMsgSubmitProposal ¶
func (keeper Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg govtypes.MsgSubmitProposal) sdk.Error
CheckMsgSubmitProposal implements ProposalHandler interface
func (Keeper) GetMaxDepositPeriod ¶
func (keeper Keeper) GetMaxDepositPeriod(ctx sdk.Context, content govtypes.Content) (maxDepositPeriod time.Duration)
GetMaxDepositPeriod implements ProposalHandler interface
func (Keeper) GetMinDeposit ¶
func (keeper Keeper) GetMinDeposit(ctx sdk.Context, content govtypes.Content) (minDeposit sdk.SysCoins)
GetMinDeposit implements ProposalHandler interface
func (Keeper) GetVotingPeriod ¶
func (keeper Keeper) GetVotingPeriod(ctx sdk.Context, content govtypes.Content) (votingPeriod time.Duration)
GetVotingPeriod implements ProposalHandler interface
func (Keeper) RejectedHandler ¶
func (*Keeper) SetBankKeeper ¶
func (keeper *Keeper) SetBankKeeper(ck BankKeeper)
SetBankKeeper hooks the bank keeper into params keeper
func (*Keeper) SetGovKeeper ¶
SetGovKeeper hooks the gov keeper into params keeper
func (*Keeper) SetStakingKeeper ¶
func (keeper *Keeper) SetStakingKeeper(sk StakingKeeper)
SetStakingKeeper hooks the staking keeper into params keeper
type ParamChange ¶
type ParamChange = sdkparams.ParamChange
ParamChange is the type alias of the one in cmsdk
type ParamSetPair ¶ added in v0.16.0
type ParamSetPair = sdkparams.ParamSetPair
ParamSetPairs is the type alias of the one in cmsdk
type ParamSetPairs ¶
type ParamSetPairs = sdkparams.ParamSetPairs
ParamSetPairs is the type alias of the one in cmsdk
type ParameterChangeProposal ¶
type ParameterChangeProposal = types.ParameterChangeProposal
ParameterChangeProposal is alias of ParameterChangeProposal in types
type StakingKeeper ¶
type StakingKeeper interface {
IsValidator(ctx sdk.Context, addr sdk.AccAddress) bool
}
StakingKeeper shows the expected action of staking keeper