types

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 30 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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"
)
View Source
const (
	ModuleName  = "dynamicdeflation"
	PoolName    = "dynamic_deflation_pool"
	StoreKey    = ModuleName
	TargetDenom = xplatypes.DefaultDenom
)
View Source
const DefaultSettlementIntervalBlocks uint64 = 100_000

Variables

View Source
var (
	ErrInvalidLengthDynamicDeflation        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDynamicDeflation          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDynamicDeflation = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ParamsPrefix        = collections.NewPrefix(0)
	CurrentPeriodPrefix = collections.NewPrefix(1)
)
View Source
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))
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

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

func CalculateSettlementEndHeight(startHeight int64, interval uint64) (int64, error)

CalculateSettlementEndHeight returns the first global interval boundary at or after startHeight.

func IsNilOrNegativeInt

func IsNilOrNegativeInt(value sdkmath.Int) bool

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 RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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 BankKeeper interface {
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amount sdk.Coins) error
	BurnCoins(ctx context.Context, moduleName string, amount sdk.Coins) error
}

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) MarshalTo

func (m *CurrentPeriod) MarshalTo(dAtA []byte) (int, 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 DistributionKeeper interface {
	FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

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) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Params) GetEnabled

func (m *Params) GetEnabled() bool

func (*Params) GetMaxFeeAmount

func (m *Params) GetMaxFeeAmount() types.Coin

func (*Params) GetMinFeeAmount

func (m *Params) GetMinFeeAmount() types.Coin

func (*Params) GetSettlementIntervalBlocks

func (m *Params) GetSettlementIntervalBlocks() uint64

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

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

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) CurrentPeriod

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Status

Jump to

Keyboard shortcuts

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