staking

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Overview

nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/okex/exchain/x/staking/keeper ALIASGEN: github.com/okex/exchain/x/staking/types ALIASGEN: github.com/okex/exchain/x/staking/exported

nolint ALIASGEN: github.com/okex/exchain/x/staking/types

Index

Constants

View Source
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

View Source
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
	NewMsgAddShares                    = types.NewMsgAddShares
	NewGenesisState                    = types.NewGenesisState
	DelegatorAddSharesInvariant        = keeper.DelegatorAddSharesInvariant

	// variable aliases
	ModuleCdc     = types.ModuleCdc
	ValidatorsKey = types.ValidatorsKey
)
View Source
var (
	// functions aliases
	NewCommissionRates                = types.NewCommissionRates
	NewMsgEditValidatorCommissionRate = types.NewMsgEditValidatorCommissionRate
	NewMsgDestroyValidator            = types.NewMsgDestroyValidator
	NewMsgRegProxy                    = types.NewMsgRegProxy
	NewMsgBindProxy                   = types.NewMsgBindProxy
	NewMsgUnbindProxy                 = types.NewMsgUnbindProxy
)
View Source
var (
	ErrCheckSignerFail = errors.New("check signer fail")
)

Functions

func BeginBlocker added in v1.3.0

func BeginBlocker(ctx sdk.Context, k Keeper)

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 added in v1.6.6

func ConvertAddSharesMsg(data []byte, signers []sdk.AccAddress) (sdk.Msg, error)

func ConvertDepositMsg added in v1.6.6

func ConvertDepositMsg(data []byte, signers []sdk.AccAddress) (sdk.Msg, error)

func ConvertWithdrawMsg added in v1.6.6

func ConvertWithdrawMsg(data []byte, signers []sdk.AccAddress) (sdk.Msg, error)

func EndBlocker

func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate

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 NewHandler

func NewHandler(k keeper.Keeper) sdk.Handler

NewHandler manages all tx treatment

func RegisterConvert added in v1.6.6

func RegisterConvert()

func StringInSlice

func StringInSlice(a string, list []string) bool

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 added in v1.3.0

func (am AppModule) CommitFilter() *cosmost.StoreFilter

func (AppModule) EndBlock

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 added in v1.3.0

func (am AppModule) ModuleName() string

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

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 added in v1.3.0

func (am AppModule) PruneFilter() *cosmost.StoreFilter

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

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 added in v1.3.0

func (am AppModule) RegisterParam() params.ParamSet

func (AppModule) RegisterServices added in v1.3.0

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 added in v1.3.0

func (am AppModule) RegisterTask() upgrade.HeightTask

func (AppModule) Route

func (AppModule) Route() string

Route returns the message routing key for the staking module.

func (AppModule) UpgradeHeight added in v1.3.0

func (am AppModule) UpgradeHeight() int64

func (AppModule) VersionFilter added in v1.3.0

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 added in v1.3.0

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 added in v1.3.0

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 added in v1.3.0

func (am AppModuleBasic) RegisterGRPCGatewayRoutes(cliContext clictx.CLIContext, serveMux *runtime.ServeMux)

func (AppModuleBasic) RegisterInterfaces added in v1.3.0

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 added in v1.3.0

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 Delegator

type Delegator = types.Delegator

type Description

type Description = types.Description

type GenesisState

type GenesisState = types.GenesisState

type Keeper

type Keeper = keeper.Keeper

type ProxyDelegatorKeyExported

type ProxyDelegatorKeyExported = types.ProxyDelegatorKeyExported

type SharesResponses

type SharesResponses = types.SharesResponses

type UndelegationInfo

type UndelegationInfo = types.UndelegationInfo

type Validator

type Validator = types.Validator

type ValidatorExport

type ValidatorExport = types.ValidatorExported

type ValidatorI

type ValidatorI = exported.ValidatorI

type Validators

type Validators = types.Validators

Directories

Path Synopsis
client
cli
legacy
nolint
nolint
Package types is a reverse proxy.
Package types is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL