types

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace     sdk.CodespaceType = ModuleName
	CodeNameDoesNotExist sdk.CodeType      = 101
)

DefaultCodespace is the Module Hayt

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "haytservice"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const RouterKey = ModuleName // this was defined in your key.go file

RouterKey is the module name router key

Variables

View Source
var MinHaytPrice = sdk.Coins{sdk.NewInt64Coin("verotoken", 1)}

MinHaytPrice is Initial Starting Price for a Hayt that was never previously owned

View Source
var ModuleCdc = codec.New()

ModuleCdc is the codec for the module

Functions

func ErrNameDoesNotExist

func ErrNameDoesNotExist(codespace sdk.CodespaceType) sdk.Error

ErrNameDoesNotExist is the error for name not existing

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type GenesisState

type GenesisState struct {
	WhoisRecords []Whois `json:"whois_records"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func NewGenesisState

func NewGenesisState(whoIsRecords []Whois) GenesisState

type MsgBuyHayt

type MsgBuyHayt struct {
	Hayt          string         `json:"hayt"`
	Bid           sdk.Coins      `json:"bid"`
	Buyer         sdk.AccAddress `json:"buyer"`
	HaytOwnerName string         `json:"haytownername"`
}

MsgBuyHayt defines the BuyHayt message

func NewMsgBuyHayt

func NewMsgBuyHayt(hayt string, bid sdk.Coins, buyer sdk.AccAddress, haytownername string) MsgBuyHayt

NewMsgBuyHayt is the constructor function for MsgBuyHayt

func (MsgBuyHayt) GetSignBytes

func (msg MsgBuyHayt) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgBuyHayt) GetSigners

func (msg MsgBuyHayt) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgBuyHayt) Route

func (msg MsgBuyHayt) Route() string

Route should return the name of the module

func (MsgBuyHayt) Type

func (msg MsgBuyHayt) Type() string

Type should return the action

func (MsgBuyHayt) ValidateBasic

func (msg MsgBuyHayt) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgDeleteHayt

type MsgDeleteHayt struct {
	Hayt          string         `json:"hayt"`
	Owner         sdk.AccAddress `json:"owner"`
	HaytOwnerName string         `json:"haytownername"`
}

MsgDeleteHayt defines a DeleteHayt message

func NewMsgDeleteHayt

func NewMsgDeleteHayt(hayt string, owner sdk.AccAddress, haytownername string) MsgDeleteHayt

NewMsgDeleteHayt is a constructor function for MsgDeleteHayt

func (MsgDeleteHayt) GetSignBytes

func (msg MsgDeleteHayt) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgDeleteHayt) GetSigners

func (msg MsgDeleteHayt) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgDeleteHayt) Route

func (msg MsgDeleteHayt) Route() string

Route should return the name of the module

func (MsgDeleteHayt) Type

func (msg MsgDeleteHayt) Type() string

Type should return the action

func (MsgDeleteHayt) ValidateBasic

func (msg MsgDeleteHayt) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type MsgSetHayt

type MsgSetHayt struct {
	Hayt          string         `json:"hayt"`
	Value         string         `json:"value"`
	Owner         sdk.AccAddress `json:"owner"`
	HaytOwnerName string         `json:"haytownername"`
}

MsgSetHayt defines a SetHayt message

func NewMsgSetHayt

func NewMsgSetHayt(hayt string, value string, owner sdk.AccAddress, haytownername string) MsgSetHayt

NewMsgSetHayt is a constructor function for MsgSetHayt

func (MsgSetHayt) GetSignBytes

func (msg MsgSetHayt) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgSetHayt) GetSigners

func (msg MsgSetHayt) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgSetHayt) Route

func (msg MsgSetHayt) Route() string

// Route should return the name of the module func (msg MsgSetName) Route() string { return RouterKey }

Route should return the name of the module

func (MsgSetHayt) Type

func (msg MsgSetHayt) Type() string

Type should return the action

func (MsgSetHayt) ValidateBasic

func (msg MsgSetHayt) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type QueryResHayts

type QueryResHayts []string

QueryResHayts Queries Result Payload for a names query

func (QueryResHayts) String

func (n QueryResHayts) String() string

implement fmt.Stringer

type QueryResResolve

type QueryResResolve struct {
	Value string `json:"value"`
}

QueryResResolve Queries Result Payload for a resolve query

func (QueryResResolve) String

func (r QueryResResolve) String() string

implement fmt.Stringer

type Whois

type Whois struct {
	Value         string         `json:"value"`
	Owner         sdk.AccAddress `json:"owner"`
	Price         sdk.Coins      `json:"price"`
	HaytOwnerName string         `json:"haytownername"`
}

Whois is a struct that contains all the metadata of a Hayt

func NewWhois

func NewWhois() Whois

NewWhois returns a new Whois with the minprice as the price

func (Whois) String

func (w Whois) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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