types

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
const (
	AttributeValueCategory = ModuleName
)

regulator module event types

View Source
const (
	DefaultParamspace = ModuleName
)

Default parameter namespace

View Source
const (
	// TODO: Describe query parameters, update <action> with your query
	// Query<Action>    = "<action>"
	QueryParams = "queryParams"
)

Query endpoints supported by the regulator querier

Variables

View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

View Source
var (
	RegulatorKey = []byte{0x61} // prefix for each key to a Regualtor
)

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for regulator module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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 NewParams

func NewParams() Params

NewParams creates a new Params object

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL