cosmos-sdk: github.com/cosmos/cosmos-sdk/x/crisis/types Index | Files

package types

import "github.com/cosmos/cosmos-sdk/x/crisis/types"

Index

Package Files

codec.go errors.go events.go expected_keepers.go genesis.go genesis.pb.go keys.go msgs.go params.go route.go tx.pb.go

Constants

const (
    EventTypeInvariant = "invariant"

    AttributeValueCrisis = ModuleName
    AttributeKeyRoute    = "route"
)

crisis module event types

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

Variables

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

x/crisis module sentinel errors

var (
    ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
var (
    ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
var (

    // ModuleCdc references the global x/crisis module codec. Note, the codec should
    // ONLY be used in certain instances of tests and for JSON encoding as Amino is
    // still used for that purpose.
    //
    // The actual codec used for serialization should be provided to x/crisis and
    // defined at the application level.
    ModuleCdc = codec.NewAminoCodec(amino)
)
var (
    // key for constant fee parameter
    ParamStoreKeyConstantFee = []byte("ConstantFee")
)

func ParamKeyTable Uses

func ParamKeyTable() paramtypes.KeyTable

type declaration for parameters

func RegisterCodec Uses

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers the necessary x/crisis interfaces and concrete types on the provided Amino codec. These types are used for Amino JSON serialization.

func RegisterInterfaces Uses

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func ValidateGenesis Uses

func ValidateGenesis(data *GenesisState) error

ValidateGenesis - validate crisis genesis data

type GenesisState Uses

type GenesisState struct {
    // constant_fee is the fee used to verify the invariant in the crisis
    // module.
    ConstantFee types.Coin `protobuf:"bytes,3,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee" yaml:"constant_fee"`
}

GenesisState defines the crisis module's genesis state.

func DefaultGenesisState Uses

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState Uses

func NewGenesisState(constantFee sdk.Coin) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor Uses

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetConstantFee Uses

func (m *GenesisState) GetConstantFee() types.Coin

func (*GenesisState) Marshal Uses

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo Uses

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer Uses

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage Uses

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset Uses

func (m *GenesisState) Reset()

func (*GenesisState) Size Uses

func (m *GenesisState) Size() (n int)

func (*GenesisState) String Uses

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal Uses

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown Uses

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal Uses

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge Uses

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size Uses

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal Uses

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type InvarRoute Uses

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

invariant route

func NewInvarRoute Uses

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

NewInvarRoute - create an InvarRoute object

func (InvarRoute) FullRoute Uses

func (i InvarRoute) FullRoute() string

get the full invariance route

type MsgVerifyInvariant Uses

type MsgVerifyInvariant struct {
    Sender              github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
    InvariantModuleName string                                        `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty" yaml:"invariant_module_name"`
    InvariantRoute      string                                        `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty" yaml:"invariant_route"`
}

MsgVerifyInvariant - message struct to verify a particular invariance

func NewMsgVerifyInvariant Uses

func NewMsgVerifyInvariant(sender sdk.AccAddress, invModeName, invRoute string) *MsgVerifyInvariant

NewMsgVerifyInvariant creates a new MsgVerifyInvariant object

func (*MsgVerifyInvariant) Descriptor Uses

func (*MsgVerifyInvariant) Descriptor() ([]byte, []int)

func (*MsgVerifyInvariant) Equal Uses

func (this *MsgVerifyInvariant) Equal(that interface{}) bool

func (MsgVerifyInvariant) FullInvariantRoute Uses

func (msg MsgVerifyInvariant) FullInvariantRoute() string

FullInvariantRoute - get the messages full invariant route

func (*MsgVerifyInvariant) GetInvariantModuleName Uses

func (m *MsgVerifyInvariant) GetInvariantModuleName() string

func (*MsgVerifyInvariant) GetInvariantRoute Uses

func (m *MsgVerifyInvariant) GetInvariantRoute() string

func (*MsgVerifyInvariant) GetSender Uses

func (m *MsgVerifyInvariant) GetSender() github_com_cosmos_cosmos_sdk_types.AccAddress

func (MsgVerifyInvariant) GetSignBytes Uses

func (msg MsgVerifyInvariant) GetSignBytes() []byte

GetSignBytes gets the sign bytes for the msg MsgVerifyInvariant

func (MsgVerifyInvariant) GetSigners Uses

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

get the bytes for the message signer to sign on

func (*MsgVerifyInvariant) Marshal Uses

func (m *MsgVerifyInvariant) Marshal() (dAtA []byte, err error)

func (*MsgVerifyInvariant) MarshalTo Uses

func (m *MsgVerifyInvariant) MarshalTo(dAtA []byte) (int, error)

func (*MsgVerifyInvariant) MarshalToSizedBuffer Uses

func (m *MsgVerifyInvariant) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVerifyInvariant) ProtoMessage Uses

func (*MsgVerifyInvariant) ProtoMessage()

func (*MsgVerifyInvariant) Reset Uses

func (m *MsgVerifyInvariant) Reset()

func (MsgVerifyInvariant) Route Uses

func (msg MsgVerifyInvariant) Route() string

func (*MsgVerifyInvariant) Size Uses

func (m *MsgVerifyInvariant) Size() (n int)

func (*MsgVerifyInvariant) String Uses

func (m *MsgVerifyInvariant) String() string

func (MsgVerifyInvariant) Type Uses

func (msg MsgVerifyInvariant) Type() string

func (*MsgVerifyInvariant) Unmarshal Uses

func (m *MsgVerifyInvariant) Unmarshal(dAtA []byte) error

func (MsgVerifyInvariant) ValidateBasic Uses

func (msg MsgVerifyInvariant) ValidateBasic() error

quick validity check

func (*MsgVerifyInvariant) XXX_DiscardUnknown Uses

func (m *MsgVerifyInvariant) XXX_DiscardUnknown()

func (*MsgVerifyInvariant) XXX_Marshal Uses

func (m *MsgVerifyInvariant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVerifyInvariant) XXX_Merge Uses

func (m *MsgVerifyInvariant) XXX_Merge(src proto.Message)

func (*MsgVerifyInvariant) XXX_Size Uses

func (m *MsgVerifyInvariant) XXX_Size() int

func (*MsgVerifyInvariant) XXX_Unmarshal Uses

func (m *MsgVerifyInvariant) XXX_Unmarshal(b []byte) error

type SupplyKeeper Uses

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

SupplyKeeper defines the expected supply keeper (noalias)

Package types imports 13 packages (graph) and is imported by 4 packages. Updated 2020-08-13. Refresh now. Tools for package owners.