Documentation ¶
Overview ¶
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/okx/brczero/x/staking/keeper ALIASGEN: github.com/okx/brczero/x/staking/types ALIASGEN: github.com/okx/brczero/x/staking/exported
nolint ALIASGEN: github.com/okx/brczero/x/staking/types
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k Keeper)
- func ConvertAddSharesMsg(data []byte, signers []sdk.AccAddress) (sdk.Msg, error)
- func ConvertDepositMsg(data []byte, signers []sdk.AccAddress) (sdk.Msg, error)
- func ConvertWithdrawMsg(data []byte, signers []sdk.AccAddress) (sdk.Msg, error)
- func DPoSValidatorsUpdate(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate
- 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 NewProposalHandler(k *Keeper) govTypes.Handler
- func PoAValidatorsUpdate(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate
- func RegisterConvert()
- func StringInSlice(a string, list []string) bool
- func ValidateGenesis(data types.GenesisState) error
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, b abci.RequestBeginBlock)
- func (am AppModule) CommitFilter() *cosmost.StoreFilter
- 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) ModuleName() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) ProposalContents(simState module.SimulationState) []sim.WeightedProposalContent
- func (am AppModule) PruneFilter() *cosmost.StoreFilter
- func (AppModule) QuerierRoute() string
- func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterParam() params.ParamSet
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (am AppModule) RegisterTask() upgrade.HeightTask
- func (AppModule) Route() string
- func (am AppModule) UpgradeHeight() int64
- func (am AppModule) VersionFilter() *cosmost.VersionFilter
- 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 (am AppModuleBasic) GetQueryCmdV2(cdc *codec.CodecProxy, reg anytypes.InterfaceRegistry) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (am AppModuleBasic) GetTxCmdV2(cdc *codec.CodecProxy, reg anytypes.InterfaceRegistry) *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 (am AppModuleBasic) RegisterGRPCGatewayRoutes(cliContext clictx.CLIContext, serveMux *runtime.ServeMux)
- func (am AppModuleBasic) RegisterInterfaces(registry anytypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (am AppModuleBasic) RegisterRouterForGRPC(cliCtx clictx.CLIContext, r *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 DefaultDposParams = types.DefaultDposParams NewValidator = types.NewValidator NewDescription = types.NewDescription NewGenesisState = types.NewGenesisState // variable aliases ModuleCdc = types.ModuleCdc ValidatorsKey = types.ValidatorsKey )
var ( // functions aliases NewCommissionRates = types.NewCommissionRates NewMsgEditValidatorCommissionRate = types.NewMsgEditValidatorCommissionRate NewMsgDestroyValidator = types.NewMsgDestroyValidator NewMsgRegProxy = types.NewMsgRegProxy NewMsgBindProxy = types.NewMsgBindProxy NewMsgUnbindProxy = types.NewMsgUnbindProxy )
var (
ErrCheckSignerFail = errors.New("check signer fail")
)
Functions ¶
func BeginBlocker ¶
BeginBlocker will persist the current header and validator set as a historical entry and prune the oldest entry based on the HistoricalEntries parameter
func ConvertAddSharesMsg ¶
func ConvertDepositMsg ¶
func ConvertWithdrawMsg ¶
func DPoSValidatorsUpdate ¶
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 NewProposalHandler ¶
NewProposalHandler handles "gov" type message in "staking"
func PoAValidatorsUpdate ¶
func RegisterConvert ¶
func RegisterConvert()
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 (am AppModule) BeginBlock(ctx sdk.Context, b abci.RequestBeginBlock)
BeginBlock is invoked on the beginning of each block
func (AppModule) CommitFilter ¶
func (am AppModule) CommitFilter() *cosmost.StoreFilter
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) ModuleName ¶
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) PruneFilter ¶
func (am AppModule) PruneFilter() *cosmost.StoreFilter
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) RegisterParam ¶
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
/ appmodule
func (AppModule) RegisterStoreDecoder ¶
func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder doesn't register any type.
func (AppModule) RegisterTask ¶
func (am AppModule) RegisterTask() upgrade.HeightTask
func (AppModule) UpgradeHeight ¶
func (AppModule) VersionFilter ¶
func (am AppModule) VersionFilter() *cosmost.VersionFilter
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) GetQueryCmdV2 ¶
func (am AppModuleBasic) GetQueryCmdV2(cdc *codec.CodecProxy, reg anytypes.InterfaceRegistry) *cobra.Command
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd gets the root tx command of this module
func (AppModuleBasic) GetTxCmdV2 ¶
func (am AppModuleBasic) GetTxCmdV2(cdc *codec.CodecProxy, reg anytypes.InterfaceRegistry) *cobra.Command
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) RegisterGRPCGatewayRoutes ¶
func (am AppModuleBasic) RegisterGRPCGatewayRoutes(cliContext clictx.CLIContext, serveMux *runtime.ServeMux)
func (AppModuleBasic) RegisterInterfaces ¶
func (am AppModuleBasic) RegisterInterfaces(registry anytypes.InterfaceRegistry)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
RegisterRESTRoutes registers rest routes
func (AppModuleBasic) RegisterRouterForGRPC ¶
func (am AppModuleBasic) RegisterRouterForGRPC(cliCtx clictx.CLIContext, r *mux.Router)
appmoduleBasic
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