Documentation ¶
Index ¶
Constants ¶
const ( DefaultCodespace sdk.CodespaceType = 6 // Cool module reserves error 400-499 lawl CodeIncorrectCoolAnswer sdk.CodeType = 400 )
Cool errors reserve 400 ~ 499.
Variables ¶
This section is empty.
Functions ¶
func ErrIncorrectCoolAnswer ¶
func ErrIncorrectCoolAnswer(codespace sdk.CodespaceType, answer string) sdk.Error
ErrIncorrectCoolAnswer - Error returned upon an incorrect guess
func InitGenesis ¶
InitGenesis - store the genesis trend
func NewHandler ¶
NewHandler returns a handler for "cool" type messages.
Types ¶
type Genesis ¶
type Genesis struct {
Trend string `json:"trend"`
}
genesis state - specify genesis trend
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper - handlers sets/gets of custom variables for your module
func (Keeper) CheckTrend ¶
CheckTrend - Returns true or false based on whether guessedTrend is currently cool or not
type MsgQuiz ¶
type MsgQuiz struct { Sender sdk.AccAddress CoolAnswer string }
A message type to quiz how cool you are. these fields are can be entirely arbitrary and custom to your message
func NewMsgQuiz ¶
func NewMsgQuiz(sender sdk.AccAddress, coolerthancool string) MsgQuiz
New cool message
func (MsgQuiz) GetSignBytes ¶
Get the bytes for the message signer to sign on
func (MsgQuiz) GetSigners ¶
func (msg MsgQuiz) GetSigners() []sdk.AccAddress
func (MsgQuiz) ValidateBasic ¶
Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgSetTrend ¶
type MsgSetTrend struct { Sender sdk.AccAddress Cool string }
a really cool msg type, these fields are can be entirely arbitrary and custom to your message
func NewMsgSetTrend ¶
func NewMsgSetTrend(sender sdk.AccAddress, cool string) MsgSetTrend
new cool message
func (MsgSetTrend) GetSignBytes ¶
func (msg MsgSetTrend) GetSignBytes() []byte
Get the bytes for the message signer to sign on
func (MsgSetTrend) GetSigners ¶
func (msg MsgSetTrend) GetSigners() []sdk.AccAddress
func (MsgSetTrend) String ¶
func (msg MsgSetTrend) String() string
func (MsgSetTrend) ValidateBasic ¶
func (msg MsgSetTrend) ValidateBasic() sdk.Error
Validate Basic is used to quickly disqualify obviously invalid messages quickly