keeper

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseKeeper

type BaseKeeper struct {
	bankkeeper.BaseKeeper
	// contains filtered or unexported fields
}

func NewBaseKeeper

func NewBaseKeeper(
	cdc codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace,
	blockedAddr map[string]bool, deactMultiSend bool,
) BaseKeeper

func (BaseKeeper) AddToInactiveAddr

func (keeper BaseKeeper) AddToInactiveAddr(ctx sdk.Context, address sdk.AccAddress)

AddToInactiveAddr adds the address to `inactiveAddr`.

func (BaseKeeper) DeleteFromInactiveAddr

func (keeper BaseKeeper) DeleteFromInactiveAddr(ctx sdk.Context, address sdk.AccAddress)

DeleteFromInactiveAddr removes the address from `inactiveAddr`.

func (BaseKeeper) InitializeBankPlus

func (keeper BaseKeeper) InitializeBankPlus(ctx sdk.Context)

func (BaseKeeper) InputOutputCoins

func (keeper BaseKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input, outputs []types.Output) error

func (BaseKeeper) IsInactiveAddr

func (keeper BaseKeeper) IsInactiveAddr(address sdk.AccAddress) bool

IsInactiveAddr returns if the address is added in inactiveAddr.

func (BaseKeeper) SendCoins

func (keeper BaseKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

SendCoins transfers amt coins from a sending account to a receiving account. This is wrapped bank the `SendKeeper` interface of `bank` module, and checks if `toAddr` is a inactiveAddr managed by the module.

func (BaseKeeper) SendCoinsFromAccountToModule

func (keeper BaseKeeper) SendCoinsFromAccountToModule(
	ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins,
) error

SendCoinsFromAccountToModule transfers coins from an AccAddress to a ModuleAccount. It will panic if the module account does not exist.

func (BaseKeeper) SendCoinsFromModuleToAccount

func (keeper BaseKeeper) SendCoinsFromModuleToAccount(
	ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins,
) error

SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an AccAddress. It will panic if the module account does not exist.

func (BaseKeeper) SendCoinsFromModuleToModule

func (keeper BaseKeeper) SendCoinsFromModuleToModule(
	ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins,
) error

SendCoinsFromModuleToModule transfers coins from a ModuleAccount to another. It will panic if either module account does not exist.

type Keeper

type Keeper interface {
	bankkeeper.Keeper

	AddToInactiveAddr(ctx sdk.Context, address sdk.AccAddress)
	DeleteFromInactiveAddr(ctx sdk.Context, address sdk.AccAddress)
	IsInactiveAddr(address sdk.AccAddress) bool

	InitializeBankPlus(ctx sdk.Context)
}

Jump to

Keyboard shortcuts

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