Documentation ¶
Index ¶
- Constants
- Variables
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type Commit
- type GenesisState
- type MsgCommitSolution
- type MsgCreateScavenge
- type MsgRevealSolution
- type ParamSubspace
- type Params
- type QueryResScavenges
- type Scavenge
Constants ¶
const ( EventTypeCreateScavenge = "CreateScavenge" EventTypeCommitSolution = "CommitSolution" EventTypeSolveScavenge = "SolveScavenge" AttributeDescription = "description" AttributeSolution = "solution" AttributeSolutionHash = "solutionHash" AttributeReward = "reward" AttributeScavenger = "scavenger" AttributeSolutionScavengerHash = "solutionScavengerHash" AttributeValueCategory = ModuleName )
scavenge module event types
const ( // ModuleName is the name of the module ModuleName = "scavenge" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName QuerierRoute = ModuleName ScavengePrefix = "sk-" CommitPrefix = "ck-" )
const ( QueryListScavenges = "list" QueryGetScavenge = "get" QueryCommit = "commit" )
query endpoints supported by the nameservice Querier
const CommitSolutionConst = "CommitSolution"
CommitSolutionConst is CommitSolution Constant
const CreateScavengeConst = "CreateScavenge"
CreateScavengeConst is CreateScavenge Constant
const (
DefaultParamspace = ModuleName
)
Default parameter namespace
const RevealSolutionConst = "RevealSolution"
RevealSolutionConst is RevealSolution Constant
Variables ¶
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the scavenge genesis parameters
Types ¶
type Commit ¶
type Commit struct { Scavenger sdk.AccAddress `json:"scavenger" yaml:"scavenger"` // address of the scavenger scavenger SolutionHash string `json:"solutionHash" yaml:"solutionHash"` // SolutionHash of the scavenge SolutionScavengerHash string `json:"solutionScavengerHash" yaml:"solutionScavengerHash"` // solution hash of the scavenge }
Commit is the commit struct
type GenesisState ¶
type GenesisState struct { }
GenesisState - all scavenge 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 MsgCommitSolution ¶
type MsgCommitSolution struct { Scavenger sdk.AccAddress `json:"scavenger" yaml:"scavenger"` // address of the scavenger SolutionHash string `json:"solutionhash" yaml:"solutionhash"` // solutionhash of the scavenge SolutionScavengerHash string `json:"solutionScavengerHash" yaml:"solutionScavengerHash"` // solution hash of the scavenge }
MsgCommitSolution - struct for unjailing jailed validator
func NewMsgCommitSolution ¶
func NewMsgCommitSolution(scavenger sdk.AccAddress, solutionHash string, solutionScavengerHash string) MsgCommitSolution
NewMsgCommitSolution creates a new MsgCommitSolution instance
func (MsgCommitSolution) GetSignBytes ¶
func (msg MsgCommitSolution) GetSignBytes() []byte
GetSignBytes gets the bytes for the message signer to sign on
func (MsgCommitSolution) GetSigners ¶
func (msg MsgCommitSolution) GetSigners() []sdk.AccAddress
func (MsgCommitSolution) Type ¶
func (msg MsgCommitSolution) Type() string
func (MsgCommitSolution) ValidateBasic ¶
func (msg MsgCommitSolution) ValidateBasic() error
ValidateBasic validity check for the AnteHandler
type MsgCreateScavenge ¶
type MsgCreateScavenge struct { Creator sdk.AccAddress `json:"creator" yaml:"creator"` // address of the scavenger creator Description string `json:"description" yaml:"description"` // description of the scavenge SolutionHash string `json:"solutionHash" yaml:"solutionHash"` // solution hash of the scavenge Reward sdk.Coins `json:"reward" yaml:"reward"` // reward of the scavenger }
MsgCreateScavenge - struct for unjailing jailed validator
func NewMsgCreateScavenge ¶
func NewMsgCreateScavenge(creator sdk.AccAddress, description, solutionHash string, reward sdk.Coins) MsgCreateScavenge
NewMsgCreateScavenge creates a new MsgCreateScavenge instance
func (MsgCreateScavenge) GetSignBytes ¶
func (msg MsgCreateScavenge) GetSignBytes() []byte
GetSignBytes gets the bytes for the message signer to sign on
func (MsgCreateScavenge) GetSigners ¶
func (msg MsgCreateScavenge) GetSigners() []sdk.AccAddress
func (MsgCreateScavenge) Type ¶
func (msg MsgCreateScavenge) Type() string
func (MsgCreateScavenge) ValidateBasic ¶
func (msg MsgCreateScavenge) ValidateBasic() error
ValidateBasic validity check for the AnteHandler
type MsgRevealSolution ¶
type MsgRevealSolution struct { Scavenger sdk.AccAddress `json:"scavenger" yaml:"scavenger"` // address of the scavenger scavenger SolutionHash string `json:"solutionHash" yaml:"solutionHash"` // SolutionHash of the scavenge Solution string `json:"solution" yaml:"solution"` // solution of the scavenge }
MsgRevealSolution - struct for unjailing jailed validator
func NewMsgRevealSolution ¶
func NewMsgRevealSolution(scavenger sdk.AccAddress, solution string) MsgRevealSolution
NewMsgRevealSolution creates a new MsgRevealSolution instance
func (MsgRevealSolution) GetSignBytes ¶
func (msg MsgRevealSolution) GetSignBytes() []byte
GetSignBytes gets the bytes for the message signer to sign on
func (MsgRevealSolution) GetSigners ¶
func (msg MsgRevealSolution) GetSigners() []sdk.AccAddress
func (MsgRevealSolution) Type ¶
func (msg MsgRevealSolution) Type() string
func (MsgRevealSolution) ValidateBasic ¶
func (msg MsgRevealSolution) ValidateBasic() error
ValidateBasic validity check for the AnteHandler
type ParamSubspace ¶
type ParamSubspace interface { WithKeyTable(table params.KeyTable) params.Subspace Get(ctx sdk.Context, key []byte, ptr interface{}) GetParamSet(ctx sdk.Context, ps params.ParamSet) SetParamSet(ctx sdk.Context, ps params.ParamSet) }
ParamSubspace defines the expected Subspace interfacace
type Params ¶
type Params struct { }
Params - used for initializing default parameter for scavenge at genesis
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
ParamSetPairs - Implements params.ParamSet
type QueryResScavenges ¶
type QueryResScavenges []string
QueryResScavenges Queries Result Payload for a names query
type Scavenge ¶
type Scavenge struct { Creator sdk.AccAddress `json:"creator" yaml:"creator"` // address of the scavenger creator Description string `json:"description" yaml:"description"` // description of the scavenge SolutionHash string `json:"solutionHash" yaml:"solutionHash"` // solution hash of the scavenge Reward sdk.Coins `json:"reward" yaml:"reward"` // reward of the scavenger Solution string `json:"solution" yaml:"solution"` // the solution to the scagenve Scavenger sdk.AccAddress `json:"scavenger" yaml:"scavenger"` // the scavenger who found the solution }
Scavenge is the Scavenge struct