keeper

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func NewBaseKeeper

func NewBaseKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	ak accountkeeper.AccountKeeper,
	blockedAddrs map[string]bool,
	authority string,
) Keeper

func (Keeper) BlockBeforeSend

func (k Keeper) BlockBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins) error

BlockBeforeSend executes the BlockBeforeSend hook if registered.

func (Keeper) SendCoins

func (k Keeper) 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. An error is returned upon failure.

func (Keeper) SendCoinsFromModuleToModule

func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error

SendCoinsFromModuleToManyAccounts transfers coins from a ModuleAccount to multiple AccAddresses. It will panic if the module account does not exist. An error is returned if the recipient address is black-listed or if sending the tokens fails.

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(bh customterratypes.BankHooks) *Keeper

Set the bank hooks

func (Keeper) TrackBeforeSend

func (k Keeper) TrackBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins)

TrackBeforeSend executes the TrackBeforeSend hook if registered.

type MultiBankHooks

type MultiBankHooks []customterratypes.BankHooks

MultiBankHooks combine multiple bank hooks, all hook functions are run in array sequence

func NewMultiBankHooks

func NewMultiBankHooks(hooks ...customterratypes.BankHooks) MultiBankHooks

NewMultiBankHooks takes a list of BankHooks and returns a MultiBankHooks

func (MultiBankHooks) BlockBeforeSend

func (h MultiBankHooks) BlockBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins) error

BlockBeforeSend runs the BlockBeforeSend hooks in order for each BankHook in a MultiBankHooks struct

func (MultiBankHooks) TrackBeforeSend

func (h MultiBankHooks) TrackBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins)

TrackBeforeSend runs the TrackBeforeSend hooks in order for each BankHook in a MultiBankHooks struct

Jump to

Keyboard shortcuts

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