Documentation ¶
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramtypes.KeyTabledeprecated
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func ValidateGenesis(data *GenesisState) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetConstantFee() types.Coin
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type InvarRoute
- type MsgClient
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetConstantFee() types.Coin
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type MsgVerifyInvariant
- func (*MsgVerifyInvariant) Descriptor() ([]byte, []int)
- func (msg MsgVerifyInvariant) FullInvariantRoute() string
- func (m *MsgVerifyInvariant) Marshal() (dAtA []byte, err error)
- func (m *MsgVerifyInvariant) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgVerifyInvariant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgVerifyInvariant) ProtoMessage()
- func (m *MsgVerifyInvariant) Reset()
- func (m *MsgVerifyInvariant) Size() (n int)
- func (m *MsgVerifyInvariant) String() string
- func (m *MsgVerifyInvariant) Unmarshal(dAtA []byte) error
- func (m *MsgVerifyInvariant) XXX_DiscardUnknown()
- func (m *MsgVerifyInvariant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgVerifyInvariant) XXX_Merge(src proto.Message)
- func (m *MsgVerifyInvariant) XXX_Size() int
- func (m *MsgVerifyInvariant) XXX_Unmarshal(b []byte) error
- type MsgVerifyInvariantResponse
- func (*MsgVerifyInvariantResponse) Descriptor() ([]byte, []int)
- func (m *MsgVerifyInvariantResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgVerifyInvariantResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgVerifyInvariantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgVerifyInvariantResponse) ProtoMessage()
- func (m *MsgVerifyInvariantResponse) Reset()
- func (m *MsgVerifyInvariantResponse) Size() (n int)
- func (m *MsgVerifyInvariantResponse) String() string
- func (m *MsgVerifyInvariantResponse) Unmarshal(dAtA []byte) error
- func (m *MsgVerifyInvariantResponse) XXX_DiscardUnknown()
- func (m *MsgVerifyInvariantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgVerifyInvariantResponse) XXX_Merge(src proto.Message)
- func (m *MsgVerifyInvariantResponse) XXX_Size() int
- func (m *MsgVerifyInvariantResponse) XXX_Unmarshal(b []byte) error
- type SupplyKeeper
- type UnimplementedMsgServer
Constants ¶
const ( EventTypeInvariant = "invariant" AttributeKeyRoute = "route" )
crisis module event types
const ( // module name ModuleName = "crisis" StoreKey = ModuleName )
Variables ¶
var ( ErrNoSender = errors.Register(ModuleName, 2, "sender address is empty") ErrUnknownInvariant = errors.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 ConstantFeeKey = collections.NewPrefix(1)
var ParamStoreKeyConstantFee = []byte("ConstantFee")
ParamStoreKeyConstantFee is the constant fee parameter
Functions ¶
func ParamKeyTable
deprecated
func ParamKeyTable() paramtypes.KeyTable
Deprecated: Type declaration for parameters
func RegisterInterfaces ¶ added in v0.40.0
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the Interface Registry.
func RegisterLegacyAminoCodec ¶ added in v0.40.0
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/crisis interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterMsgServer ¶ added in v0.40.0
func ValidateGenesis ¶
func ValidateGenesis(data *GenesisState) error
ValidateGenesis - validate crisis genesis data
Types ¶
type GenesisState ¶
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"` }
GenesisState defines the crisis module's 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
func (*GenesisState) Descriptor ¶ added in v0.40.0
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetConstantFee ¶ added in v0.40.0
func (m *GenesisState) GetConstantFee() types.Coin
func (*GenesisState) Marshal ¶ added in v0.40.0
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v0.40.0
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v0.40.0
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v0.40.0
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v0.40.0
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v0.40.0
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v0.40.0
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v0.40.0
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v0.40.0
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v0.40.0
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v0.40.0
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type InvarRoute ¶
invariant route
func NewInvarRoute ¶
func NewInvarRoute(moduleName, route string, invar sdk.Invariant) InvarRoute
NewInvarRoute - create an InvarRoute object
type MsgClient ¶ added in v0.40.0
type MsgClient interface { // VerifyInvariant defines a method to verify a particular invariant. VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) // UpdateParams defines a governance operation for updating the x/crisis module // parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶ added in v0.40.0
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶ added in v0.40.0
type MsgServer interface { // VerifyInvariant defines a method to verify a particular invariant. VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) // UpdateParams defines a governance operation for updating the x/crisis module // parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶ added in v0.47.0
type MsgUpdateParams struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // constant_fee defines the x/crisis parameter. ConstantFee types.Coin `protobuf:"bytes,2,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee"` }
MsgUpdateParams is the Msg/UpdateParams request type.
Since: cosmos-sdk 0.47
func (*MsgUpdateParams) Descriptor ¶ added in v0.47.0
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶ added in v0.47.0
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetConstantFee ¶ added in v0.47.0
func (m *MsgUpdateParams) GetConstantFee() types.Coin
func (*MsgUpdateParams) Marshal ¶ added in v0.47.0
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalTo ¶ added in v0.47.0
func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶ added in v0.47.0
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶ added in v0.47.0
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶ added in v0.47.0
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶ added in v0.47.0
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶ added in v0.47.0
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶ added in v0.47.0
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.
Since: cosmos-sdk 0.47
func (*MsgUpdateParamsResponse) Descriptor ¶ added in v0.47.0
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶ added in v0.47.0
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶ added in v0.47.0
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type MsgVerifyInvariant ¶
type MsgVerifyInvariant struct { // sender is the account address of private key to send coins to fee collector account. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // name of the invariant module. InvariantModuleName string `protobuf:"bytes,2,opt,name=invariant_module_name,json=invariantModuleName,proto3" json:"invariant_module_name,omitempty"` // invariant_route is the msg's invariant route. InvariantRoute string `protobuf:"bytes,3,opt,name=invariant_route,json=invariantRoute,proto3" json:"invariant_route,omitempty"` }
MsgVerifyInvariant represents a message to verify a particular invariance.
func NewMsgVerifyInvariant ¶
func NewMsgVerifyInvariant(sender sdk.AccAddress, invModeName, invRoute string) *MsgVerifyInvariant
NewMsgVerifyInvariant creates a new MsgVerifyInvariant object
func (*MsgVerifyInvariant) Descriptor ¶
func (*MsgVerifyInvariant) Descriptor() ([]byte, []int)
func (MsgVerifyInvariant) FullInvariantRoute ¶
func (msg MsgVerifyInvariant) FullInvariantRoute() string
FullInvariantRoute - get the messages full invariant route
func (*MsgVerifyInvariant) Marshal ¶
func (m *MsgVerifyInvariant) Marshal() (dAtA []byte, err error)
func (*MsgVerifyInvariant) MarshalTo ¶
func (m *MsgVerifyInvariant) MarshalTo(dAtA []byte) (int, error)
func (*MsgVerifyInvariant) MarshalToSizedBuffer ¶
func (m *MsgVerifyInvariant) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgVerifyInvariant) ProtoMessage ¶
func (*MsgVerifyInvariant) ProtoMessage()
func (*MsgVerifyInvariant) Reset ¶
func (m *MsgVerifyInvariant) Reset()
func (*MsgVerifyInvariant) Size ¶
func (m *MsgVerifyInvariant) Size() (n int)
func (*MsgVerifyInvariant) String ¶
func (m *MsgVerifyInvariant) String() string
func (*MsgVerifyInvariant) Unmarshal ¶
func (m *MsgVerifyInvariant) Unmarshal(dAtA []byte) error
func (*MsgVerifyInvariant) XXX_DiscardUnknown ¶
func (m *MsgVerifyInvariant) XXX_DiscardUnknown()
func (*MsgVerifyInvariant) XXX_Marshal ¶
func (m *MsgVerifyInvariant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgVerifyInvariant) XXX_Merge ¶
func (m *MsgVerifyInvariant) XXX_Merge(src proto.Message)
func (*MsgVerifyInvariant) XXX_Size ¶
func (m *MsgVerifyInvariant) XXX_Size() int
func (*MsgVerifyInvariant) XXX_Unmarshal ¶
func (m *MsgVerifyInvariant) XXX_Unmarshal(b []byte) error
type MsgVerifyInvariantResponse ¶ added in v0.40.0
type MsgVerifyInvariantResponse struct { }
MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type.
func (*MsgVerifyInvariantResponse) Descriptor ¶ added in v0.40.0
func (*MsgVerifyInvariantResponse) Descriptor() ([]byte, []int)
func (*MsgVerifyInvariantResponse) Marshal ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) Marshal() (dAtA []byte, err error)
func (*MsgVerifyInvariantResponse) MarshalTo ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgVerifyInvariantResponse) MarshalToSizedBuffer ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgVerifyInvariantResponse) ProtoMessage ¶ added in v0.40.0
func (*MsgVerifyInvariantResponse) ProtoMessage()
func (*MsgVerifyInvariantResponse) Reset ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) Reset()
func (*MsgVerifyInvariantResponse) Size ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) Size() (n int)
func (*MsgVerifyInvariantResponse) String ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) String() string
func (*MsgVerifyInvariantResponse) Unmarshal ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) Unmarshal(dAtA []byte) error
func (*MsgVerifyInvariantResponse) XXX_DiscardUnknown ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) XXX_DiscardUnknown()
func (*MsgVerifyInvariantResponse) XXX_Marshal ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgVerifyInvariantResponse) XXX_Merge ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) XXX_Merge(src proto.Message)
func (*MsgVerifyInvariantResponse) XXX_Size ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) XXX_Size() int
func (*MsgVerifyInvariantResponse) XXX_Unmarshal ¶ added in v0.40.0
func (m *MsgVerifyInvariantResponse) XXX_Unmarshal(b []byte) error
type SupplyKeeper ¶
type SupplyKeeper interface {
SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}
SupplyKeeper defines the expected supply keeper (noalias)
type UnimplementedMsgServer ¶ added in v0.40.0
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) UpdateParams ¶ added in v0.47.0
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
func (*UnimplementedMsgServer) VerifyInvariant ¶ added in v0.40.0
func (*UnimplementedMsgServer) VerifyInvariant(ctx context.Context, req *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error)