Documentation ¶
Overview ¶
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/fastock/fastock-chain/x/staking/keeper ALIASGEN: github.com/fastock/fastock-chain/x/staking/types ALIASGEN: github.com/fastock/fastock-chain/x/staking/exported
Index ¶
- Constants
- Variables
- func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate
- func ExportGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState
- func GetLatestGenesisValidator(ctx sdk.Context, keeper Keeper) (vals []tmtypes.GenesisValidator)
- func InitGenesis(ctx sdk.Context, keeper Keeper, accountKeeper types.AccountKeeper, ...) (res []abci.ValidatorUpdate)
- func NewHandler(k keeper.Keeper) sdk.Handler
- func StringInSlice(a string, list []string) bool
- func ValidateGenesis(data types.GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(_ 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 (AppModule) GenerateGenesisState(simState *module.SimulationState)
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) ProposalContents(simState module.SimulationState) []sim.WeightedProposalContent
- func (AppModule) QuerierRoute() string
- func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (AppModule) Route() string
- func (am AppModule) WeightedOperations(_ module.SimulationState) []sim.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) BuildCreateValidatorMsg(cliCtx context.CLIContext, txBldr authtypes.TxBuilder) (authtypes.TxBuilder, sdk.Msg, error)
- func (AppModuleBasic) CreateValidatorMsgHelpers(ipDefault string) (fs *flag.FlagSet, nodeIDFlag, pubkeyFlag, amountFlag, defaultsDesc string)
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) PrepareFlagsForTxCreateValidator(config *cfg.Config, nodeID, chainID string, valPubKey crypto.PubKey)
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type Delegator
- type Description
- type GenesisState
- type Keeper
- type ProxyDelegatorKeyExported
- type SharesResponses
- type UndelegationInfo
- type Validator
- type ValidatorExport
- type ValidatorI
- type Validators
Constants ¶
const ( DefaultParamspace = keeper.DefaultParamspace ModuleName = types.ModuleName StoreKey = types.StoreKey TStoreKey = types.TStoreKey QuerierRoute = types.QuerierRoute RouterKey = types.RouterKey NotBondedPoolName = types.NotBondedPoolName BondedPoolName = types.BondedPoolName QueryParameters = types.QueryParameters )
Variables ¶
var ( // functions aliases NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier RegisterCodec = types.RegisterCodec NewCommission = types.NewCommission ErrNoValidatorFound = types.ErrNoValidatorFound ErrValidatorOwnerExists = types.ErrValidatorOwnerExists ErrValidatorPubKeyExists = types.ErrValidatorPubKeyExists ErrValidatorPubKeyTypeNotSupported = types.ErrValidatorPubKeyTypeNotSupported ErrBadDenom = types.ErrBadDenom DefaultGenesisState = types.DefaultGenesisState NewMultiStakingHooks = types.NewMultiStakingHooks GetValidatorsByPowerIndexKey = types.GetValidatorsByPowerIndexKey NewMsgCreateValidator = types.NewMsgCreateValidator NewMsgEditValidator = types.NewMsgEditValidator NewMsgDeposit = types.NewMsgDeposit NewMsgWithdraw = types.NewMsgWithdraw DefaultParams = types.DefaultParams NewValidator = types.NewValidator NewDescription = types.NewDescription NewGenesisState = types.NewGenesisState // variable aliases ModuleCdc = types.ModuleCdc ValidatorsKey = types.ValidatorsKey )
Functions ¶
func EndBlocker ¶
EndBlocker is called every block, update validator set
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper The GenesisState will contain the pool, params, validators, and bonds found in the keeper
func GetLatestGenesisValidator ¶
func GetLatestGenesisValidator(ctx sdk.Context, keeper Keeper) (vals []tmtypes.GenesisValidator)
GetLatestGenesisValidator returns a slice of bonded genesis validators
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, accountKeeper types.AccountKeeper, supplyKeeper types.SupplyKeeper, data types.GenesisState) (res []abci.ValidatorUpdate)
InitGenesis sets the pool and parameters for the provided keeper For each validator in data, it sets that validator in the keeper along with manually setting the indexes In addition, it also sets any delegations found in data Finally, it updates the bonded validators Returns final validator set after applying all declaration and delegations
func StringInSlice ¶
StringInSlice returns true if a is found the list.
func ValidateGenesis ¶
func ValidateGenesis(data types.GenesisState) error
ValidateGenesis validates the provided staking genesis state to ensure the expected invariants holds (i.e. params in correct bounds, no duplicate validators)
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule is a struct of app module
func NewAppModule ¶
func NewAppModule(keeper Keeper, accKeeper types.AccountKeeper, supplyKeeper types.SupplyKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlock is invoked on the beginning of each block
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock is invoked on the end of each 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 performs a no-op.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis initializes module genesis
func (AppModule) NewHandler ¶
NewHandler returns module handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns module querier
func (AppModule) ProposalContents ¶
func (am AppModule) ProposalContents(simState module.SimulationState) []sim.WeightedProposalContent
ProposalContents returns all the params content functions used to simulate governance proposals.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the staking module's querier route name.
func (AppModule) RandomizedParams ¶
func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange
RandomizedParams creates randomized distribution 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 doesn't register any type.
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(_ module.SimulationState) []sim.WeightedOperation
WeightedOperations returns the all the gov module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic is a struct of app module basics object
func (AppModuleBasic) BuildCreateValidatorMsg ¶
func (AppModuleBasic) BuildCreateValidatorMsg(cliCtx context.CLIContext, txBldr authtypes.TxBuilder) (authtypes.TxBuilder, sdk.Msg, error)
BuildCreateValidatorMsg is used for gen-tx
func (AppModuleBasic) CreateValidatorMsgHelpers ¶
func (AppModuleBasic) CreateValidatorMsgHelpers(ipDefault string) ( fs *flag.FlagSet, nodeIDFlag, pubkeyFlag, amountFlag, defaultsDesc string)
CreateValidatorMsgHelpers is used for gen-tx
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns 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) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd gets the root tx command of this module
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the staking module's name.
func (AppModuleBasic) PrepareFlagsForTxCreateValidator ¶
func (AppModuleBasic) PrepareFlagsForTxCreateValidator(config *cfg.Config, nodeID, chainID string, valPubKey crypto.PubKey)
PrepareFlagsForTxCreateValidator is used for gen-tx
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec registers module codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
RegisterRESTRoutes registers rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis give a validity check to module genesis
type Description ¶
type Description = types.Description
type GenesisState ¶
type GenesisState = types.GenesisState
type ProxyDelegatorKeyExported ¶
type ProxyDelegatorKeyExported = types.ProxyDelegatorKeyExported
type SharesResponses ¶
type SharesResponses = types.SharesResponses
type UndelegationInfo ¶
type UndelegationInfo = types.UndelegationInfo
type ValidatorExport ¶
type ValidatorExport = types.ValidatorExported
type ValidatorI ¶
type ValidatorI = exported.ValidatorI
type Validators ¶
type Validators = types.Validators