Documentation ¶
Index ¶
- Constants
- Variables
- func NewParamChangeProposalHandler(k *Keeper) govtypes.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func NewUpgradeProposalHandler(k *Keeper) govtypes.Handler
- 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) ApplyEffectiveUpgrade(ctx sdk.Context) error
- func (keeper Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg govtypes.MsgSubmitProposal) sdk.Error
- func (keeper *Keeper) ClaimReadyForUpgrade(name string, cb func(types.UpgradeInfo))
- func (keeper *Keeper) GetEffectiveUpgradeInfo(ctx sdk.Context, name string) (types.UpgradeInfo, error)
- func (keeper Keeper) GetGasConfig(ctx sdk.Context) *stypes.GasConfig
- 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 (k *Keeper) RegisterSignal(handler func())
- 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 UpgradeRouterKey = types.UpgradeRouterKey )
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 NewUpgradeProposalHandler ¶ added in v1.7.0
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 ¶
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 ¶
func (AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) QuerierRoute ¶
func (AppModule) RandomizedParams ¶
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 ¶
func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for staking module's types
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{}
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, logger log.Logger) ( k Keeper)
NewKeeper creates a new instance of params keeper
func (Keeper) AfterDepositPeriodPassed ¶
func (Keeper) AfterSubmitProposalHandler ¶
nolint
func (*Keeper) ApplyEffectiveUpgrade ¶ added in v1.7.0
func (Keeper) CheckMsgSubmitProposal ¶
func (keeper Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg govtypes.MsgSubmitProposal) sdk.Error
CheckMsgSubmitProposal implements ProposalHandler interface
func (*Keeper) ClaimReadyForUpgrade ¶ added in v1.7.0
func (keeper *Keeper) ClaimReadyForUpgrade(name string, cb func(types.UpgradeInfo))
ClaimReadyForUpgrade tells Keeper that someone has get ready for the upgrade. cb could be nil if there's no code to be execute when the upgrade is take effective. NOTE: This method could only be called at initialize phase, and CAN NOT be called when hanlding a tx.
func (*Keeper) GetEffectiveUpgradeInfo ¶ added in v1.7.0
func (Keeper) GetGasConfig ¶ added in v1.7.6
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) RegisterSignal ¶ added in v1.1.10
func (k *Keeper) RegisterSignal(handler func())
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 ¶
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