Documentation
¶
Index ¶
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "regulator" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierRoute to be used for querier msgs QuerierRoute = ModuleName )
const (
AttributeValueCategory = ModuleName
)
regulator module event types
const (
DefaultParamspace = ModuleName
)
Default parameter namespace
const ( // TODO: Describe query parameters, update <action> with your query // Query<Action> = "<action>" QueryParams = "queryParams" )
Query endpoints supported by the regulator querier
Variables ¶
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
var (
RegulatorKey = []byte{0x61} // prefix for each key to a Regualtor
)
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the regulator genesis parameters
Types ¶
type GenesisState ¶
type GenesisState struct { }
GenesisState - all regulator 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 MsgCreateRegualtor ¶
type MsgCreateRegualtor struct { Address sdk.AccAddress `json:"address"` Owner sdk.AccAddress `json:"owner"` }
Vote messages
func NewMsgCreateRegualtor ¶
func NewMsgCreateRegualtor(address sdk.AccAddress, owner sdk.AccAddress) MsgCreateRegualtor
func (MsgCreateRegualtor) GetSignBytes ¶
func (msg MsgCreateRegualtor) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgCreateRegualtor) GetSigners ¶
func (msg MsgCreateRegualtor) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgCreateRegualtor) Route ¶
func (msg MsgCreateRegualtor) Route() string
Route should return the name of the module
func (MsgCreateRegualtor) Type ¶
func (msg MsgCreateRegualtor) Type() string
Type should return the action
func (MsgCreateRegualtor) ValidateBasic ¶
func (msg MsgCreateRegualtor) ValidateBasic() error
ValidateBasic runs stateless checks on the message
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 interfcace
type Params ¶
type Params struct { }
Params - used for initializing default parameter for regulator 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 Regulator ¶
type Regulator struct {
Address sdk.AccAddress `json:"address"`
}
DidDocument is the data model defined by w3c
func NewRegulator ¶
func NewRegulator(address sdk.AccAddress) Regulator