Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) BlockBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins) error
- func (k Keeper) DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error
- func (k Keeper) InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
- func (k Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
- func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
- func (k *Keeper) SetHooks(bh customterratypes.BankHooks) *Keeper
- func (k Keeper) TrackBeforeSend(ctx sdk.Context, from, to sdk.AccAddress, amount sdk.Coins)
- func (k Keeper) UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error
- type MultiBankHooks
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 ¶
BlockBeforeSend executes the BlockBeforeSend hook if registered.
func (Keeper) DelegateCoins ¶
func (k Keeper) DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error
DelegateCoins performs delegation by deducting amt coins from an account with address addr. For vesting accounts, delegations amounts are tracked for both vesting and vested coins. The coins are then transferred from the delegator address to a ModuleAccount address. If any of the delegation amounts are negative, an error is returned.
func (Keeper) InputOutputCoins ¶
func (k Keeper) InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
InputOutputCoins performs multi-send functionality. It accepts a series of inputs that correspond to a series of outputs. It returns an error if the inputs and outputs don't line up or if any single transfer of tokens fails.
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 ¶
TrackBeforeSend executes the TrackBeforeSend hook if registered.
func (Keeper) UndelegateCoins ¶
func (k Keeper) UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error
UndelegateCoins performs undelegation by crediting amt coins to an account with address addr. For vesting accounts, undelegation amounts are tracked for both vesting and vested coins. The coins are then transferred from a ModuleAccount address to the delegator address. If any of the undelegation amounts are negative, an error is returned.
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