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 ¶ added in v0.16.0
InitGenesis - store the genesis trend
func NewHandler ¶
NewHandler returns a handler for "cool" type messages.
func RegisterWire ¶ added in v0.16.0
Register concrete types on wire codec
Types ¶
type Genesis ¶ added in v0.16.0
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 ¶ added in v0.16.0
A message type to quiz how cool you are. these fields are can be entirely arbitrary and custom to your message
func NewMsgQuiz ¶ added in v0.16.0
New cool message
func (MsgQuiz) GetSignBytes ¶ added in v0.16.0
Get the bytes for the message signer to sign on
func (MsgQuiz) GetSigners ¶ added in v0.16.0
func (MsgQuiz) ValidateBasic ¶ added in v0.16.0
Validate Basic is used to quickly disqualify obviously invalid messages quickly
type MsgSetTrend ¶ added in v0.16.0
a really cool msg type, these fields are can be entirely arbitrary and custom to your message
func NewMsgSetTrend ¶ added in v0.16.0
func NewMsgSetTrend(sender sdk.Address, cool string) MsgSetTrend
new cool message
func (MsgSetTrend) GetSignBytes ¶ added in v0.16.0
func (msg MsgSetTrend) GetSignBytes() []byte
Get the bytes for the message signer to sign on
func (MsgSetTrend) GetSigners ¶ added in v0.16.0
func (msg MsgSetTrend) GetSigners() []sdk.Address
func (MsgSetTrend) String ¶ added in v0.16.0
func (msg MsgSetTrend) String() string
func (MsgSetTrend) ValidateBasic ¶ added in v0.16.0
func (msg MsgSetTrend) ValidateBasic() sdk.Error
Validate Basic is used to quickly disqualify obviously invalid messages quickly