Documentation ¶
Index ¶
- type Keeper
- func (k *Keeper) AssertInvariants(ctx sdk.Context)
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetAuthority() string
- func (k *Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k *Keeper) InvCheckPeriod() uint
- func (k *Keeper) Invariants() []sdk.Invariant
- func (k *Keeper) Logger(ctx context.Context) log.Logger
- func (k *Keeper) RegisterRoute(moduleName, route string, invar sdk.Invariant)
- func (k *Keeper) Routes() []types.InvarRoute
- func (k *Keeper) SendCoinsFromAccountToFeeCollector(ctx context.Context, senderAddr sdk.AccAddress, amt sdk.Coins) error
- func (k *Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- func (k *Keeper) VerifyInvariant(goCtx context.Context, msg *types.MsgVerifyInvariant) (*types.MsgVerifyInvariantResponse, error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct { Schema collections.Schema ConstantFee collections.Item[sdk.Coin] // contains filtered or unexported fields }
Keeper - crisis keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService storetypes.KVStoreService, invCheckPeriod uint, supplyKeeper types.SupplyKeeper, feeCollectorName, authority string, ac address.Codec, ) *Keeper
NewKeeper creates a new Keeper object
func (*Keeper) AssertInvariants ¶
AssertInvariants asserts all registered invariants. If any invariant fails, the method panics.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (*Keeper) GetAuthority ¶
GetAuthority returns the x/crisis module's authority.
func (*Keeper) InitGenesis ¶
func (k *Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
new crisis genesis
func (*Keeper) InvCheckPeriod ¶
InvCheckPeriod returns the invariant checks period.
func (*Keeper) Invariants ¶
Invariants returns a copy of all registered Crisis keeper invariants.
func (*Keeper) RegisterRoute ¶
RegisterRoute register the routes for each of the invariants
func (*Keeper) Routes ¶
func (k *Keeper) Routes() []types.InvarRoute
Routes - return the keeper's invariant routes
func (*Keeper) SendCoinsFromAccountToFeeCollector ¶
func (k *Keeper) SendCoinsFromAccountToFeeCollector(ctx context.Context, senderAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromAccountToFeeCollector transfers amt to the fee collector account.
func (*Keeper) UpdateParams ¶
func (k *Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
UpdateParams implements MsgServer.UpdateParams method. It defines a method to update the x/crisis module parameters.
func (*Keeper) VerifyInvariant ¶
func (k *Keeper) VerifyInvariant(goCtx context.Context, msg *types.MsgVerifyInvariant) (*types.MsgVerifyInvariantResponse, error)
VerifyInvariant implements MsgServer.VerifyInvariant method. It defines a method to verify a particular invariant.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place state migrations.
func NewMigrator ¶
NewMigrator returns a new Migrator.
func (Migrator) Migrate1to2 ¶
Migrate1to2 migrates the x/crisis module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/crisis module state.