keeper

package
v0.0.0-...-83b756d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	QueryResolve = "resolve"
	QueryWhois   = "whois"
	QueryNames   = "names"
)

query endpoints supported by the haytservice 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 {
	CoinKeeper bank.Keeper
	// contains filtered or unexported fields
}

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

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates new instances of the haytservice Keeper

func (Keeper) DeleteWhois

func (k Keeper) DeleteWhois(ctx sdk.Context, hayt string)

Deletes the entire Whois metadata struct for a name

func (Keeper) GetNamesIterator

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

Get an iterator over all hayts in which the keys are the hayts and the values are the whois

func (Keeper) GetOwner

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

GetOwner - get the current owner of a hayt

func (Keeper) GetPrice

func (k Keeper) GetPrice(ctx sdk.Context, hayt string) sdk.Coins

GetPrice - gets the current price of a hayt

func (Keeper) GetWhois

func (k Keeper) GetWhois(ctx sdk.Context, hayt string) types.Whois

Gets the entire Whois metadata struct for a name

func (Keeper) HasOwner

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

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

func (Keeper) IsNamePresent

func (k Keeper) IsNamePresent(ctx sdk.Context, hayt string) bool

Check if the name is present in the store or not

func (Keeper) ResolveName

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

ResolveName - returns the string that the hayt resolves to

func (Keeper) SetHayt

func (k Keeper) SetHayt(ctx sdk.Context, hayt string, value string)

SetHayt - sets the value string that a hayt resolves to

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, hayt string, owner sdk.AccAddress)

SetOwner - sets the current owner of a hayt

func (Keeper) SetPrice

func (k Keeper) SetPrice(ctx sdk.Context, hayt string, price sdk.Coins)

SetPrice - sets the current price of a hayt

func (Keeper) SetWhois

func (k Keeper) SetWhois(ctx sdk.Context, hayt string, whois types.Whois)

Sets the entire Whois metadata struct for a name

Jump to

Keyboard shortcuts

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