keeper

package
v0.0.2-0...-13a971e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QuerySymbols = "symbols"
	QueryToken   = "token"
)

query endpoints supported by the assetmanagement Querier

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Keeper

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

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,
	ak auth.AccountKeeper,
	sk supply.Keeper,
	paramstore subspace.Subspace,
	codespace sdk.CodespaceType,
) Keeper

NewKeeper creates new instances of the assetmanagement Keeper

func (Keeper) BurnCoins

func (k Keeper) BurnCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int, denom string) sdk.Result

func (Keeper) FreezeCoins

func (k Keeper) FreezeCoins(ctx sdk.Context, from sdk.AccAddress, address sdk.AccAddress, amount sdk.Int, denom string) sdk.Result

func (Keeper) GetNomineeParams

func (k Keeper) GetNomineeParams(ctx sdk.Context) []string

GetNomineeParams get nominee params from store

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, symbol string) (sdk.AccAddress, error)

GetOwner - get the current owner of a symbol

func (Keeper) GetParams

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

GetParams gets params from the store

func (Keeper) GetToken

func (k Keeper) GetToken(ctx sdk.Context, symbol string) (*types.Token, error)

GetToken gets the entire Token metadata struct by symbol. False if not found, true otherwise

func (Keeper) GetTokensIterator

func (k Keeper) GetTokensIterator(ctx sdk.Context) sdk.Iterator

GetTokensIterator - Get an iterator over all symbols in which the keys are the symbols and the values are the token

func (Keeper) HasOwner

func (k Keeper) HasOwner(ctx sdk.Context, symbol string) (bool, error)

HasOwner - returns whether or not the symbol already has an owner

func (Keeper) IsNominee

func (k Keeper) IsNominee(ctx sdk.Context, nominee string) bool

func (Keeper) IsSymbolPresent

func (k Keeper) IsSymbolPresent(ctx sdk.Context, symbol string) bool

IsSymbolPresent - Check if the symbol is present in the store or not

func (Keeper) IssueToken

func (k Keeper) IssueToken(ctx sdk.Context, nominee, owner sdk.AccAddress, token types.Token) sdk.Result

func (Keeper) MintCoins

func (k Keeper) MintCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int, denom string) sdk.Result

func (Keeper) ResolveName

func (k Keeper) ResolveName(ctx sdk.Context, symbol string) (string, error)

ResolveName - returns the name string that the symbol resolves to

func (Keeper) SetName

func (k Keeper) SetName(ctx sdk.Context, owner sdk.Address, symbol string, name string) error

SetName - sets the name string that a symbol resolves to

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, owner sdk.Address, symbol string, newOwner sdk.AccAddress) error

SetOwner - sets the current owner of a symbol

func (Keeper) SetParams

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

SetParams updates params in the store

func (Keeper) SetToken

func (k Keeper) SetToken(ctx sdk.Context, owner sdk.Address, symbol string, token *types.Token) error

SetToken sets the entire Token metadata struct by symbol. Owner must be set. Returns success

func (Keeper) UnfreezeCoins

func (k Keeper) UnfreezeCoins(ctx sdk.Context, from sdk.AccAddress, address sdk.AccAddress, amount sdk.Int, denom string) sdk.Result

Jump to

Keyboard shortcuts

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