types

package
v0.0.0-...-0407c5b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

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

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for querier msgs
	QuerierRoute = ModuleName
)
View Source
const (
	AttributeValueCategory = ModuleName
)

copyrightedphrases module event types

View Source
const (
	CopyrightedTextPrefix = "copyrightedText-"
)
View Source
const (
	DefaultParamspace = ModuleName
)

Default parameter namespace

View Source
const QueryGetCopyrightedText = "get-copyrighted-text"
View Source
const QueryListCopyrightedText = "list-copyrighted-texts"

Variables

View Source
var (
	ErrNameDoesNotExist   = sdkerrors.Register(ModuleName, 1, "name does not exist")
	ErrAlreadyCopyrighted = sdkerrors.Register(ModuleName, 2, "text already copyrighted")
)
View Source
var MinNamePrice = sdk.Coins{sdk.NewInt64Coin("nametoken", 1)}

MinNamePrice is Initial Starting Price for a name that was never previously owned

View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for copyrightedphrases module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the copyrightedphrases genesis parameters

Types

type GenesisState

type GenesisState struct {
	CopyrightedTextRecords []Texts `json:"copyrighted_text_records"`
}

GenesisState - all copyrightedphrases state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState - default GenesisState used by Cosmos Hub

func NewGenesisState

func NewGenesisState() GenesisState

NewGenesisState creates a new GenesisState object

type MsgDeleteText

type MsgDeleteText struct {
	Text  string         `json:"text" yaml:"text"`
	Owner sdk.AccAddress `json:"owner" yaml:"owner"`
}

func NewMsgDeleteCopyrightedText

func NewMsgDeleteCopyrightedText(text string, owner sdk.AccAddress) MsgDeleteText

func (MsgDeleteText) GetSignBytes

func (msg MsgDeleteText) GetSignBytes() []byte

func (MsgDeleteText) GetSigners

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

func (MsgDeleteText) Route

func (msg MsgDeleteText) Route() string

func (MsgDeleteText) Type

func (msg MsgDeleteText) Type() string

func (MsgDeleteText) ValidateBasic

func (msg MsgDeleteText) ValidateBasic() error

type MsgRegisterText

type MsgRegisterText struct {
	Text  string         `json:"text"`
	Owner sdk.AccAddress `json:"owner"`
}

MsgRegisterText defines the RegisterText message

func NewMsgRegisterText

func NewMsgRegisterText(text string, owner sdk.AccAddress) MsgRegisterText

NewMsgRegisterText is the constructor function for MsgRegisterText

func (MsgRegisterText) GetSignBytes

func (msg MsgRegisterText) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgRegisterText) GetSigners

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

GetSigners defines whose signature is required

func (MsgRegisterText) Route

func (msg MsgRegisterText) Route() string

Route should return the name of the module

func (MsgRegisterText) Type

func (msg MsgRegisterText) Type() string

Type should return the action

func (MsgRegisterText) ValidateBasic

func (msg MsgRegisterText) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type Params

type Params struct{}

Params - used for initializing default parameter for copyrightedphrases at genesis

func DefaultParams

func DefaultParams() Params

DefaultParams defines the parameters for this module

func NewParams

func NewParams() Params

NewParams creates a new Params object

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

type QueryResNames

type QueryResNames []string

QueryResNames Queries Result Payload for a names query

func (QueryResNames) String

func (n QueryResNames) 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 Texts

type Texts struct {
	Value string         `json:"value" yaml:"value"`
	Owner sdk.AccAddress `json:"owner" yaml:"owner"`
	Block int64          `json:"block" yaml:"block"`
}

func (Texts) String

func (w Texts) String() string

implement fmt.Stringer

Jump to

Keyboard shortcuts

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