types

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeInvariant = "invariant"

	AttributeValueCrisis = ModuleName
	AttributeKeyRoute    = "route"
)

crisis module event types

View Source
const (
	DefaultParamspace = ModuleName
)

Default parameter namespace

View Source
const (
	// module name
	ModuleName = "crisis"
)

Variables

View Source
var (
	ErrNoSender         = sdkerrors.Register(ModuleName, 1, "sender address is empty")
	ErrUnknownInvariant = sdkerrors.Register(ModuleName, 2, "unknown invariant")
)

x/crisis module sentinel errors

View Source
var ModuleCdc *codec.Codec

ModuleCdc is a generic sealed codec to be used throughout module

View Source
var (
	// key for constant fee parameter
	ParamStoreKeyConstantFee = []byte("ConstantFee")
)

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

type declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register concrete types on codec codec

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis - validate crisis genesis data

Types

type GenesisState

type GenesisState struct {
	ConstantFee sdk.Coin `json:"constant_fee" yaml:"constant_fee"`
}

GenesisState - crisis genesis state

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(constantFee sdk.Coin) GenesisState

NewGenesisState creates a new GenesisState object

type InvarRoute

type InvarRoute struct {
	ModuleName string
	Route      string
	Invar      sdk.Invariant
}

invariant route

func NewInvarRoute

func NewInvarRoute(moduleName, route string, invar sdk.Invariant) InvarRoute

NewInvarRoute - create an InvarRoute object

func (InvarRoute) FullRoute

func (i InvarRoute) FullRoute() string

get the full invariance route

type MsgVerifyInvariant

type MsgVerifyInvariant struct {
	Sender              sdk.AccAddress `json:"sender" yaml:"sender"`
	InvariantModuleName string         `json:"invariant_module_name" yaml:"invariant_module_name"`
	InvariantRoute      string         `json:"invariant_route" yaml:"invariant_route"`
}

MsgVerifyInvariant - message struct to verify a particular invariance

func NewMsgVerifyInvariant

func NewMsgVerifyInvariant(sender sdk.AccAddress, invariantModuleName,
	invariantRoute string) MsgVerifyInvariant

NewMsgVerifyInvariant creates a new MsgVerifyInvariant object

func (MsgVerifyInvariant) FullInvariantRoute

func (msg MsgVerifyInvariant) FullInvariantRoute() string

FullInvariantRoute - get the messages full invariant route

func (MsgVerifyInvariant) GetSignBytes

func (msg MsgVerifyInvariant) GetSignBytes() []byte

GetSignBytes gets the sign bytes for the msg MsgVerifyInvariant

func (MsgVerifyInvariant) GetSigners

func (msg MsgVerifyInvariant) GetSigners() []sdk.AccAddress

get the bytes for the message signer to sign on

func (MsgVerifyInvariant) Route

func (msg MsgVerifyInvariant) Route() string

nolint

func (MsgVerifyInvariant) Type

func (msg MsgVerifyInvariant) Type() string

func (MsgVerifyInvariant) ValidateBasic

func (msg MsgVerifyInvariant) ValidateBasic() error

quick validity check

type SupplyKeeper

type SupplyKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

SupplyKeeper defines the expected supply keeper (noalias)

Jump to

Keyboard shortcuts

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