Documentation ¶
Index ¶
Constants ¶
const ( // Cool module reserves error 400-499 lawl CodeIncorrectCoolAnswer sdk.CodeType = 400 )
Variables ¶
This section is empty.
Functions ¶
func ErrIncorrectCoolAnswer ¶
ErrIncorrectCoolAnswer - Error returned upon an incorrect guess
func NewHandler ¶
NewHandler returns a handler for "cool" type messages.
Types ¶
type CoolGenesis ¶
type CoolGenesis 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 NewKeeper ¶
func NewKeeper(key sdk.StoreKey, bankKeeper bank.CoinKeeper) Keeper
NewKeeper - Returns the Keeper
func (Keeper) CheckTrend ¶
CheckTrend - Returns true or false based on whether guessedTrend is currently cool or not
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data CoolGenesis) error
InitGenesis - store the genesis trend
type QuizMsg ¶
A message type to quiz how cool you are. these fields are can be entirely arbitrary and custom to your message
func NewQuizMsg ¶
New cool message
func (QuizMsg) GetSignBytes ¶
Get the bytes for the message signer to sign on
func (QuizMsg) GetSigners ¶
func (QuizMsg) ValidateBasic ¶
Validate Basic is used to quickly disqualify obviously invalid messages quickly
type SetTrendMsg ¶
A really cool msg type, these fields are can be entirely arbitrary and custom to your message
func NewSetTrendMsg ¶
func NewSetTrendMsg(sender sdk.Address, cool string) SetTrendMsg
New cool message
func (SetTrendMsg) Get ¶
func (msg SetTrendMsg) Get(key interface{}) (value interface{})
func (SetTrendMsg) GetSignBytes ¶
func (msg SetTrendMsg) GetSignBytes() []byte
Get the bytes for the message signer to sign on
func (SetTrendMsg) GetSigners ¶
func (msg SetTrendMsg) GetSigners() []sdk.Address
func (SetTrendMsg) String ¶
func (msg SetTrendMsg) String() string
func (SetTrendMsg) ValidateBasic ¶
func (msg SetTrendMsg) ValidateBasic() sdk.Error
Validate Basic is used to quickly disqualify obviously invalid messages quickly