Documentation ¶
Index ¶
- func ExportGenesis(ctx sdk.Ctx, keeper keeper.Keeper) types.GenesisState
- func InitGenesis(ctx sdk.Ctx, keeper keeper.Keeper, supplyKeeper types.AuthKeeper, ...) (res []abci.ValidatorUpdate)
- func NewHandler(k keeper.Keeper) sdk.Handler
- func RawTx(cdc *codec.Codec, tmNode client.Client, fromAddr sdk.Address, txBytes []byte) (sdk.TxResponse, error)
- func Send(cdc *codec.Codec, tmNode client.Client, keybase keys.Keybase, ...) (*sdk.TxResponse, error)
- func StakeTx(cdc *codec.Codec, tmNode client.Client, keybase keys.Keybase, chains []string, ...) (*sdk.TxResponse, error)
- func UnjailTx(cdc *codec.Codec, tmNode client.Client, keybase keys.Keybase, ...) (*sdk.TxResponse, error)
- func UnstakeTx(cdc *codec.Codec, tmNode client.Client, keybase keys.Keybase, ...) (*sdk.TxResponse, error)
- func ValidateGenesis(data types.GenesisState) error
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Ctx, req abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Ctx, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Ctx) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Ctx, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (AppModule) Route() string
- func (am AppModule) UpgradeCodec(ctx sdk.Ctx)
- type AppModuleBasic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportGenesis ¶
ExportGenesis returns a GenesisState for a given context and keeper
func InitGenesis ¶
func InitGenesis(ctx sdk.Ctx, keeper keeper.Keeper, supplyKeeper types.AuthKeeper, data types.GenesisState) (res []abci.ValidatorUpdate)
InitGenesis sets up the module based on the genesis state First TM block is at height 1, so state updates applied from genesis.json are in block 0.
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 implements an application module for the staking module.
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Ctx, req abci.RequestBeginBlock)
module begin-block
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Ctx, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock returns the end blocker for the staking module. It returns no validator updates.
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Ctx) json.RawMessage
ExportGenesis returns the exported genesis state as raw bytes for the staking module.
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Ctx, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the pos module. It returns no validator updates.
func (AppModule) NewHandler ¶
NewHandler returns an sdk.Handler for the staking module.
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns the staking module sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute returns the staking module's querier route name.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants registers the staking module invariants.
func (AppModule) UpgradeCodec ¶
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic defines the basic application module used by the staking module.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the staking module.
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the staking module's name.
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec registers the staking module's types for the given codec.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the staking module.