Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func CalculateSettlement(gross, allocated, min, max sdkmath.Int) (burn, community sdkmath.Int, err error)
- func CalculateSettlementEndHeight(startHeight int64, interval uint64) (int64, error)
- func IsNilOrNegativeInt(value sdkmath.Int) bool
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateCurrentPeriod(period CurrentPeriod) error
- type AccountKeeper
- type BankKeeper
- type CurrentPeriod
- func (*CurrentPeriod) Descriptor() ([]byte, []int)
- func (m *CurrentPeriod) GetActiveConfig() Params
- func (m *CurrentPeriod) GetEndHeight() int64
- func (m *CurrentPeriod) GetStartHeight() int64
- func (m *CurrentPeriod) Marshal() (dAtA []byte, err error)
- func (m *CurrentPeriod) MarshalTo(dAtA []byte) (int, error)
- func (m *CurrentPeriod) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CurrentPeriod) ProtoMessage()
- func (m *CurrentPeriod) Reset()
- func (m *CurrentPeriod) Size() (n int)
- func (m *CurrentPeriod) String() string
- func (m *CurrentPeriod) Unmarshal(dAtA []byte) error
- func (m *CurrentPeriod) XXX_DiscardUnknown()
- func (m *CurrentPeriod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CurrentPeriod) XXX_Merge(src proto.Message)
- func (m *CurrentPeriod) XXX_Size() int
- func (m *CurrentPeriod) XXX_Unmarshal(b []byte) error
- type DistributionKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetCurrentPeriod() *CurrentPeriod
- func (m *GenesisState) GetParams() Params
- 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 (g GenesisState) Validate() 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 MsgClient
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- 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) ValidateBasic() 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 Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetEnabled() bool
- func (m *Params) GetMaxFeeAmount() types.Coin
- func (m *Params) GetMinFeeAmount() types.Coin
- func (m *Params) GetSettlementIntervalBlocks() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryCurrentPeriodRequest
- func (*QueryCurrentPeriodRequest) Descriptor() ([]byte, []int)
- func (m *QueryCurrentPeriodRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentPeriodRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentPeriodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentPeriodRequest) ProtoMessage()
- func (m *QueryCurrentPeriodRequest) Reset()
- func (m *QueryCurrentPeriodRequest) Size() (n int)
- func (m *QueryCurrentPeriodRequest) String() string
- func (m *QueryCurrentPeriodRequest) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentPeriodRequest) XXX_DiscardUnknown()
- func (m *QueryCurrentPeriodRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentPeriodRequest) XXX_Merge(src proto.Message)
- func (m *QueryCurrentPeriodRequest) XXX_Size() int
- func (m *QueryCurrentPeriodRequest) XXX_Unmarshal(b []byte) error
- type QueryCurrentPeriodResponse
- func (*QueryCurrentPeriodResponse) Descriptor() ([]byte, []int)
- func (m *QueryCurrentPeriodResponse) GetCurrentPeriod() *CurrentPeriod
- func (m *QueryCurrentPeriodResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentPeriodResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentPeriodResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentPeriodResponse) ProtoMessage()
- func (m *QueryCurrentPeriodResponse) Reset()
- func (m *QueryCurrentPeriodResponse) Size() (n int)
- func (m *QueryCurrentPeriodResponse) String() string
- func (m *QueryCurrentPeriodResponse) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentPeriodResponse) XXX_DiscardUnknown()
- func (m *QueryCurrentPeriodResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentPeriodResponse) XXX_Merge(src proto.Message)
- func (m *QueryCurrentPeriodResponse) XXX_Size() int
- func (m *QueryCurrentPeriodResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryStatusRequest
- func (*QueryStatusRequest) Descriptor() ([]byte, []int)
- func (m *QueryStatusRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryStatusRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStatusRequest) ProtoMessage()
- func (m *QueryStatusRequest) Reset()
- func (m *QueryStatusRequest) Size() (n int)
- func (m *QueryStatusRequest) String() string
- func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error
- func (m *QueryStatusRequest) XXX_DiscardUnknown()
- func (m *QueryStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStatusRequest) XXX_Merge(src proto.Message)
- func (m *QueryStatusRequest) XXX_Size() int
- func (m *QueryStatusRequest) XXX_Unmarshal(b []byte) error
- type QueryStatusResponse
- func (*QueryStatusResponse) Descriptor() ([]byte, []int)
- func (m *QueryStatusResponse) GetAllocatedAmount() types.Coin
- func (m *QueryStatusResponse) GetDeficitAmount() types.Coin
- func (m *QueryStatusResponse) GetModuleBalance() types.Coin
- func (m *QueryStatusResponse) GetSurplusAmount() types.Coin
- func (m *QueryStatusResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryStatusResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStatusResponse) ProtoMessage()
- func (m *QueryStatusResponse) Reset()
- func (m *QueryStatusResponse) Size() (n int)
- func (m *QueryStatusResponse) String() string
- func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error
- func (m *QueryStatusResponse) XXX_DiscardUnknown()
- func (m *QueryStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStatusResponse) XXX_Merge(src proto.Message)
- func (m *QueryStatusResponse) XXX_Size() int
- func (m *QueryStatusResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) CurrentPeriod(ctx context.Context, req *QueryCurrentPeriodRequest) (*QueryCurrentPeriodResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Status(ctx context.Context, req *QueryStatusRequest) (*QueryStatusResponse, error)
Constants ¶
const ( EventTypeRouted = "dynamic_deflation_routed" EventTypeSettled = "dynamic_deflation_settled" AttributeKeyHeight = "height" AttributeKeyStartHeight = "start_height" AttributeKeyEndHeight = "end_height" AttributeKeySettlementHeight = "settlement_height" AttributeKeyGross = "gross" AttributeKeyAllocated = "allocated" AttributeKeyRemainder = "remainder" AttributeKeyBurn = "burn" AttributeKeyCommunity = "community" )
const ( ModuleName = "dynamicdeflation" PoolName = "dynamic_deflation_pool" StoreKey = ModuleName TargetDenom = xplatypes.DefaultDenom )
const DefaultSettlementIntervalBlocks uint64 = 100_000
Variables ¶
var ( ErrInvalidLengthDynamicDeflation = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDynamicDeflation = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDynamicDeflation = fmt.Errorf("proto: unexpected end of group") )
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 ( ParamsPrefix = collections.NewPrefix(0) CurrentPeriodPrefix = collections.NewPrefix(1) )
var ( DefaultAllocationRate = sdkmath.LegacyNewDecWithPrec(20, 2) DefaultMinFeeAmount = sdk.NewCoin(TargetDenom, sdkmath.NewIntWithDecimal(69_444, 18)) DefaultMaxFeeAmount = sdk.NewCoin(TargetDenom, sdkmath.NewIntWithDecimal(3_472_222, 18)) )
Functions ¶
func CalculateSettlement ¶
func CalculateSettlement(gross, allocated, min, max sdkmath.Int) (burn, community sdkmath.Int, err error)
CalculateSettlement computes the deterministic settlement split for a completed period.
func CalculateSettlementEndHeight ¶
CalculateSettlementEndHeight returns the first global interval boundary at or after startHeight.
func IsNilOrNegativeInt ¶
IsNilOrNegativeInt reports whether value is nil or less than zero.
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateCurrentPeriod ¶
func ValidateCurrentPeriod(period CurrentPeriod) error
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetModuleAddress(name string) sdk.AccAddress
}
type BankKeeper ¶
type CurrentPeriod ¶
type CurrentPeriod struct {
StartHeight int64 `protobuf:"varint,1,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"`
EndHeight int64 `protobuf:"varint,2,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"`
ActiveConfig Params `protobuf:"bytes,3,opt,name=active_config,json=activeConfig,proto3" json:"active_config"`
GrossAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gross_amount,json=grossAmount,proto3,customtype=cosmossdk.io/math.Int" json:"gross_amount"`
AllocatedAmount cosmossdk_io_math.Int `` /* 129-byte string literal not displayed */
}
CurrentPeriod tracks the active observation period.
func (*CurrentPeriod) Descriptor ¶
func (*CurrentPeriod) Descriptor() ([]byte, []int)
func (*CurrentPeriod) GetActiveConfig ¶
func (m *CurrentPeriod) GetActiveConfig() Params
func (*CurrentPeriod) GetEndHeight ¶
func (m *CurrentPeriod) GetEndHeight() int64
func (*CurrentPeriod) GetStartHeight ¶
func (m *CurrentPeriod) GetStartHeight() int64
func (*CurrentPeriod) Marshal ¶
func (m *CurrentPeriod) Marshal() (dAtA []byte, err error)
func (*CurrentPeriod) MarshalToSizedBuffer ¶
func (m *CurrentPeriod) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CurrentPeriod) ProtoMessage ¶
func (*CurrentPeriod) ProtoMessage()
func (*CurrentPeriod) Reset ¶
func (m *CurrentPeriod) Reset()
func (*CurrentPeriod) Size ¶
func (m *CurrentPeriod) Size() (n int)
func (*CurrentPeriod) String ¶
func (m *CurrentPeriod) String() string
func (*CurrentPeriod) Unmarshal ¶
func (m *CurrentPeriod) Unmarshal(dAtA []byte) error
func (*CurrentPeriod) XXX_DiscardUnknown ¶
func (m *CurrentPeriod) XXX_DiscardUnknown()
func (*CurrentPeriod) XXX_Marshal ¶
func (m *CurrentPeriod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CurrentPeriod) XXX_Merge ¶
func (m *CurrentPeriod) XXX_Merge(src proto.Message)
func (*CurrentPeriod) XXX_Size ¶
func (m *CurrentPeriod) XXX_Size() int
func (*CurrentPeriod) XXX_Unmarshal ¶
func (m *CurrentPeriod) XXX_Unmarshal(b []byte) error
type DistributionKeeper ¶
type GenesisState ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
CurrentPeriod *CurrentPeriod `protobuf:"bytes,2,opt,name=current_period,json=currentPeriod,proto3" json:"current_period,omitempty"`
}
GenesisState defines the dynamic deflation module genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetCurrentPeriod ¶
func (m *GenesisState) GetCurrentPeriod() *CurrentPeriod
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (g GenesisState) Validate() error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface {
// UpdateParams atomically replaces all module parameters.
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 ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface {
// UpdateParams atomically replaces all module parameters.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct {
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}
MsgUpdateParams is the Msg/UpdateParams request type.
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (MsgUpdateParams) ValidateBasic ¶
func (m MsgUpdateParams) ValidateBasic() error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct {
}
MsgUpdateParamsResponse is the Msg/UpdateParams response type.
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct {
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
AllocationRate cosmossdk_io_math.LegacyDec `` /* 132-byte string literal not displayed */
SettlementIntervalBlocks uint64 `` /* 136-byte string literal not displayed */
MinFeeAmount types.Coin `protobuf:"bytes,4,opt,name=min_fee_amount,json=minFeeAmount,proto3" json:"min_fee_amount"`
MaxFeeAmount types.Coin `protobuf:"bytes,5,opt,name=max_fee_amount,json=maxFeeAmount,proto3" json:"max_fee_amount"`
}
Params defines the dynamic deflation parameters used for the next period.
func DefaultParams ¶
func DefaultParams() Params
func (*Params) Descriptor ¶
func (*Params) GetEnabled ¶
func (*Params) GetMaxFeeAmount ¶
func (*Params) GetMinFeeAmount ¶
func (*Params) GetSettlementIntervalBlocks ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface {
// Params queries the candidate parameters for the next period.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// CurrentPeriod queries the active period, if one exists.
CurrentPeriod(ctx context.Context, in *QueryCurrentPeriodRequest, opts ...grpc.CallOption) (*QueryCurrentPeriodResponse, error)
// Status compares the Dynamic Deflation Pool balance with the allocated
// amount.
Status(ctx context.Context, in *QueryStatusRequest, opts ...grpc.CallOption) (*QueryStatusResponse, error)
}
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryCurrentPeriodRequest ¶
type QueryCurrentPeriodRequest struct {
}
QueryCurrentPeriodRequest is the request for Query/CurrentPeriod.
func (*QueryCurrentPeriodRequest) Descriptor ¶
func (*QueryCurrentPeriodRequest) Descriptor() ([]byte, []int)
func (*QueryCurrentPeriodRequest) Marshal ¶
func (m *QueryCurrentPeriodRequest) Marshal() (dAtA []byte, err error)
func (*QueryCurrentPeriodRequest) MarshalTo ¶
func (m *QueryCurrentPeriodRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentPeriodRequest) MarshalToSizedBuffer ¶
func (m *QueryCurrentPeriodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentPeriodRequest) ProtoMessage ¶
func (*QueryCurrentPeriodRequest) ProtoMessage()
func (*QueryCurrentPeriodRequest) Reset ¶
func (m *QueryCurrentPeriodRequest) Reset()
func (*QueryCurrentPeriodRequest) Size ¶
func (m *QueryCurrentPeriodRequest) Size() (n int)
func (*QueryCurrentPeriodRequest) String ¶
func (m *QueryCurrentPeriodRequest) String() string
func (*QueryCurrentPeriodRequest) Unmarshal ¶
func (m *QueryCurrentPeriodRequest) Unmarshal(dAtA []byte) error
func (*QueryCurrentPeriodRequest) XXX_DiscardUnknown ¶
func (m *QueryCurrentPeriodRequest) XXX_DiscardUnknown()
func (*QueryCurrentPeriodRequest) XXX_Marshal ¶
func (m *QueryCurrentPeriodRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentPeriodRequest) XXX_Merge ¶
func (m *QueryCurrentPeriodRequest) XXX_Merge(src proto.Message)
func (*QueryCurrentPeriodRequest) XXX_Size ¶
func (m *QueryCurrentPeriodRequest) XXX_Size() int
func (*QueryCurrentPeriodRequest) XXX_Unmarshal ¶
func (m *QueryCurrentPeriodRequest) XXX_Unmarshal(b []byte) error
type QueryCurrentPeriodResponse ¶
type QueryCurrentPeriodResponse struct {
CurrentPeriod *CurrentPeriod `protobuf:"bytes,1,opt,name=current_period,json=currentPeriod,proto3" json:"current_period,omitempty"`
}
QueryCurrentPeriodResponse is the response for Query/CurrentPeriod.
func (*QueryCurrentPeriodResponse) Descriptor ¶
func (*QueryCurrentPeriodResponse) Descriptor() ([]byte, []int)
func (*QueryCurrentPeriodResponse) GetCurrentPeriod ¶
func (m *QueryCurrentPeriodResponse) GetCurrentPeriod() *CurrentPeriod
func (*QueryCurrentPeriodResponse) Marshal ¶
func (m *QueryCurrentPeriodResponse) Marshal() (dAtA []byte, err error)
func (*QueryCurrentPeriodResponse) MarshalTo ¶
func (m *QueryCurrentPeriodResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentPeriodResponse) MarshalToSizedBuffer ¶
func (m *QueryCurrentPeriodResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentPeriodResponse) ProtoMessage ¶
func (*QueryCurrentPeriodResponse) ProtoMessage()
func (*QueryCurrentPeriodResponse) Reset ¶
func (m *QueryCurrentPeriodResponse) Reset()
func (*QueryCurrentPeriodResponse) Size ¶
func (m *QueryCurrentPeriodResponse) Size() (n int)
func (*QueryCurrentPeriodResponse) String ¶
func (m *QueryCurrentPeriodResponse) String() string
func (*QueryCurrentPeriodResponse) Unmarshal ¶
func (m *QueryCurrentPeriodResponse) Unmarshal(dAtA []byte) error
func (*QueryCurrentPeriodResponse) XXX_DiscardUnknown ¶
func (m *QueryCurrentPeriodResponse) XXX_DiscardUnknown()
func (*QueryCurrentPeriodResponse) XXX_Marshal ¶
func (m *QueryCurrentPeriodResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentPeriodResponse) XXX_Merge ¶
func (m *QueryCurrentPeriodResponse) XXX_Merge(src proto.Message)
func (*QueryCurrentPeriodResponse) XXX_Size ¶
func (m *QueryCurrentPeriodResponse) XXX_Size() int
func (*QueryCurrentPeriodResponse) XXX_Unmarshal ¶
func (m *QueryCurrentPeriodResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct {
}
QueryParamsRequest is the request for Query/Params.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is the response for Query/Params.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
// Params queries the candidate parameters for the next period.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// CurrentPeriod queries the active period, if one exists.
CurrentPeriod(context.Context, *QueryCurrentPeriodRequest) (*QueryCurrentPeriodResponse, error)
// Status compares the Dynamic Deflation Pool balance with the allocated
// amount.
Status(context.Context, *QueryStatusRequest) (*QueryStatusResponse, error)
}
QueryServer is the server API for Query service.
type QueryStatusRequest ¶
type QueryStatusRequest struct {
}
QueryStatusRequest is the request for Query/Status.
func (*QueryStatusRequest) Descriptor ¶
func (*QueryStatusRequest) Descriptor() ([]byte, []int)
func (*QueryStatusRequest) Marshal ¶
func (m *QueryStatusRequest) Marshal() (dAtA []byte, err error)
func (*QueryStatusRequest) MarshalTo ¶
func (m *QueryStatusRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryStatusRequest) MarshalToSizedBuffer ¶
func (m *QueryStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStatusRequest) ProtoMessage ¶
func (*QueryStatusRequest) ProtoMessage()
func (*QueryStatusRequest) Reset ¶
func (m *QueryStatusRequest) Reset()
func (*QueryStatusRequest) Size ¶
func (m *QueryStatusRequest) Size() (n int)
func (*QueryStatusRequest) String ¶
func (m *QueryStatusRequest) String() string
func (*QueryStatusRequest) Unmarshal ¶
func (m *QueryStatusRequest) Unmarshal(dAtA []byte) error
func (*QueryStatusRequest) XXX_DiscardUnknown ¶
func (m *QueryStatusRequest) XXX_DiscardUnknown()
func (*QueryStatusRequest) XXX_Marshal ¶
func (m *QueryStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStatusRequest) XXX_Merge ¶
func (m *QueryStatusRequest) XXX_Merge(src proto.Message)
func (*QueryStatusRequest) XXX_Size ¶
func (m *QueryStatusRequest) XXX_Size() int
func (*QueryStatusRequest) XXX_Unmarshal ¶
func (m *QueryStatusRequest) XXX_Unmarshal(b []byte) error
type QueryStatusResponse ¶
type QueryStatusResponse struct {
ModuleBalance types.Coin `protobuf:"bytes,1,opt,name=module_balance,json=moduleBalance,proto3" json:"module_balance"`
AllocatedAmount types.Coin `protobuf:"bytes,2,opt,name=allocated_amount,json=allocatedAmount,proto3" json:"allocated_amount"`
SurplusAmount types.Coin `protobuf:"bytes,3,opt,name=surplus_amount,json=surplusAmount,proto3" json:"surplus_amount"`
DeficitAmount types.Coin `protobuf:"bytes,4,opt,name=deficit_amount,json=deficitAmount,proto3" json:"deficit_amount"`
}
QueryStatusResponse reports the Dynamic Deflation Pool balance and allocated amount. module_balance is retained for API compatibility.
func (*QueryStatusResponse) Descriptor ¶
func (*QueryStatusResponse) Descriptor() ([]byte, []int)
func (*QueryStatusResponse) GetAllocatedAmount ¶
func (m *QueryStatusResponse) GetAllocatedAmount() types.Coin
func (*QueryStatusResponse) GetDeficitAmount ¶
func (m *QueryStatusResponse) GetDeficitAmount() types.Coin
func (*QueryStatusResponse) GetModuleBalance ¶
func (m *QueryStatusResponse) GetModuleBalance() types.Coin
func (*QueryStatusResponse) GetSurplusAmount ¶
func (m *QueryStatusResponse) GetSurplusAmount() types.Coin
func (*QueryStatusResponse) Marshal ¶
func (m *QueryStatusResponse) Marshal() (dAtA []byte, err error)
func (*QueryStatusResponse) MarshalTo ¶
func (m *QueryStatusResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryStatusResponse) MarshalToSizedBuffer ¶
func (m *QueryStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStatusResponse) ProtoMessage ¶
func (*QueryStatusResponse) ProtoMessage()
func (*QueryStatusResponse) Reset ¶
func (m *QueryStatusResponse) Reset()
func (*QueryStatusResponse) Size ¶
func (m *QueryStatusResponse) Size() (n int)
func (*QueryStatusResponse) String ¶
func (m *QueryStatusResponse) String() string
func (*QueryStatusResponse) Unmarshal ¶
func (m *QueryStatusResponse) Unmarshal(dAtA []byte) error
func (*QueryStatusResponse) XXX_DiscardUnknown ¶
func (m *QueryStatusResponse) XXX_DiscardUnknown()
func (*QueryStatusResponse) XXX_Marshal ¶
func (m *QueryStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStatusResponse) XXX_Merge ¶
func (m *QueryStatusResponse) XXX_Merge(src proto.Message)
func (*QueryStatusResponse) XXX_Size ¶
func (m *QueryStatusResponse) XXX_Size() int
func (*QueryStatusResponse) XXX_Unmarshal ¶
func (m *QueryStatusResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct {
}
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct {
}
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) CurrentPeriod ¶
func (*UnimplementedQueryServer) CurrentPeriod(ctx context.Context, req *QueryCurrentPeriodRequest) (*QueryCurrentPeriodResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Status ¶
func (*UnimplementedQueryServer) Status(ctx context.Context, req *QueryStatusRequest) (*QueryStatusResponse, error)