keeper

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState)

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

func TokenKey

func TokenKey(symbol types.Symbol) []byte

Types

type Keeper

type Keeper interface {
	Codec() *codec.Codec
	SetToken(ctx sdk.Context, symbol types.Symbol, token types.Token)
	GetToken(ctx sdk.Context, symbol types.Symbol) types.Token
	ListTokens(ctx sdk.Context) []types.Symbol
}

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(storeKey sdk.StoreKey, cdc *codec.Codec, bankKeeper types.BankKeeper) Keeper

NewKeeper creates a new instance of the token Keeper

Jump to

Keyboard shortcuts

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