Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "greeter" // StoreKey is used to register the module's store StoreKey = ModuleName )
const RouterKey = "greeter"
RouterKey is used to route messages and queriers to the greeter module
Variables ¶
var ( // ModuleCdc contains the types for the module that require encoding in amino ModuleCdc = codec.New() )
Functions ¶
This section is empty.
Types ¶
type Greeting ¶
type Greeting struct { Sender sdk.AccAddress `json:"sender" yaml:"sender"` // address of the account "sending" the greeting Recipient sdk.AccAddress `json:"receiver" yaml:"receiver"` // address of the account "receiving" the greeting Body string `json:"body" yaml:"body"` // string body of the greeting }
struct containing the data of the Greeting. json and yaml tags are used to specify field names when marshalled to json
func NewGreeting ¶
func NewGreeting(sender sdk.AccAddress, body string, receiver sdk.AccAddress) Greeting
NewGreeting Returns a new Greeting
type GreetingsList ¶
type GreetingsList []Greeting
GreetingsList stores all the greeting for a given address
type MsgGreet ¶
type MsgGreet struct { Body string // content of the greeting Sender sdk.AccAddress // account signing and sending the greeting Recipient sdk.AccAddress // account designated as recipient of the greeeting (not a signer) }
MsgGreet defines the MsgGreet Message
func NewMsgGreet ¶
func NewMsgGreet(sender sdk.AccAddress, body string, recipient sdk.AccAddress) MsgGreet
NewMsgGreet is a constructor function for MsgGreet
func (MsgGreet) GetSignBytes ¶
GetSignBytes encodes the message for signing
func (MsgGreet) GetSigners ¶
func (msg MsgGreet) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of those required to sign the message
func (MsgGreet) ValidateBasic ¶
ValidateBasic runs stateless checks on the message
type QueryResGreetings ¶
QueryResGreetings defines the response to our Querier, containing greetings for a given address
func NewQueryResGreetings ¶
func NewQueryResGreetings() QueryResGreetings
NewQueryResGreetings constructs a new instance
func (QueryResGreetings) String ¶
func (q QueryResGreetings) String() string