keeper

package
v1.5.22 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 9 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 {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, ak account.AccountKeeper, maccPerms map[string][]string) Keeper

func (Keeper) BurnCoins

func (k Keeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

func (Keeper) DelegateCoinsFromAccountToModule

func (k Keeper) DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string,
	amt sdk.Coin) error

func (Keeper) GetDenomMetaData

func (k Keeper) GetDenomMetaData(ctx sdk.Context, denom string) types.Metadata

GetDenomMetaData retrieves the denomination metadata

func (Keeper) GetModuleAccount

func (k Keeper) GetModuleAccount(ctx sdk.Context, moduleName string) exported.ModuleAccountI

func (Keeper) GetModuleAccountAndPermissions

func (k Keeper) GetModuleAccountAndPermissions(ctx sdk.Context, moduleName string) (exported.ModuleAccountI, []string)

func (Keeper) GetModuleAddress

func (k Keeper) GetModuleAddress(moduleName string) sdk.AccAddress

GetModuleAddress returns an address based on the module name

func (Keeper) GetModuleAddressAndPermissions

func (k Keeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.AccAddress, permissions []string)

func (Keeper) GetSupply

func (k Keeper) GetSupply(ctx sdk.Context) (supply exported.SupplyI)

GetSupply retrieves the Supply from store

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MintCoins

func (k Keeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

MintCoins creates new coins from thin air and adds it to the module account. It will panic if the module account does not exist or is unauthorized.

func (Keeper) SendCoins

func (k Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

func (Keeper) SendCoinsFromAccountToModule

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

SendCoinsFromAccountToModule transfers coins from an AccAddress to a ModuleAccount

func (Keeper) SendCoinsFromModuleToAccount

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

SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an AccAddress

func (Keeper) SendCoinsFromModuleToModule

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

func (Keeper) SetModuleAccount

func (k Keeper) SetModuleAccount(ctx sdk.Context, macc exported.ModuleAccountI)

func (Keeper) SetSupply

func (k Keeper) SetSupply(ctx sdk.Context, supply exported.SupplyI)

SetSupply sets the Supply to store

func (Keeper) UndelegateCoinsFromModuleToAccount

func (k Keeper) UndelegateCoinsFromModuleToAccount(
	ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coin,
) error

UndelegateCoinsFromModuleToAccount undelegates the unbonding coins and transfers them from a module account to the delegator account. It will panic if the module account does not exist or is unauthorized.

func (Keeper) ValidatePermissions

func (k Keeper) ValidatePermissions(macc exported.ModuleAccountI) error

ValidatePermissions validates that the module account has been granted permissions within its set of allowed permissions.

Jump to

Keyboard shortcuts

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