keeper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Keeper

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

Keeper defines the faucet Keeper.

func NewKeeper

func NewKeeper(
	cdc *codec.Codec, storeKey sdk.StoreKey, supplyKeeper types.SupplyKeeper,
) Keeper

NewKeeper creates a new faucet Keeper instance.

func (Keeper) Fund

func (k Keeper) Fund(ctx sdk.Context, amount sdk.Coins, recipient sdk.AccAddress) error

Fund checks for timeout and max thresholds and then mints coins and transfers coins to the recipient.

func (Keeper) GetCap

func (k Keeper) GetCap(ctx sdk.Context) sdk.Int

func (Keeper) GetFaucetAccount

func (k Keeper) GetFaucetAccount(ctx sdk.Context) supplyexported.ModuleAccountI

GetFaucetAccount returns the faucet ModuleAccount

func (Keeper) GetFunded

func (k Keeper) GetFunded(ctx sdk.Context) sdk.Coins

func (Keeper) GetMaxPerRequest

func (k Keeper) GetMaxPerRequest(ctx sdk.Context) sdk.Int

func (Keeper) GetTimeout

func (k Keeper) GetTimeout(ctx sdk.Context) time.Duration

func (Keeper) IsEnabled

func (k Keeper) IsEnabled(ctx sdk.Context) bool

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) SetCap

func (k Keeper) SetCap(ctx sdk.Context, cap sdk.Int)

func (Keeper) SetEnabled

func (k Keeper) SetEnabled(ctx sdk.Context, enabled bool)

func (Keeper) SetFunded

func (k Keeper) SetFunded(ctx sdk.Context, funded sdk.Coins)

func (Keeper) SetMaxPerRequest

func (k Keeper) SetMaxPerRequest(ctx sdk.Context, maxPerReq sdk.Int)

func (Keeper) SetTimout

func (k Keeper) SetTimout(ctx sdk.Context, timeout time.Duration)

Jump to

Keyboard shortcuts

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