keeper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// query balance path
	QueryBalance      = "balances"
	QueryBulkBalances = "bulk_balances"
)

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier returns a new sdk.Keeper instance.

Types

type Hooks

type Hooks struct {
	// contains filtered or unexported fields
}

Hooks wrapper struct for safety box keeper

type Keeper

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

func NewKeeper

func NewKeeper(bk types.BankKeeper, storeKey sdk.StoreKey) Keeper

func (Keeper) BlacklistAccountAction

func (keeper Keeper) BlacklistAccountAction(ctx sdk.Context, addr sdk.AccAddress, action string)

func (Keeper) BlacklistedAddr

func (keeper Keeper) BlacklistedAddr(creator sdk.AccAddress) bool

func (Keeper) GetCoins

func (keeper Keeper) GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

GetCoins returns the coins at the addr.

func (Keeper) HasCoins

func (keeper Keeper) HasCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) bool

HasCoins returns whether or not an account has at least amt coins.

func (Keeper) Hooks

func (keeper Keeper) Hooks() *Hooks

Return the wrapper struct

func (Keeper) InputOutputCoins

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

InputOutputCoins handles a list of inputs and outputs

func (Keeper) IsBlacklistedAccountAction

func (keeper Keeper) IsBlacklistedAccountAction(ctx sdk.Context, addr sdk.AccAddress, action string) bool

func (Keeper) SendCoins

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

SendCoins moves coins from one account to another

type TestInput

type TestInput struct {
	Cdc *codec.Codec
	Ctx sdk.Context
	K   Keeper
	Ak  auth.AccountKeeper
	Pk  params.Keeper
}

func SetupTestInput

func SetupTestInput() TestInput

Jump to

Keyboard shortcuts

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