keeper

package
v1.6.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MicroPrecision = 1000000

Variables

This section is empty.

Functions

func NewMsgServerImpl added in v1.5.0

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func NewQueryServerImpl added in v1.5.0

func NewQueryServerImpl(keeper Keeper) types.QueryServer

NewQueryServerImpl returns an implementation of the QueryServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	AuthKeeper    authkeeper.AccountKeeper
	BankKeeper    bankkeeper.Keeper
	GovKeeper     govkeeper.Keeper
	StakingKeeper *stakingkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, paramSpace paramtypes.Subspace, auth authkeeper.AccountKeeper, bank bankkeeper.Keeper, sk *stakingkeeper.Keeper) *Keeper

NewKeeper Create a new keeper instance and return the pointer

func (Keeper) AddDepositMinted

func (k Keeper) AddDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

AddDepositMinted same as SetDepositMinted but takes into account the existing value

func (Keeper) CreateModuleAccount

func (k Keeper) CreateModuleAccount(ctx sdk.Context, amount sdk.Coins)

CreateModuleAccount Initialize the module account and set the original amount of coins

func (Keeper) GetDepositMinted

func (k Keeper) GetDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress) (deposit types.Deposit, found bool)

func (Keeper) GetDepositPendingMint

func (k Keeper) GetDepositPendingMint(ctx sdk.Context, depositorAddress sdk.AccAddress) (deposit types.Deposit, found bool)

func (Keeper) GetDepositPendingWithdrawal

func (k Keeper) GetDepositPendingWithdrawal(ctx sdk.Context, depositorAddress sdk.AccAddress) (deposit types.Deposit, found bool)

func (Keeper) GetModuleAccount

func (k Keeper) GetModuleAccount(ctx sdk.Context) sdk.AccAddress

GetModuleAccount Return the module account address

func (Keeper) GetModuleAccountBalance

func (k Keeper) GetModuleAccountBalance(ctx sdk.Context) sdk.Coins

func (Keeper) GetModuleAccountBalanceForDenom

func (k Keeper) GetModuleAccountBalanceForDenom(ctx sdk.Context, denom string) sdk.Coin

GetModuleAccountBalanceForDenom Return the module account's balance

func (Keeper) GetParams

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

func (Keeper) IterateDepositsMinted

func (k Keeper) IterateDepositsMinted(ctx sdk.Context, cb func(deposit types.Deposit) bool)

func (Keeper) IterateDepositsPendingMint

func (k Keeper) IterateDepositsPendingMint(ctx sdk.Context, cb func(deposit types.Deposit) bool)

func (Keeper) IterateDepositsPendingWithdrawal

func (k Keeper) IterateDepositsPendingWithdrawal(ctx sdk.Context, cb func(deposit types.Deposit) bool)

func (Keeper) ListDepositsMinted

func (k Keeper) ListDepositsMinted(ctx sdk.Context) (deposits []*types.Deposit)

func (Keeper) ListDepositsPendingMint

func (k Keeper) ListDepositsPendingMint(ctx sdk.Context) (deposits []*types.Deposit)

func (Keeper) ListDepositsPendingWithdrawal

func (k Keeper) ListDepositsPendingWithdrawal(ctx sdk.Context) (deposits []*types.Deposit)

func (Keeper) Logger

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

func (Keeper) RemoveDepositMinted

func (k Keeper) RemoveDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress)

func (Keeper) RemoveDepositPendingMint

func (k Keeper) RemoveDepositPendingMint(ctx sdk.Context, depositorAddress sdk.AccAddress)

func (Keeper) RemoveDepositPendingWithdrawal

func (k Keeper) RemoveDepositPendingWithdrawal(ctx sdk.Context, depositorAddress sdk.AccAddress)

func (Keeper) SetDepositMinted

func (k Keeper) SetDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

func (Keeper) SetDepositPendingMint

func (k Keeper) SetDepositPendingMint(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

func (Keeper) SetDepositPendingWithdrawal

func (k Keeper) SetDepositPendingWithdrawal(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

func (Keeper) SetParams

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

SetParams Set the in-store params

func (Keeper) UnsafeGetAllCoinsBack added in v1.6.2

func (k Keeper) UnsafeGetAllCoinsBack(ctx sdk.Context) (sdk.Coin, error)

Jump to

Keyboard shortcuts

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