keeper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

creates a querier for legacy rest endpoints

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler,
	storeKey sdk.StoreKey,
	params paramtypes.Subspace,
	bankKeeper types.BankKeeper,
) Keeper

func (*Keeper) AlreadySwapped

func (k *Keeper) AlreadySwapped(ctx sdk.Context, txHash string) bool

AlreadySwapped returns true if tx hash has existed

func (*Keeper) GetParams

func (k *Keeper) GetParams(ctx sdk.Context) types.Params

func (Keeper) GetSwap

func (k Keeper) GetSwap(ctx sdk.Context, txHash string) (swap types.Tokenswap, err error)

GetSwap returns a tokenswap item by tx hash

func (Keeper) Logger

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

func (*Keeper) SetParams

func (k *Keeper) SetParams(ctx sdk.Context, params types.Params)

func (Keeper) SetSwap

func (k Keeper) SetSwap(ctx sdk.Context, swap types.Tokenswap)

SetSwap stores a tokenswap item with tx hash as a key

func (*Keeper) Signer

func (k *Keeper) Signer(ctx sdk.Context) (signer string)

Signer returns authorized signer

func (*Keeper) Store

func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore

func (Keeper) Swap

func (k Keeper) Swap(ctx sdk.Context, swap types.Tokenswap) error

Swap processes a tokenswap by mint tokens and send them to proper receiver

func (*Keeper) Swappable

func (k *Keeper) Swappable(ctx sdk.Context) (swappable bool)

Swappable returns the tokenswap is enabled or not

type Querier

type Querier struct {
	Keeper
}

func (Querier) Params

Params queries the parameters of tokenswap

func (Querier) Tokenswap

Tokenswap queries a tokenswap item by tx hash

Jump to

Keyboard shortcuts

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