keeper

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func NonNegativeCoinStateInvariant added in v1.1.0

func NonNegativeCoinStateInvariant(k Keeper) sdk.Invariant

NonNegativeCoinStateInvariant checks that any coin state is negative

func RegisterInvariants added in v1.1.0

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants register cfedistribution invariants

func StateSumBalanceCheckInvariant added in v1.1.0

func StateSumBalanceCheckInvariant(k Keeper) sdk.Invariant

StateSumBalanceCheckInvariant checks that sum on state equal module account balance

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	bankKeeper types.BankKeeper,
	accountKeeper types.AccountKeeper,
	authority string,
) *Keeper

func (Keeper) BurnCoinsForSpecifiedModuleAccount

func (k Keeper) BurnCoinsForSpecifiedModuleAccount(ctx sdk.Context, coins sdk.Coins, moduleAccountName string) error

func (Keeper) GetAccountAddressModuleAccount

func (k Keeper) GetAccountAddressModuleAccount(ctx sdk.Context, accountName string) sdk.AccAddress

func (Keeper) GetAccountCoins

func (k Keeper) GetAccountCoins(ctx sdk.Context, account sdk.AccAddress) sdk.Coins

func (Keeper) GetAccountCoinsForModuleAccount

func (k Keeper) GetAccountCoinsForModuleAccount(ctx sdk.Context, accountName string) sdk.Coins

func (Keeper) GetAllStates

func (k Keeper) GetAllStates(ctx sdk.Context) (list []types.State)

GetAllStates returns all States

func (Keeper) GetBurnState

func (k Keeper) GetBurnState(ctx sdk.Context) (remains types.State, found bool)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the current x/mint module parameters.

func (Keeper) GetState

func (k Keeper) GetState(ctx sdk.Context, stateKey string) (remains types.State, found bool)

GetState return state by key

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) PrepareCoinsToDistribute added in v1.1.0

func (k Keeper) PrepareCoinsToDistribute(sources []*types.Account, ctx sdk.Context, states []types.State, subDistributorName string) sdk.DecCoins

func (Keeper) SendCoinsFromModuleAccount

func (k Keeper) SendCoinsFromModuleAccount(ctx sdk.Context, coins sdk.Coins, moduleFrom string, account sdk.AccAddress) error

func (Keeper) SendCoinsFromModuleToModule

func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Context, coins sdk.Coins, moduleFrom string, moduleTo string) error

func (Keeper) SendCoinsFromStates added in v1.1.0

func (k Keeper) SendCoinsFromStates(ctx sdk.Context, states []types.State)

func (Keeper) SendCoinsToModuleAccount

func (k Keeper) SendCoinsToModuleAccount(ctx sdk.Context, coins sdk.Coins, account sdk.AccAddress, moduleTo string) error

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error

SetParams sets the x/mint module parameters.

func (Keeper) SetState

func (k Keeper) SetState(ctx sdk.Context, state types.State)

SetState Set the state

func (Keeper) StartDistributionProcess added in v1.1.0

func (k Keeper) StartDistributionProcess(ctx sdk.Context, states *[]types.State, coinsToDistributeDec sdk.DecCoins, subDistributor types.SubDistributor) (localRemains *[]types.State, distributionEvents []*types.EventDistribution, burnEvent *types.EventDistributionBurn)

func (Keeper) States

type Migrator added in v1.1.0

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

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

func NewMigrator added in v1.1.0

func NewMigrator(keeper Keeper, legacySubspace subspace.Subspace) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2 added in v1.1.0

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

Migrate1to2 migrates from version 1 to 2.

func (Migrator) Migrate2to3 added in v1.2.0

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

Migrate2to3 migrates from version 2 to 3.

Jump to

Keyboard shortcuts

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