keeper

package
v0.47.15 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 1,318

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper - crisis keeper

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, storeKey storetypes.StoreKey, invCheckPeriod uint,
	supplyKeeper types.SupplyKeeper, feeCollectorName string, authority string,
) *Keeper

NewKeeper creates a new Keeper object

func (*Keeper) AssertInvariants

func (k *Keeper) AssertInvariants(ctx sdk.Context)

AssertInvariants asserts all registered invariants. If any invariant fails, the method panics.

func (*Keeper) ExportGenesis added in v0.40.0

func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

ExportGenesis returns a GenesisState for a given context and keeper.

func (*Keeper) GetAuthority added in v0.47.0

func (k *Keeper) GetAuthority() string

GetAuthority returns the x/crisis module's authority.

func (*Keeper) GetConstantFee

func (k *Keeper) GetConstantFee(ctx sdk.Context) (constantFee sdk.Coin)

GetConstantFee get's the constant fee from the store

func (*Keeper) InitGenesis added in v0.40.0

func (k *Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)

new crisis genesis

func (*Keeper) InvCheckPeriod

func (k *Keeper) InvCheckPeriod() uint

InvCheckPeriod returns the invariant checks period.

func (*Keeper) Invariants

func (k *Keeper) Invariants() []sdk.Invariant

Invariants returns a copy of all registered Crisis keeper invariants.

func (*Keeper) Logger

func (k *Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (*Keeper) RegisterRoute

func (k *Keeper) RegisterRoute(moduleName, route string, invar sdk.Invariant)

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 sdk.Context, senderAddr sdk.AccAddress, amt sdk.Coins) error

SendCoinsFromAccountToFeeCollector transfers amt to the fee collector account.

func (*Keeper) SetConstantFee

func (k *Keeper) SetConstantFee(ctx sdk.Context, constantFee sdk.Coin) error

GetConstantFee set's the constant fee in the store

func (*Keeper) UpdateParams added in v0.47.0

func (k *Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)

UpdateParams implements MsgServer.UpdateParams method. It defines a method to update the x/crisis module parameters.

func (*Keeper) VerifyInvariant added in v0.40.0

VerifyInvariant implements MsgServer.VerifyInvariant method. It defines a method to verify a particular invariant.

type Migrator added in v0.47.0

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place state migrations.

func NewMigrator added in v0.47.0

func NewMigrator(k *Keeper, ss exported.Subspace) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2 added in v0.47.0

func (m Migrator) Migrate1to2(ctx sdk.Context) error

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.

Jump to

Keyboard shortcuts

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