Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func DefaultPaymentScheduleType() isPaymentScheduleType_PaymentScheduleType
- func GetAccumulatedPriceKey(time int64) []byte
- func GetValidatorInfoKey(addr sdk.ValAddress) []byte
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- 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 ValidatePaymentScheduleType(paymentScheduleType isPaymentScheduleType_PaymentScheduleType) error
- type BankKeeper
- type BlockBasedPaymentSchedule
- func (*BlockBasedPaymentSchedule) Descriptor() ([]byte, []int)
- func (s *BlockBasedPaymentSchedule) EffectivePeriodProgress(ctx sdktypes.Context) math.LegacyDec
- func (m *BlockBasedPaymentSchedule) GetBlocksPerPeriod() uint64
- func (m *BlockBasedPaymentSchedule) GetCurrentPeriodStartBlock() uint64
- func (s *BlockBasedPaymentSchedule) IntoPaymentSchedule() *PaymentSchedule
- func (m *BlockBasedPaymentSchedule) Marshal() (dAtA []byte, err error)
- func (m *BlockBasedPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockBasedPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (s *BlockBasedPaymentSchedule) MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
- func (s *BlockBasedPaymentSchedule) PeriodEnded(ctx sdktypes.Context) bool
- func (*BlockBasedPaymentSchedule) ProtoMessage()
- func (m *BlockBasedPaymentSchedule) Reset()
- func (m *BlockBasedPaymentSchedule) Size() (n int)
- func (s *BlockBasedPaymentSchedule) StartNewPeriod(ctx sdktypes.Context)
- func (m *BlockBasedPaymentSchedule) String() string
- func (s *BlockBasedPaymentSchedule) TotalBlocksInPeriod(ctx sdktypes.Context) uint64
- func (m *BlockBasedPaymentSchedule) Unmarshal(dAtA []byte) error
- func (m *BlockBasedPaymentSchedule) XXX_DiscardUnknown()
- func (m *BlockBasedPaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockBasedPaymentSchedule) XXX_Merge(src proto.Message)
- func (m *BlockBasedPaymentSchedule) XXX_Size() int
- func (m *BlockBasedPaymentSchedule) XXX_Unmarshal(b []byte) error
- type BlockBasedPaymentScheduleType
- func (*BlockBasedPaymentScheduleType) Descriptor() ([]byte, []int)
- func (m *BlockBasedPaymentScheduleType) GetBlocksPerPeriod() uint64
- func (m *BlockBasedPaymentScheduleType) Marshal() (dAtA []byte, err error)
- func (m *BlockBasedPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockBasedPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockBasedPaymentScheduleType) ProtoMessage()
- func (m *BlockBasedPaymentScheduleType) Reset()
- func (m *BlockBasedPaymentScheduleType) Size() (n int)
- func (m *BlockBasedPaymentScheduleType) String() string
- func (m *BlockBasedPaymentScheduleType) Unmarshal(dAtA []byte) error
- func (m *BlockBasedPaymentScheduleType) XXX_DiscardUnknown()
- func (m *BlockBasedPaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockBasedPaymentScheduleType) XXX_Merge(src proto.Message)
- func (m *BlockBasedPaymentScheduleType) XXX_Size() int
- func (m *BlockBasedPaymentScheduleType) XXX_Unmarshal(b []byte) error
- type EmptyPaymentSchedule
- func (*EmptyPaymentSchedule) Descriptor() ([]byte, []int)
- func (s *EmptyPaymentSchedule) EffectivePeriodProgress(_ sdktypes.Context) math.LegacyDec
- func (s *EmptyPaymentSchedule) IntoPaymentSchedule() *PaymentSchedule
- func (m *EmptyPaymentSchedule) Marshal() (dAtA []byte, err error)
- func (m *EmptyPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
- func (m *EmptyPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (s *EmptyPaymentSchedule) MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
- func (s *EmptyPaymentSchedule) PeriodEnded(_ sdktypes.Context) bool
- func (*EmptyPaymentSchedule) ProtoMessage()
- func (m *EmptyPaymentSchedule) Reset()
- func (m *EmptyPaymentSchedule) Size() (n int)
- func (s *EmptyPaymentSchedule) StartNewPeriod(_ sdktypes.Context)
- func (m *EmptyPaymentSchedule) String() string
- func (s *EmptyPaymentSchedule) TotalBlocksInPeriod(_ sdktypes.Context) uint64
- func (m *EmptyPaymentSchedule) Unmarshal(dAtA []byte) error
- func (m *EmptyPaymentSchedule) XXX_DiscardUnknown()
- func (m *EmptyPaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyPaymentSchedule) XXX_Merge(src proto.Message)
- func (m *EmptyPaymentSchedule) XXX_Size() int
- func (m *EmptyPaymentSchedule) XXX_Unmarshal(b []byte) error
- type EmptyPaymentScheduleType
- func (*EmptyPaymentScheduleType) Descriptor() ([]byte, []int)
- func (m *EmptyPaymentScheduleType) Marshal() (dAtA []byte, err error)
- func (m *EmptyPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
- func (m *EmptyPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EmptyPaymentScheduleType) ProtoMessage()
- func (m *EmptyPaymentScheduleType) Reset()
- func (m *EmptyPaymentScheduleType) Size() (n int)
- func (m *EmptyPaymentScheduleType) String() string
- func (m *EmptyPaymentScheduleType) Unmarshal(dAtA []byte) error
- func (m *EmptyPaymentScheduleType) XXX_DiscardUnknown()
- func (m *EmptyPaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyPaymentScheduleType) XXX_Merge(src proto.Message)
- func (m *EmptyPaymentScheduleType) XXX_Size() int
- func (m *EmptyPaymentScheduleType) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPaymentSchedule() *PaymentSchedule
- func (m *GenesisState) GetValidators() []ValidatorInfo
- 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 (gs 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 MonthlyPaymentSchedule
- func (s *MonthlyPaymentSchedule) CurrentMonth() time.Month
- func (*MonthlyPaymentSchedule) Descriptor() ([]byte, []int)
- func (s *MonthlyPaymentSchedule) EffectivePeriodProgress(ctx sdktypes.Context) math.LegacyDec
- func (m *MonthlyPaymentSchedule) GetCurrentMonthStartBlock() uint64
- func (m *MonthlyPaymentSchedule) GetCurrentMonthStartBlockTs() uint64
- func (s *MonthlyPaymentSchedule) IntoPaymentSchedule() *PaymentSchedule
- func (m *MonthlyPaymentSchedule) Marshal() (dAtA []byte, err error)
- func (m *MonthlyPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
- func (m *MonthlyPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (s *MonthlyPaymentSchedule) MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
- func (s *MonthlyPaymentSchedule) PeriodEnded(ctx sdktypes.Context) bool
- func (*MonthlyPaymentSchedule) ProtoMessage()
- func (m *MonthlyPaymentSchedule) Reset()
- func (m *MonthlyPaymentSchedule) Size() (n int)
- func (s *MonthlyPaymentSchedule) StartNewPeriod(ctx sdktypes.Context)
- func (m *MonthlyPaymentSchedule) String() string
- func (s *MonthlyPaymentSchedule) TotalBlocksInPeriod(ctx sdktypes.Context) uint64
- func (m *MonthlyPaymentSchedule) Unmarshal(dAtA []byte) error
- func (m *MonthlyPaymentSchedule) XXX_DiscardUnknown()
- func (m *MonthlyPaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MonthlyPaymentSchedule) XXX_Merge(src proto.Message)
- func (m *MonthlyPaymentSchedule) XXX_Size() int
- func (m *MonthlyPaymentSchedule) XXX_Unmarshal(b []byte) error
- type MonthlyPaymentScheduleType
- func (*MonthlyPaymentScheduleType) Descriptor() ([]byte, []int)
- func (m *MonthlyPaymentScheduleType) Marshal() (dAtA []byte, err error)
- func (m *MonthlyPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
- func (m *MonthlyPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MonthlyPaymentScheduleType) ProtoMessage()
- func (m *MonthlyPaymentScheduleType) Reset()
- func (m *MonthlyPaymentScheduleType) Size() (n int)
- func (m *MonthlyPaymentScheduleType) String() string
- func (m *MonthlyPaymentScheduleType) Unmarshal(dAtA []byte) error
- func (m *MonthlyPaymentScheduleType) XXX_DiscardUnknown()
- func (m *MonthlyPaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MonthlyPaymentScheduleType) XXX_Merge(src proto.Message)
- func (m *MonthlyPaymentScheduleType) XXX_Size() int
- func (m *MonthlyPaymentScheduleType) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgFundTreasury
- func (*MsgFundTreasury) Descriptor() ([]byte, []int)
- func (m *MsgFundTreasury) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *MsgFundTreasury) GetSender() string
- func (m *MsgFundTreasury) Marshal() (dAtA []byte, err error)
- func (m *MsgFundTreasury) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgFundTreasury) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgFundTreasury) ProtoMessage()
- func (m *MsgFundTreasury) Reset()
- func (m *MsgFundTreasury) Size() (n int)
- func (m *MsgFundTreasury) String() string
- func (m *MsgFundTreasury) Unmarshal(dAtA []byte) error
- func (msg *MsgFundTreasury) Validate(params Params) error
- func (m *MsgFundTreasury) XXX_DiscardUnknown()
- func (m *MsgFundTreasury) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgFundTreasury) XXX_Merge(src proto.Message)
- func (m *MsgFundTreasury) XXX_Size() int
- func (m *MsgFundTreasury) XXX_Unmarshal(b []byte) error
- type MsgFundTreasuryResponse
- func (*MsgFundTreasuryResponse) Descriptor() ([]byte, []int)
- func (m *MsgFundTreasuryResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgFundTreasuryResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgFundTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgFundTreasuryResponse) ProtoMessage()
- func (m *MsgFundTreasuryResponse) Reset()
- func (m *MsgFundTreasuryResponse) Size() (n int)
- func (m *MsgFundTreasuryResponse) String() string
- func (m *MsgFundTreasuryResponse) Unmarshal(dAtA []byte) error
- func (m *MsgFundTreasuryResponse) XXX_DiscardUnknown()
- func (m *MsgFundTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgFundTreasuryResponse) XXX_Merge(src proto.Message)
- func (m *MsgFundTreasuryResponse) XXX_Size() int
- func (m *MsgFundTreasuryResponse) XXX_Unmarshal(b []byte) error
- 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 (msg *MsgUpdateParams) Validate(params Params) 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 OracleKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetBlocksPerformanceRequirement() *PerformanceRequirement
- func (m *Params) GetOracleVotesPerformanceRequirement() *PerformanceRequirement
- func (m *Params) GetPaymentScheduleType() *PaymentScheduleType
- func (m *Params) GetRewardAsset() string
- func (m *Params) GetRewardQuote() *RewardQuote
- func (m *Params) GetTwapWindow() int64
- 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 PaymentSchedule
- func (*PaymentSchedule) Descriptor() ([]byte, []int)
- func (m *PaymentSchedule) GetBlockBasedPaymentSchedule() *BlockBasedPaymentSchedule
- func (m *PaymentSchedule) GetEmptyPaymentSchedule() *EmptyPaymentSchedule
- func (m *PaymentSchedule) GetMonthlyPaymentSchedule() *MonthlyPaymentSchedule
- func (m *PaymentSchedule) GetPaymentSchedule() isPaymentSchedule_PaymentSchedule
- func (s *PaymentSchedule) IntoPaymentScheduleI() (PaymentScheduleI, error)
- func (m *PaymentSchedule) Marshal() (dAtA []byte, err error)
- func (m *PaymentSchedule) MarshalTo(dAtA []byte) (int, error)
- func (m *PaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PaymentSchedule) ProtoMessage()
- func (m *PaymentSchedule) Reset()
- func (m *PaymentSchedule) Size() (n int)
- func (m *PaymentSchedule) String() string
- func (m *PaymentSchedule) Unmarshal(dAtA []byte) error
- func (m *PaymentSchedule) XXX_DiscardUnknown()
- func (m *PaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaymentSchedule) XXX_Merge(src proto.Message)
- func (*PaymentSchedule) XXX_OneofWrappers() []interface{}
- func (m *PaymentSchedule) XXX_Size() int
- func (m *PaymentSchedule) XXX_Unmarshal(b []byte) error
- type PaymentScheduleI
- type PaymentScheduleType
- func (*PaymentScheduleType) Descriptor() ([]byte, []int)
- func (m *PaymentScheduleType) GetBlockBasedPaymentScheduleType() *BlockBasedPaymentScheduleType
- func (m *PaymentScheduleType) GetEmptyPaymentScheduleType() *EmptyPaymentScheduleType
- func (m *PaymentScheduleType) GetMonthlyPaymentScheduleType() *MonthlyPaymentScheduleType
- func (m *PaymentScheduleType) GetPaymentScheduleType() isPaymentScheduleType_PaymentScheduleType
- func (m *PaymentScheduleType) Marshal() (dAtA []byte, err error)
- func (m *PaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
- func (m *PaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PaymentScheduleType) ProtoMessage()
- func (m *PaymentScheduleType) Reset()
- func (m *PaymentScheduleType) Size() (n int)
- func (m *PaymentScheduleType) String() string
- func (m *PaymentScheduleType) Unmarshal(dAtA []byte) error
- func (m *PaymentScheduleType) XXX_DiscardUnknown()
- func (m *PaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaymentScheduleType) XXX_Merge(src proto.Message)
- func (*PaymentScheduleType) XXX_OneofWrappers() []interface{}
- func (m *PaymentScheduleType) XXX_Size() int
- func (m *PaymentScheduleType) XXX_Unmarshal(b []byte) error
- type PaymentScheduleType_BlockBasedPaymentScheduleType
- type PaymentScheduleType_EmptyPaymentScheduleType
- type PaymentScheduleType_MonthlyPaymentScheduleType
- type PaymentSchedule_BlockBasedPaymentSchedule
- type PaymentSchedule_EmptyPaymentSchedule
- type PaymentSchedule_MonthlyPaymentSchedule
- type PerformanceRequirement
- func (*PerformanceRequirement) Descriptor() ([]byte, []int)
- func (m *PerformanceRequirement) Marshal() (dAtA []byte, err error)
- func (m *PerformanceRequirement) MarshalTo(dAtA []byte) (int, error)
- func (m *PerformanceRequirement) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PerformanceRequirement) ProtoMessage()
- func (m *PerformanceRequirement) Reset()
- func (m *PerformanceRequirement) Size() (n int)
- func (m *PerformanceRequirement) String() string
- func (m *PerformanceRequirement) Unmarshal(dAtA []byte) error
- func (m *PerformanceRequirement) XXX_DiscardUnknown()
- func (m *PerformanceRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PerformanceRequirement) XXX_Merge(src proto.Message)
- func (m *PerformanceRequirement) XXX_Size() int
- func (m *PerformanceRequirement) XXX_Unmarshal(b []byte) error
- type QueryClient
- 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 QueryPaymentInfoRequest
- func (*QueryPaymentInfoRequest) Descriptor() ([]byte, []int)
- func (m *QueryPaymentInfoRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPaymentInfoRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPaymentInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPaymentInfoRequest) ProtoMessage()
- func (m *QueryPaymentInfoRequest) Reset()
- func (m *QueryPaymentInfoRequest) Size() (n int)
- func (m *QueryPaymentInfoRequest) String() string
- func (m *QueryPaymentInfoRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPaymentInfoRequest) XXX_DiscardUnknown()
- func (m *QueryPaymentInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPaymentInfoRequest) XXX_Merge(src proto.Message)
- func (m *QueryPaymentInfoRequest) XXX_Size() int
- func (m *QueryPaymentInfoRequest) XXX_Unmarshal(b []byte) error
- type QueryPaymentInfoResponse
- func (*QueryPaymentInfoResponse) Descriptor() ([]byte, []int)
- func (m *QueryPaymentInfoResponse) GetPaymentSchedule() PaymentSchedule
- func (m *QueryPaymentInfoResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPaymentInfoResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPaymentInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPaymentInfoResponse) ProtoMessage()
- func (m *QueryPaymentInfoResponse) Reset()
- func (m *QueryPaymentInfoResponse) Size() (n int)
- func (m *QueryPaymentInfoResponse) String() string
- func (m *QueryPaymentInfoResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPaymentInfoResponse) XXX_DiscardUnknown()
- func (m *QueryPaymentInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPaymentInfoResponse) XXX_Merge(src proto.Message)
- func (m *QueryPaymentInfoResponse) XXX_Size() int
- func (m *QueryPaymentInfoResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryValidatorStatsRequest
- func (*QueryValidatorStatsRequest) Descriptor() ([]byte, []int)
- func (m *QueryValidatorStatsRequest) GetValOperAddress() string
- func (m *QueryValidatorStatsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorStatsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorStatsRequest) ProtoMessage()
- func (m *QueryValidatorStatsRequest) Reset()
- func (m *QueryValidatorStatsRequest) Size() (n int)
- func (m *QueryValidatorStatsRequest) String() string
- func (m *QueryValidatorStatsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorStatsRequest) XXX_DiscardUnknown()
- func (m *QueryValidatorStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorStatsRequest) XXX_Merge(src proto.Message)
- func (m *QueryValidatorStatsRequest) XXX_Size() int
- func (m *QueryValidatorStatsRequest) XXX_Unmarshal(b []byte) error
- type QueryValidatorStatsResponse
- func (*QueryValidatorStatsResponse) Descriptor() ([]byte, []int)
- func (m *QueryValidatorStatsResponse) GetStats() ValidatorStats
- func (m *QueryValidatorStatsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorStatsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorStatsResponse) ProtoMessage()
- func (m *QueryValidatorStatsResponse) Reset()
- func (m *QueryValidatorStatsResponse) Size() (n int)
- func (m *QueryValidatorStatsResponse) String() string
- func (m *QueryValidatorStatsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorStatsResponse) XXX_DiscardUnknown()
- func (m *QueryValidatorStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorStatsResponse) XXX_Merge(src proto.Message)
- func (m *QueryValidatorStatsResponse) XXX_Size() int
- func (m *QueryValidatorStatsResponse) XXX_Unmarshal(b []byte) error
- type QueryValidatorsStatsRequest
- func (*QueryValidatorsStatsRequest) Descriptor() ([]byte, []int)
- func (m *QueryValidatorsStatsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorsStatsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorsStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorsStatsRequest) ProtoMessage()
- func (m *QueryValidatorsStatsRequest) Reset()
- func (m *QueryValidatorsStatsRequest) Size() (n int)
- func (m *QueryValidatorsStatsRequest) String() string
- func (m *QueryValidatorsStatsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorsStatsRequest) XXX_DiscardUnknown()
- func (m *QueryValidatorsStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorsStatsRequest) XXX_Merge(src proto.Message)
- func (m *QueryValidatorsStatsRequest) XXX_Size() int
- func (m *QueryValidatorsStatsRequest) XXX_Unmarshal(b []byte) error
- type QueryValidatorsStatsResponse
- func (*QueryValidatorsStatsResponse) Descriptor() ([]byte, []int)
- func (m *QueryValidatorsStatsResponse) GetStats() []ValidatorStats
- func (m *QueryValidatorsStatsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryValidatorsStatsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryValidatorsStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryValidatorsStatsResponse) ProtoMessage()
- func (m *QueryValidatorsStatsResponse) Reset()
- func (m *QueryValidatorsStatsResponse) Size() (n int)
- func (m *QueryValidatorsStatsResponse) String() string
- func (m *QueryValidatorsStatsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryValidatorsStatsResponse) XXX_DiscardUnknown()
- func (m *QueryValidatorsStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryValidatorsStatsResponse) XXX_Merge(src proto.Message)
- func (m *QueryValidatorsStatsResponse) XXX_Size() int
- func (m *QueryValidatorsStatsResponse) XXX_Unmarshal(b []byte) error
- type RewardAssetPrice
- func (*RewardAssetPrice) Descriptor() ([]byte, []int)
- func (m *RewardAssetPrice) GetTimestamp() int64
- func (m *RewardAssetPrice) Marshal() (dAtA []byte, err error)
- func (m *RewardAssetPrice) MarshalTo(dAtA []byte) (int, error)
- func (m *RewardAssetPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RewardAssetPrice) ProtoMessage()
- func (m *RewardAssetPrice) Reset()
- func (m *RewardAssetPrice) Size() (n int)
- func (m *RewardAssetPrice) String() string
- func (m *RewardAssetPrice) Unmarshal(dAtA []byte) error
- func (m *RewardAssetPrice) XXX_DiscardUnknown()
- func (m *RewardAssetPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RewardAssetPrice) XXX_Merge(src proto.Message)
- func (m *RewardAssetPrice) XXX_Size() int
- func (m *RewardAssetPrice) XXX_Unmarshal(b []byte) error
- type RewardQuote
- func (*RewardQuote) Descriptor() ([]byte, []int)
- func (m *RewardQuote) GetAmount() uint64
- func (m *RewardQuote) GetAsset() string
- func (m *RewardQuote) Marshal() (dAtA []byte, err error)
- func (m *RewardQuote) MarshalTo(dAtA []byte) (int, error)
- func (m *RewardQuote) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RewardQuote) ProtoMessage()
- func (m *RewardQuote) Reset()
- func (m *RewardQuote) Size() (n int)
- func (m *RewardQuote) String() string
- func (m *RewardQuote) Unmarshal(dAtA []byte) error
- func (m *RewardQuote) XXX_DiscardUnknown()
- func (m *RewardQuote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RewardQuote) XXX_Merge(src proto.Message)
- func (m *RewardQuote) XXX_Size() int
- func (m *RewardQuote) XXX_Unmarshal(b []byte) error
- type StakingKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) PaymentInfo(ctx context.Context, req *QueryPaymentInfoRequest) (*QueryPaymentInfoResponse, error)
- func (*UnimplementedQueryServer) ValidatorStats(ctx context.Context, req *QueryValidatorStatsRequest) (*QueryValidatorStatsResponse, error)
- func (*UnimplementedQueryServer) ValidatorsStats(ctx context.Context, req *QueryValidatorsStatsRequest) (*QueryValidatorsStatsResponse, error)
- type ValidatorInfo
- func (*ValidatorInfo) Descriptor() ([]byte, []int)
- func (m *ValidatorInfo) GetCommitedBlocksInPeriod() uint64
- func (m *ValidatorInfo) GetCommitedOracleVotesInPeriod() uint64
- func (m *ValidatorInfo) GetInActiveValsetForBlocksInPeriod() uint64
- func (m *ValidatorInfo) GetValOperAddress() string
- func (m *ValidatorInfo) Marshal() (dAtA []byte, err error)
- func (m *ValidatorInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorInfo) ProtoMessage()
- func (m *ValidatorInfo) Reset()
- func (m *ValidatorInfo) Size() (n int)
- func (m *ValidatorInfo) String() string
- func (m *ValidatorInfo) Unmarshal(dAtA []byte) error
- func (m *ValidatorInfo) XXX_DiscardUnknown()
- func (m *ValidatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorInfo) XXX_Merge(src proto.Message)
- func (m *ValidatorInfo) XXX_Size() int
- func (m *ValidatorInfo) XXX_Unmarshal(b []byte) error
- type ValidatorParticipation
- type ValidatorStats
- func (*ValidatorStats) Descriptor() ([]byte, []int)
- func (m *ValidatorStats) GetTotalProducedBlocksInPeriod() uint64
- func (m *ValidatorStats) GetValidatorInfo() ValidatorInfo
- func (m *ValidatorStats) Marshal() (dAtA []byte, err error)
- func (m *ValidatorStats) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorStats) ProtoMessage()
- func (m *ValidatorStats) Reset()
- func (m *ValidatorStats) Size() (n int)
- func (m *ValidatorStats) String() string
- func (m *ValidatorStats) Unmarshal(dAtA []byte) error
- func (m *ValidatorStats) XXX_DiscardUnknown()
- func (m *ValidatorStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorStats) XXX_Merge(src proto.Message)
- func (m *ValidatorStats) XXX_Size() int
- func (m *ValidatorStats) XXX_Unmarshal(b []byte) error
Constants ¶
const ( // EventTypeRevenueDistribution is emitted on every revenue distribution. EventTypeRevenueDistribution = "revenue_distribution" // EventTypeRevenueDistribution is emitted on revenue distribution errors. EventTypeRevenueDistributionError = "revenue_distribution_error" // EventTypeRevenueDistribution is emitted when revenue processing resulted in none revenue. EventTypeRevenueDistributionNone = "revenue_distribution_none" // EventAttributeValidator contains the validator address. EventAttributeValidator = "validator" // EventAttributeRevenueAmount contains the revenue amount sent to the validator. EventAttributeRevenueAmount = "revenue_amount" // EventAttributePerformanceRating contains the validator's performance rating. EventAttributePerformanceRating = "performance_rating" // EventAttributeInActiveValsetForBlocksInPeriod contains the number of blocks the validator has // remained in the active validator set for in the current payment period. EventAttributeInActiveValsetForBlocksInPeriod = "in_active_valset_for_blocks_in_period" // EventAttributeCommittedBlocksInPeriod contains the number of blocks committed by the validator // in the payment period. EventAttributeCommittedBlocksInPeriod = "committed_blocks_in_period" // EventAttributeCommittedOracleVotesInPeriod contains the number of blocks committed by the // validator in the payment period. EventAttributeCommittedOracleVotesInPeriod = "committed_oracle_votes_in_period" // EventAttributeEffectivePeriodProgress contains the revenue amount multiplier value that // corresponds to the effective payment period progress. EventAttributeEffectivePeriodProgress = "effective_period_progress" // EventAttributeTotalBlockInPeriod contains the total number of blocks in the payment period. EventAttributeTotalBlockInPeriod = "total_block_in_period" // EventAttributePaymentFailure is added to the event when a payment fails and contains the // payment error message. EventAttributePaymentFailure = "payment_failure" )
const ( // ModuleName defines the module name ModuleName = "revenue" // StoreKey defines the primary module store key StoreKey = ModuleName RevenueFeeRedistributePoolName = "revenue-fee-redistribute" RevenueTreasuryPoolName = "revenue-treasury" RevenueStakingRewardsPoolName = "revenue-staking-rewards" )
const ConsensusVersion = 1
Variables ¶
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 ( ParamsKey = []byte{0x01} PaymentScheduleKey = []byte{0x02} PrefixValidatorInfoKey = []byte{0x03} PrefixAccumulatedPriceKey = []byte{0x04} )
var ( // DefaultRewardAsset represents the default reward asset. DefaultRewardAsset = params.DefaultDenom // DefaultRewardQuoteAmount represents the default reward amount measured in quote asset. DefaultRewardQuoteAmount uint64 = 2500 // DefaultRewardQuoteAsset represents the default reward quote asset. DefaultRewardQuoteAsset = "USD" // DefaultTWAPWindow represents default time span to calculate TWAP for. Measured in seconds. DefaultTWAPWindow int64 = 24 * 3600 // MaxTWAPWindow represents the maximum window size allowed to set with params // to reduce inordinate state growth MaxTWAPWindow int64 = 30 * 24 * 3600 )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = 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 ( // ErrNoValidatorInfoFound error if there is no validator info found given a validator address. ErrNoValidatorInfoFound = errors.Register(ModuleName, 2, "validator info not found") )
x/revenue module sentinel errors
Functions ¶
func DefaultPaymentScheduleType ¶
func DefaultPaymentScheduleType() isPaymentScheduleType_PaymentScheduleType
DefaultPaymentScheduleType returns the default payment schedule type.
func GetAccumulatedPriceKey ¶
func GetValidatorInfoKey ¶
func GetValidatorInfoKey(addr sdk.ValAddress) []byte
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
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 ValidatePaymentScheduleType ¶
func ValidatePaymentScheduleType(paymentScheduleType isPaymentScheduleType_PaymentScheduleType) error
ValidatePaymentScheduleType checks whether a given payment schedule type implementation is properly initialized.
Types ¶
type BankKeeper ¶
type BankKeeper interface {
// GetDenomMetaData retrieves the denomination metadata. Returns the metadata and true if the
// denom exists, false otherwise.
GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool)
// SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an AccAddress.
// It will panic if the module account does not exist. An error is returned if
// the recipient address is black-listed or if sending the tokens fails.
SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdktypes.AccAddress, amt sdktypes.Coins) error
// SendCoinsFromAccountToModule transfers coins from an AccAddress to a ModuleAccount.
// It will panic if the module account does not exist.
SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdktypes.AccAddress, recipientModule string, amt sdktypes.Coins) error
}
BankKeeper defines the expected interface needed to send coins from one account to another.
type BlockBasedPaymentSchedule ¶
type BlockBasedPaymentSchedule struct {
// The number of blocks in each payment period.
BlocksPerPeriod uint64 `protobuf:"varint,1,opt,name=blocks_per_period,json=blocksPerPeriod,proto3" json:"blocks_per_period,omitempty"`
// The block height at which the current payment period started.
CurrentPeriodStartBlock uint64 `` /* 135-byte string literal not displayed */
}
Represents a payment schedule where revenue payments are processed after a specified number of blocks.
func (*BlockBasedPaymentSchedule) Descriptor ¶
func (*BlockBasedPaymentSchedule) Descriptor() ([]byte, []int)
func (*BlockBasedPaymentSchedule) EffectivePeriodProgress ¶
func (s *BlockBasedPaymentSchedule) EffectivePeriodProgress(ctx sdktypes.Context) math.LegacyDec
EffectivePeriodProgress returns the proportion of the current payment period that has elapsed since the payment period start to the full duration of the period, as a decimal value in the range [0,1]. A value of 0 indicates the period has just started, while 1 indicates the period has fully elapsed from the very beginning to the very end. Otherwise the result equals to the ratio of the blocks created during the period to the number of blocks per period defined in the schedule.
func (*BlockBasedPaymentSchedule) GetBlocksPerPeriod ¶
func (m *BlockBasedPaymentSchedule) GetBlocksPerPeriod() uint64
func (*BlockBasedPaymentSchedule) GetCurrentPeriodStartBlock ¶
func (m *BlockBasedPaymentSchedule) GetCurrentPeriodStartBlock() uint64
func (*BlockBasedPaymentSchedule) IntoPaymentSchedule ¶
func (s *BlockBasedPaymentSchedule) IntoPaymentSchedule() *PaymentSchedule
IntoPaymentSchedule creates a PaymentSchedule with a oneof value populated accordingly.
func (*BlockBasedPaymentSchedule) Marshal ¶
func (m *BlockBasedPaymentSchedule) Marshal() (dAtA []byte, err error)
func (*BlockBasedPaymentSchedule) MarshalTo ¶
func (m *BlockBasedPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
func (*BlockBasedPaymentSchedule) MarshalToSizedBuffer ¶
func (m *BlockBasedPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockBasedPaymentSchedule) MatchesType ¶
func (s *BlockBasedPaymentSchedule) MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
MatchesType checks whether the payment schedule matches a given payment schedule type.
func (*BlockBasedPaymentSchedule) PeriodEnded ¶
func (s *BlockBasedPaymentSchedule) PeriodEnded(ctx sdktypes.Context) bool
PeriodEnded checks whether the end of the current payment period has come. The current period ends when there has been at least BlocksPerPeriod since CurrentPeriodStartBlock.
func (*BlockBasedPaymentSchedule) ProtoMessage ¶
func (*BlockBasedPaymentSchedule) ProtoMessage()
func (*BlockBasedPaymentSchedule) Reset ¶
func (m *BlockBasedPaymentSchedule) Reset()
func (*BlockBasedPaymentSchedule) Size ¶
func (m *BlockBasedPaymentSchedule) Size() (n int)
func (*BlockBasedPaymentSchedule) StartNewPeriod ¶
func (s *BlockBasedPaymentSchedule) StartNewPeriod(ctx sdktypes.Context)
StartNewPeriod sets the current payment period start block to the current block height.
func (*BlockBasedPaymentSchedule) String ¶
func (m *BlockBasedPaymentSchedule) String() string
func (*BlockBasedPaymentSchedule) TotalBlocksInPeriod ¶
func (s *BlockBasedPaymentSchedule) TotalBlocksInPeriod(ctx sdktypes.Context) uint64
TotalBlocksInPeriod returns the amount of blocks created from the beginning of the current period.
func (*BlockBasedPaymentSchedule) Unmarshal ¶
func (m *BlockBasedPaymentSchedule) Unmarshal(dAtA []byte) error
func (*BlockBasedPaymentSchedule) XXX_DiscardUnknown ¶
func (m *BlockBasedPaymentSchedule) XXX_DiscardUnknown()
func (*BlockBasedPaymentSchedule) XXX_Marshal ¶
func (m *BlockBasedPaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockBasedPaymentSchedule) XXX_Merge ¶
func (m *BlockBasedPaymentSchedule) XXX_Merge(src proto.Message)
func (*BlockBasedPaymentSchedule) XXX_Size ¶
func (m *BlockBasedPaymentSchedule) XXX_Size() int
func (*BlockBasedPaymentSchedule) XXX_Unmarshal ¶
func (m *BlockBasedPaymentSchedule) XXX_Unmarshal(b []byte) error
type BlockBasedPaymentScheduleType ¶
type BlockBasedPaymentScheduleType struct {
// The number of blocks in a payment period.
BlocksPerPeriod uint64 `protobuf:"varint,1,opt,name=blocks_per_period,json=blocksPerPeriod,proto3" json:"blocks_per_period,omitempty"`
}
Periods defined by a specific number of blocks, with payments made when the required block count is reached.
func (*BlockBasedPaymentScheduleType) Descriptor ¶
func (*BlockBasedPaymentScheduleType) Descriptor() ([]byte, []int)
func (*BlockBasedPaymentScheduleType) GetBlocksPerPeriod ¶
func (m *BlockBasedPaymentScheduleType) GetBlocksPerPeriod() uint64
func (*BlockBasedPaymentScheduleType) Marshal ¶
func (m *BlockBasedPaymentScheduleType) Marshal() (dAtA []byte, err error)
func (*BlockBasedPaymentScheduleType) MarshalTo ¶
func (m *BlockBasedPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*BlockBasedPaymentScheduleType) MarshalToSizedBuffer ¶
func (m *BlockBasedPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockBasedPaymentScheduleType) ProtoMessage ¶
func (*BlockBasedPaymentScheduleType) ProtoMessage()
func (*BlockBasedPaymentScheduleType) Reset ¶
func (m *BlockBasedPaymentScheduleType) Reset()
func (*BlockBasedPaymentScheduleType) Size ¶
func (m *BlockBasedPaymentScheduleType) Size() (n int)
func (*BlockBasedPaymentScheduleType) String ¶
func (m *BlockBasedPaymentScheduleType) String() string
func (*BlockBasedPaymentScheduleType) Unmarshal ¶
func (m *BlockBasedPaymentScheduleType) Unmarshal(dAtA []byte) error
func (*BlockBasedPaymentScheduleType) XXX_DiscardUnknown ¶
func (m *BlockBasedPaymentScheduleType) XXX_DiscardUnknown()
func (*BlockBasedPaymentScheduleType) XXX_Marshal ¶
func (m *BlockBasedPaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockBasedPaymentScheduleType) XXX_Merge ¶
func (m *BlockBasedPaymentScheduleType) XXX_Merge(src proto.Message)
func (*BlockBasedPaymentScheduleType) XXX_Size ¶
func (m *BlockBasedPaymentScheduleType) XXX_Size() int
func (*BlockBasedPaymentScheduleType) XXX_Unmarshal ¶
func (m *BlockBasedPaymentScheduleType) XXX_Unmarshal(b []byte) error
type EmptyPaymentSchedule ¶
type EmptyPaymentSchedule struct {
}
Represents a payment schedule where revenue is never distributed.
func (*EmptyPaymentSchedule) Descriptor ¶
func (*EmptyPaymentSchedule) Descriptor() ([]byte, []int)
func (*EmptyPaymentSchedule) EffectivePeriodProgress ¶
func (s *EmptyPaymentSchedule) EffectivePeriodProgress(_ sdktypes.Context) math.LegacyDec
EffectivePeriodProgress always returns zero progress for the EmptyPaymentSchedule.
func (*EmptyPaymentSchedule) IntoPaymentSchedule ¶
func (s *EmptyPaymentSchedule) IntoPaymentSchedule() *PaymentSchedule
IntoPaymentSchedule creates a PaymentSchedule with a oneof value populated accordingly.
func (*EmptyPaymentSchedule) Marshal ¶
func (m *EmptyPaymentSchedule) Marshal() (dAtA []byte, err error)
func (*EmptyPaymentSchedule) MarshalTo ¶
func (m *EmptyPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
func (*EmptyPaymentSchedule) MarshalToSizedBuffer ¶
func (m *EmptyPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EmptyPaymentSchedule) MatchesType ¶
func (s *EmptyPaymentSchedule) MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
MatchesType checks whether the payment schedule matches a given payment schedule type.
func (*EmptyPaymentSchedule) PeriodEnded ¶
func (s *EmptyPaymentSchedule) PeriodEnded(_ sdktypes.Context) bool
PeriodEnded always returns false for the EmptyPaymentSchedule.
func (*EmptyPaymentSchedule) ProtoMessage ¶
func (*EmptyPaymentSchedule) ProtoMessage()
func (*EmptyPaymentSchedule) Reset ¶
func (m *EmptyPaymentSchedule) Reset()
func (*EmptyPaymentSchedule) Size ¶
func (m *EmptyPaymentSchedule) Size() (n int)
func (*EmptyPaymentSchedule) StartNewPeriod ¶
func (s *EmptyPaymentSchedule) StartNewPeriod(_ sdktypes.Context)
StartNewPeriod does nothing for the EmptyPaymentSchedule.
func (*EmptyPaymentSchedule) String ¶
func (m *EmptyPaymentSchedule) String() string
func (*EmptyPaymentSchedule) TotalBlocksInPeriod ¶
func (s *EmptyPaymentSchedule) TotalBlocksInPeriod(_ sdktypes.Context) uint64
TotalBlocksInPeriod always returns 0 for the EmptyPaymentSchedule.
func (*EmptyPaymentSchedule) Unmarshal ¶
func (m *EmptyPaymentSchedule) Unmarshal(dAtA []byte) error
func (*EmptyPaymentSchedule) XXX_DiscardUnknown ¶
func (m *EmptyPaymentSchedule) XXX_DiscardUnknown()
func (*EmptyPaymentSchedule) XXX_Marshal ¶
func (m *EmptyPaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyPaymentSchedule) XXX_Merge ¶
func (m *EmptyPaymentSchedule) XXX_Merge(src proto.Message)
func (*EmptyPaymentSchedule) XXX_Size ¶
func (m *EmptyPaymentSchedule) XXX_Size() int
func (*EmptyPaymentSchedule) XXX_Unmarshal ¶
func (m *EmptyPaymentSchedule) XXX_Unmarshal(b []byte) error
type EmptyPaymentScheduleType ¶
type EmptyPaymentScheduleType struct {
}
Endless periods with payments never made.
func (*EmptyPaymentScheduleType) Descriptor ¶
func (*EmptyPaymentScheduleType) Descriptor() ([]byte, []int)
func (*EmptyPaymentScheduleType) Marshal ¶
func (m *EmptyPaymentScheduleType) Marshal() (dAtA []byte, err error)
func (*EmptyPaymentScheduleType) MarshalTo ¶
func (m *EmptyPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*EmptyPaymentScheduleType) MarshalToSizedBuffer ¶
func (m *EmptyPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EmptyPaymentScheduleType) ProtoMessage ¶
func (*EmptyPaymentScheduleType) ProtoMessage()
func (*EmptyPaymentScheduleType) Reset ¶
func (m *EmptyPaymentScheduleType) Reset()
func (*EmptyPaymentScheduleType) Size ¶
func (m *EmptyPaymentScheduleType) Size() (n int)
func (*EmptyPaymentScheduleType) String ¶
func (m *EmptyPaymentScheduleType) String() string
func (*EmptyPaymentScheduleType) Unmarshal ¶
func (m *EmptyPaymentScheduleType) Unmarshal(dAtA []byte) error
func (*EmptyPaymentScheduleType) XXX_DiscardUnknown ¶
func (m *EmptyPaymentScheduleType) XXX_DiscardUnknown()
func (*EmptyPaymentScheduleType) XXX_Marshal ¶
func (m *EmptyPaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyPaymentScheduleType) XXX_Merge ¶
func (m *EmptyPaymentScheduleType) XXX_Merge(src proto.Message)
func (*EmptyPaymentScheduleType) XXX_Size ¶
func (m *EmptyPaymentScheduleType) XXX_Size() int
func (*EmptyPaymentScheduleType) XXX_Unmarshal ¶
func (m *EmptyPaymentScheduleType) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct {
// Revenue module parameters.
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
// The current payment schedule. If nil, the module will use the respective payment schedule for
// the payment schedule type specified in the params.
PaymentSchedule *PaymentSchedule `protobuf:"bytes,2,opt,name=payment_schedule,json=paymentSchedule,proto3" json:"payment_schedule,omitempty"`
// Revenue module list of validators.
Validators []ValidatorInfo `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators"`
}
Defines the revenue module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPaymentSchedule ¶
func (m *GenesisState) GetPaymentSchedule() *PaymentSchedule
func (*GenesisState) GetValidators ¶
func (m *GenesisState) GetValidators() []ValidatorInfo
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 (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
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 MonthlyPaymentSchedule ¶
type MonthlyPaymentSchedule struct {
// The block height at which the current month started.
CurrentMonthStartBlock uint64 `` /* 132-byte string literal not displayed */
// The timestamp of the block at which the current month started.
CurrentMonthStartBlockTs uint64 `` /* 140-byte string literal not displayed */
}
Represents a payment schedule where revenue payments are processed once a month.
func (*MonthlyPaymentSchedule) CurrentMonth ¶
func (s *MonthlyPaymentSchedule) CurrentMonth() time.Month
CurrentMonth returns the time.Month of the current payment period.
func (*MonthlyPaymentSchedule) Descriptor ¶
func (*MonthlyPaymentSchedule) Descriptor() ([]byte, []int)
func (*MonthlyPaymentSchedule) EffectivePeriodProgress ¶
func (s *MonthlyPaymentSchedule) EffectivePeriodProgress(ctx sdktypes.Context) math.LegacyDec
EffectivePeriodProgress returns the proportion of the current payment period that has elapsed since the payment period start to the full duration of the period, as a decimal value in the range [0,1]. A value of 0 indicates the period has just started, while 1 indicates the period has fully elapsed from the very beginning to the very end. Otherwise the result equals to the ratio of time passed since the start of the current period to the whole duration of the month.
func (*MonthlyPaymentSchedule) GetCurrentMonthStartBlock ¶
func (m *MonthlyPaymentSchedule) GetCurrentMonthStartBlock() uint64
func (*MonthlyPaymentSchedule) GetCurrentMonthStartBlockTs ¶
func (m *MonthlyPaymentSchedule) GetCurrentMonthStartBlockTs() uint64
func (*MonthlyPaymentSchedule) IntoPaymentSchedule ¶
func (s *MonthlyPaymentSchedule) IntoPaymentSchedule() *PaymentSchedule
IntoPaymentSchedule creates a PaymentSchedule with a oneof value populated accordingly.
func (*MonthlyPaymentSchedule) Marshal ¶
func (m *MonthlyPaymentSchedule) Marshal() (dAtA []byte, err error)
func (*MonthlyPaymentSchedule) MarshalTo ¶
func (m *MonthlyPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
func (*MonthlyPaymentSchedule) MarshalToSizedBuffer ¶
func (m *MonthlyPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MonthlyPaymentSchedule) MatchesType ¶
func (s *MonthlyPaymentSchedule) MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
MatchesType checks whether the payment schedule matches a given payment schedule type.
func (*MonthlyPaymentSchedule) PeriodEnded ¶
func (s *MonthlyPaymentSchedule) PeriodEnded(ctx sdktypes.Context) bool
PeriodEnded checks whether the end of the current payment period has come. The current period ends when the month of the block creation is different from the current month of the payment schedule.
func (*MonthlyPaymentSchedule) ProtoMessage ¶
func (*MonthlyPaymentSchedule) ProtoMessage()
func (*MonthlyPaymentSchedule) Reset ¶
func (m *MonthlyPaymentSchedule) Reset()
func (*MonthlyPaymentSchedule) Size ¶
func (m *MonthlyPaymentSchedule) Size() (n int)
func (*MonthlyPaymentSchedule) StartNewPeriod ¶
func (s *MonthlyPaymentSchedule) StartNewPeriod(ctx sdktypes.Context)
StartNewPeriod sets the current payment period to new month and block height.
func (*MonthlyPaymentSchedule) String ¶
func (m *MonthlyPaymentSchedule) String() string
func (*MonthlyPaymentSchedule) TotalBlocksInPeriod ¶
func (s *MonthlyPaymentSchedule) TotalBlocksInPeriod(ctx sdktypes.Context) uint64
TotalBlocksInPeriod returns the amount of blocks created from the beginning of the current month.
func (*MonthlyPaymentSchedule) Unmarshal ¶
func (m *MonthlyPaymentSchedule) Unmarshal(dAtA []byte) error
func (*MonthlyPaymentSchedule) XXX_DiscardUnknown ¶
func (m *MonthlyPaymentSchedule) XXX_DiscardUnknown()
func (*MonthlyPaymentSchedule) XXX_Marshal ¶
func (m *MonthlyPaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MonthlyPaymentSchedule) XXX_Merge ¶
func (m *MonthlyPaymentSchedule) XXX_Merge(src proto.Message)
func (*MonthlyPaymentSchedule) XXX_Size ¶
func (m *MonthlyPaymentSchedule) XXX_Size() int
func (*MonthlyPaymentSchedule) XXX_Unmarshal ¶
func (m *MonthlyPaymentSchedule) XXX_Unmarshal(b []byte) error
type MonthlyPaymentScheduleType ¶
type MonthlyPaymentScheduleType struct {
}
Monthly periods with payments made at the end of each month.
func (*MonthlyPaymentScheduleType) Descriptor ¶
func (*MonthlyPaymentScheduleType) Descriptor() ([]byte, []int)
func (*MonthlyPaymentScheduleType) Marshal ¶
func (m *MonthlyPaymentScheduleType) Marshal() (dAtA []byte, err error)
func (*MonthlyPaymentScheduleType) MarshalTo ¶
func (m *MonthlyPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*MonthlyPaymentScheduleType) MarshalToSizedBuffer ¶
func (m *MonthlyPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MonthlyPaymentScheduleType) ProtoMessage ¶
func (*MonthlyPaymentScheduleType) ProtoMessage()
func (*MonthlyPaymentScheduleType) Reset ¶
func (m *MonthlyPaymentScheduleType) Reset()
func (*MonthlyPaymentScheduleType) Size ¶
func (m *MonthlyPaymentScheduleType) Size() (n int)
func (*MonthlyPaymentScheduleType) String ¶
func (m *MonthlyPaymentScheduleType) String() string
func (*MonthlyPaymentScheduleType) Unmarshal ¶
func (m *MonthlyPaymentScheduleType) Unmarshal(dAtA []byte) error
func (*MonthlyPaymentScheduleType) XXX_DiscardUnknown ¶
func (m *MonthlyPaymentScheduleType) XXX_DiscardUnknown()
func (*MonthlyPaymentScheduleType) XXX_Marshal ¶
func (m *MonthlyPaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MonthlyPaymentScheduleType) XXX_Merge ¶
func (m *MonthlyPaymentScheduleType) XXX_Merge(src proto.Message)
func (*MonthlyPaymentScheduleType) XXX_Size ¶
func (m *MonthlyPaymentScheduleType) XXX_Size() int
func (*MonthlyPaymentScheduleType) XXX_Unmarshal ¶
func (m *MonthlyPaymentScheduleType) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface {
// Updates the parameters of the revenue module. This action can only be performed by the
// module's authority.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// FundTreasury funds the revenue treasury module account with the specified amount.
FundTreasury(ctx context.Context, in *MsgFundTreasury, opts ...grpc.CallOption) (*MsgFundTreasuryResponse, 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 MsgFundTreasury ¶
type MsgFundTreasury struct {
// The signer of the message.
Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
// The amount of coins to fund the revenue treasury pool with. Must match the reward asset denom.
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}
Request type for the Msg/FundTreasury RPC method.
func (*MsgFundTreasury) Descriptor ¶
func (*MsgFundTreasury) Descriptor() ([]byte, []int)
func (*MsgFundTreasury) GetAmount ¶
func (m *MsgFundTreasury) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins
func (*MsgFundTreasury) GetSender ¶
func (m *MsgFundTreasury) GetSender() string
func (*MsgFundTreasury) Marshal ¶
func (m *MsgFundTreasury) Marshal() (dAtA []byte, err error)
func (*MsgFundTreasury) MarshalToSizedBuffer ¶
func (m *MsgFundTreasury) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgFundTreasury) ProtoMessage ¶
func (*MsgFundTreasury) ProtoMessage()
func (*MsgFundTreasury) Reset ¶
func (m *MsgFundTreasury) Reset()
func (*MsgFundTreasury) Size ¶
func (m *MsgFundTreasury) Size() (n int)
func (*MsgFundTreasury) String ¶
func (m *MsgFundTreasury) String() string
func (*MsgFundTreasury) Unmarshal ¶
func (m *MsgFundTreasury) Unmarshal(dAtA []byte) error
func (*MsgFundTreasury) Validate ¶
func (msg *MsgFundTreasury) Validate(params Params) error
func (*MsgFundTreasury) XXX_DiscardUnknown ¶
func (m *MsgFundTreasury) XXX_DiscardUnknown()
func (*MsgFundTreasury) XXX_Marshal ¶
func (m *MsgFundTreasury) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgFundTreasury) XXX_Merge ¶
func (m *MsgFundTreasury) XXX_Merge(src proto.Message)
func (*MsgFundTreasury) XXX_Size ¶
func (m *MsgFundTreasury) XXX_Size() int
func (*MsgFundTreasury) XXX_Unmarshal ¶
func (m *MsgFundTreasury) XXX_Unmarshal(b []byte) error
type MsgFundTreasuryResponse ¶
type MsgFundTreasuryResponse struct {
}
Response type for the Msg/FundTreasury RPC method.
func (*MsgFundTreasuryResponse) Descriptor ¶
func (*MsgFundTreasuryResponse) Descriptor() ([]byte, []int)
func (*MsgFundTreasuryResponse) Marshal ¶
func (m *MsgFundTreasuryResponse) Marshal() (dAtA []byte, err error)
func (*MsgFundTreasuryResponse) MarshalTo ¶
func (m *MsgFundTreasuryResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgFundTreasuryResponse) MarshalToSizedBuffer ¶
func (m *MsgFundTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgFundTreasuryResponse) ProtoMessage ¶
func (*MsgFundTreasuryResponse) ProtoMessage()
func (*MsgFundTreasuryResponse) Reset ¶
func (m *MsgFundTreasuryResponse) Reset()
func (*MsgFundTreasuryResponse) Size ¶
func (m *MsgFundTreasuryResponse) Size() (n int)
func (*MsgFundTreasuryResponse) String ¶
func (m *MsgFundTreasuryResponse) String() string
func (*MsgFundTreasuryResponse) Unmarshal ¶
func (m *MsgFundTreasuryResponse) Unmarshal(dAtA []byte) error
func (*MsgFundTreasuryResponse) XXX_DiscardUnknown ¶
func (m *MsgFundTreasuryResponse) XXX_DiscardUnknown()
func (*MsgFundTreasuryResponse) XXX_Marshal ¶
func (m *MsgFundTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgFundTreasuryResponse) XXX_Merge ¶
func (m *MsgFundTreasuryResponse) XXX_Merge(src proto.Message)
func (*MsgFundTreasuryResponse) XXX_Size ¶
func (m *MsgFundTreasuryResponse) XXX_Size() int
func (*MsgFundTreasuryResponse) XXX_Unmarshal ¶
func (m *MsgFundTreasuryResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface {
// Updates the parameters of the revenue module. This action can only be performed by the
// module's authority.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// FundTreasury funds the revenue treasury module account with the specified amount.
FundTreasury(context.Context, *MsgFundTreasury) (*MsgFundTreasuryResponse, error)
}
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct {
// The address of the authority of the module.
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
// The new parameters of the module. All parameters must be supplied.
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}
Request type for the Msg/UpdateParams RPC method.
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) Validate ¶
func (msg *MsgUpdateParams) Validate(params Params) 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 {
}
Response type for the Msg/UpdateParams RPC method.
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 OracleKeeper ¶
type OracleKeeper interface {
// GetPriceForCurrencyPair gets a price for a given asset pair
GetPriceForCurrencyPair(ctx sdktypes.Context, cp slinkytypes.CurrencyPair) (oracletypes.QuotePrice, error)
// GetDecimalsForCurrencyPair gets decimals for a given pair
GetDecimalsForCurrencyPair(ctx sdktypes.Context, cp slinkytypes.CurrencyPair) (decimals uint64, err error)
}
OracleKeeper defines the expected interfaces getting oracle price for a given asset pair.
type Params ¶
type Params struct {
// The asset used in revenue payments to validators. Expected to be a native token of the chain
// with its denom metadata registered in the bank module. The denom metadata must have a defined
// symbol field and contain a denom unit with an alias equal to the symbol and a specified
// exponent.
RewardAsset string `protobuf:"bytes,1,opt,name=reward_asset,json=rewardAsset,proto3" json:"reward_asset,omitempty"`
// Quotation of the reward asset.
RewardQuote *RewardQuote `protobuf:"bytes,2,opt,name=reward_quote,json=rewardQuote,proto3" json:"reward_quote,omitempty"`
// Specifies performance requirements for validators in scope of blocks signing and creation. If
// not met, the validator is not rewarded.
BlocksPerformanceRequirement *PerformanceRequirement `` /* 147-byte string literal not displayed */
// Specifies performance requirements for validators in scope of the oracle price votes. If not
// met, the validator is not rewarded.
OracleVotesPerformanceRequirement *PerformanceRequirement `` /* 164-byte string literal not displayed */
// Indicates the currently active type of payment schedule.
PaymentScheduleType *PaymentScheduleType `protobuf:"bytes,5,opt,name=payment_schedule_type,json=paymentScheduleType,proto3" json:"payment_schedule_type,omitempty"`
// The time window, in seconds, used to calculate the TWAP of the reward asset.
TwapWindow int64 `protobuf:"varint,6,opt,name=twap_window,json=twapWindow,proto3" json:"twap_window,omitempty"`
}
Defines the parameters for the module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns the default set of parameters.
func NewParams ¶
func NewParams( rewardAsset string, rewardQuote *RewardQuote, blocksPerformanceRequirement *PerformanceRequirement, oraclePricesPerformanceRequirement *PerformanceRequirement, paymentScheduleType isPaymentScheduleType_PaymentScheduleType, ) Params
NewParams creates a new Params instance.
func (*Params) Descriptor ¶
func (*Params) GetBlocksPerformanceRequirement ¶
func (m *Params) GetBlocksPerformanceRequirement() *PerformanceRequirement
func (*Params) GetOracleVotesPerformanceRequirement ¶
func (m *Params) GetOracleVotesPerformanceRequirement() *PerformanceRequirement
func (*Params) GetPaymentScheduleType ¶
func (m *Params) GetPaymentScheduleType() *PaymentScheduleType
func (*Params) GetRewardAsset ¶
func (*Params) GetRewardQuote ¶
func (m *Params) GetRewardQuote() *RewardQuote
func (*Params) GetTwapWindow ¶
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 PaymentSchedule ¶
type PaymentSchedule struct {
// Types that are valid to be assigned to PaymentSchedule:
// *PaymentSchedule_MonthlyPaymentSchedule
// *PaymentSchedule_BlockBasedPaymentSchedule
// *PaymentSchedule_EmptyPaymentSchedule
PaymentSchedule isPaymentSchedule_PaymentSchedule `protobuf_oneof:"payment_schedule"`
}
A model that contains information specific to the currently active payment schedule. The oneof implementations define conditions for payment periods ending and track the progress of the current payment period. This is a module's state variable. The inner oneof must correspond with the respective payment schedule type defined in the module params. In runtime, on a mismatch due to e.g. MsgUpdateParams execution, the module will switch to the payment schedule that corresponds to the payment schedule type automatically.
func (*PaymentSchedule) Descriptor ¶
func (*PaymentSchedule) Descriptor() ([]byte, []int)
func (*PaymentSchedule) GetBlockBasedPaymentSchedule ¶
func (m *PaymentSchedule) GetBlockBasedPaymentSchedule() *BlockBasedPaymentSchedule
func (*PaymentSchedule) GetEmptyPaymentSchedule ¶
func (m *PaymentSchedule) GetEmptyPaymentSchedule() *EmptyPaymentSchedule
func (*PaymentSchedule) GetMonthlyPaymentSchedule ¶
func (m *PaymentSchedule) GetMonthlyPaymentSchedule() *MonthlyPaymentSchedule
func (*PaymentSchedule) GetPaymentSchedule ¶
func (m *PaymentSchedule) GetPaymentSchedule() isPaymentSchedule_PaymentSchedule
func (*PaymentSchedule) IntoPaymentScheduleI ¶
func (s *PaymentSchedule) IntoPaymentScheduleI() (PaymentScheduleI, error)
IntoPaymentScheduleI returns the oneof value populated in a given PaymentSchedule as a PaymentScheduleI.
func (*PaymentSchedule) Marshal ¶
func (m *PaymentSchedule) Marshal() (dAtA []byte, err error)
func (*PaymentSchedule) MarshalToSizedBuffer ¶
func (m *PaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentSchedule) ProtoMessage ¶
func (*PaymentSchedule) ProtoMessage()
func (*PaymentSchedule) Reset ¶
func (m *PaymentSchedule) Reset()
func (*PaymentSchedule) Size ¶
func (m *PaymentSchedule) Size() (n int)
func (*PaymentSchedule) String ¶
func (m *PaymentSchedule) String() string
func (*PaymentSchedule) Unmarshal ¶
func (m *PaymentSchedule) Unmarshal(dAtA []byte) error
func (*PaymentSchedule) XXX_DiscardUnknown ¶
func (m *PaymentSchedule) XXX_DiscardUnknown()
func (*PaymentSchedule) XXX_Marshal ¶
func (m *PaymentSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaymentSchedule) XXX_Merge ¶
func (m *PaymentSchedule) XXX_Merge(src proto.Message)
func (*PaymentSchedule) XXX_OneofWrappers ¶
func (*PaymentSchedule) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*PaymentSchedule) XXX_Size ¶
func (m *PaymentSchedule) XXX_Size() int
func (*PaymentSchedule) XXX_Unmarshal ¶
func (m *PaymentSchedule) XXX_Unmarshal(b []byte) error
type PaymentScheduleI ¶
type PaymentScheduleI interface {
proto.Message
// PeriodEnded checks whether the end of the current payment period has come. The check is made
// against the passed context and the payment schedule's parameters and conditions.
PeriodEnded(ctx sdktypes.Context) bool
// EffectivePeriodProgress returns the proportion of the current payment period that has elapsed
// since the payment period start to the full duration of the period, as a decimal value in the
// range [0,1]. A value of 0 indicates the period has just started, while 1 indicates the period
// has fully elapsed from the very beginning to the very end. The check is made against the
// passed context and the payment schedule's parameters and conditions.
EffectivePeriodProgress(ctx sdktypes.Context) math.LegacyDec
// TotalBlocksInPeriod returns the amount of blocks created within the current payment period.
// The check is made against the passed context.
TotalBlocksInPeriod(ctx sdktypes.Context) uint64
// StartNewPeriod resets the current payment period to the start of the new one. The passed
// context is used to define the new period's start conditions.
StartNewPeriod(ctx sdktypes.Context)
// MatchesType checks whether the payment schedule matches a given payment schedule type.
MatchesType(t isPaymentScheduleType_PaymentScheduleType) bool
// IntoPaymentSchedule creates a PaymentSchedule with a oneof value populated accordingly.
IntoPaymentSchedule() *PaymentSchedule
}
The PaymentScheduleI interface defines the structure and behavior of different payment schedule types for distributing validator compensation. It provides methods to manage and track payment periods, ensuring rewards are distributed accurately based on the defined schedule type.
func PaymentScheduleIByType ¶
func PaymentScheduleIByType(paymentScheduleType isPaymentScheduleType_PaymentScheduleType) PaymentScheduleI
PaymentScheduleIByType returns a PaymentScheduleI that corresponds to the given PaymentScheduleType.
type PaymentScheduleType ¶
type PaymentScheduleType struct {
// Types that are valid to be assigned to PaymentScheduleType:
//
// *PaymentScheduleType_MonthlyPaymentScheduleType
// *PaymentScheduleType_BlockBasedPaymentScheduleType
// *PaymentScheduleType_EmptyPaymentScheduleType
PaymentScheduleType isPaymentScheduleType_PaymentScheduleType `protobuf_oneof:"payment_schedule_type"`
}
A model that contains information specific to the currently active payment schedule type. The oneof implementations define the payment schedule that must be used currently. This is a module's parameter. It's not updated automatically in runtime in contrast to the payment schedule which is a state variable, but is updated via MsgUpdateParams.
func (*PaymentScheduleType) Descriptor ¶
func (*PaymentScheduleType) Descriptor() ([]byte, []int)
func (*PaymentScheduleType) GetBlockBasedPaymentScheduleType ¶
func (m *PaymentScheduleType) GetBlockBasedPaymentScheduleType() *BlockBasedPaymentScheduleType
func (*PaymentScheduleType) GetEmptyPaymentScheduleType ¶
func (m *PaymentScheduleType) GetEmptyPaymentScheduleType() *EmptyPaymentScheduleType
func (*PaymentScheduleType) GetMonthlyPaymentScheduleType ¶
func (m *PaymentScheduleType) GetMonthlyPaymentScheduleType() *MonthlyPaymentScheduleType
func (*PaymentScheduleType) GetPaymentScheduleType ¶
func (m *PaymentScheduleType) GetPaymentScheduleType() isPaymentScheduleType_PaymentScheduleType
func (*PaymentScheduleType) Marshal ¶
func (m *PaymentScheduleType) Marshal() (dAtA []byte, err error)
func (*PaymentScheduleType) MarshalTo ¶
func (m *PaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*PaymentScheduleType) MarshalToSizedBuffer ¶
func (m *PaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentScheduleType) ProtoMessage ¶
func (*PaymentScheduleType) ProtoMessage()
func (*PaymentScheduleType) Reset ¶
func (m *PaymentScheduleType) Reset()
func (*PaymentScheduleType) Size ¶
func (m *PaymentScheduleType) Size() (n int)
func (*PaymentScheduleType) String ¶
func (m *PaymentScheduleType) String() string
func (*PaymentScheduleType) Unmarshal ¶
func (m *PaymentScheduleType) Unmarshal(dAtA []byte) error
func (*PaymentScheduleType) XXX_DiscardUnknown ¶
func (m *PaymentScheduleType) XXX_DiscardUnknown()
func (*PaymentScheduleType) XXX_Marshal ¶
func (m *PaymentScheduleType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaymentScheduleType) XXX_Merge ¶
func (m *PaymentScheduleType) XXX_Merge(src proto.Message)
func (*PaymentScheduleType) XXX_OneofWrappers ¶
func (*PaymentScheduleType) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*PaymentScheduleType) XXX_Size ¶
func (m *PaymentScheduleType) XXX_Size() int
func (*PaymentScheduleType) XXX_Unmarshal ¶
func (m *PaymentScheduleType) XXX_Unmarshal(b []byte) error
type PaymentScheduleType_BlockBasedPaymentScheduleType ¶
type PaymentScheduleType_BlockBasedPaymentScheduleType struct {
BlockBasedPaymentScheduleType *BlockBasedPaymentScheduleType `` /* 160-byte string literal not displayed */
}
func (*PaymentScheduleType_BlockBasedPaymentScheduleType) MarshalTo ¶
func (m *PaymentScheduleType_BlockBasedPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*PaymentScheduleType_BlockBasedPaymentScheduleType) MarshalToSizedBuffer ¶
func (m *PaymentScheduleType_BlockBasedPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentScheduleType_BlockBasedPaymentScheduleType) Size ¶
func (m *PaymentScheduleType_BlockBasedPaymentScheduleType) Size() (n int)
type PaymentScheduleType_EmptyPaymentScheduleType ¶
type PaymentScheduleType_EmptyPaymentScheduleType struct {
EmptyPaymentScheduleType *EmptyPaymentScheduleType `` /* 143-byte string literal not displayed */
}
func (*PaymentScheduleType_EmptyPaymentScheduleType) MarshalTo ¶
func (m *PaymentScheduleType_EmptyPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*PaymentScheduleType_EmptyPaymentScheduleType) MarshalToSizedBuffer ¶
func (m *PaymentScheduleType_EmptyPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentScheduleType_EmptyPaymentScheduleType) Size ¶
func (m *PaymentScheduleType_EmptyPaymentScheduleType) Size() (n int)
type PaymentScheduleType_MonthlyPaymentScheduleType ¶
type PaymentScheduleType_MonthlyPaymentScheduleType struct {
MonthlyPaymentScheduleType *MonthlyPaymentScheduleType `` /* 149-byte string literal not displayed */
}
func (*PaymentScheduleType_MonthlyPaymentScheduleType) MarshalTo ¶
func (m *PaymentScheduleType_MonthlyPaymentScheduleType) MarshalTo(dAtA []byte) (int, error)
func (*PaymentScheduleType_MonthlyPaymentScheduleType) MarshalToSizedBuffer ¶
func (m *PaymentScheduleType_MonthlyPaymentScheduleType) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentScheduleType_MonthlyPaymentScheduleType) Size ¶
func (m *PaymentScheduleType_MonthlyPaymentScheduleType) Size() (n int)
type PaymentSchedule_BlockBasedPaymentSchedule ¶
type PaymentSchedule_BlockBasedPaymentSchedule struct {
BlockBasedPaymentSchedule *BlockBasedPaymentSchedule `` /* 146-byte string literal not displayed */
}
func (*PaymentSchedule_BlockBasedPaymentSchedule) MarshalTo ¶
func (m *PaymentSchedule_BlockBasedPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
func (*PaymentSchedule_BlockBasedPaymentSchedule) MarshalToSizedBuffer ¶
func (m *PaymentSchedule_BlockBasedPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentSchedule_BlockBasedPaymentSchedule) Size ¶
func (m *PaymentSchedule_BlockBasedPaymentSchedule) Size() (n int)
type PaymentSchedule_EmptyPaymentSchedule ¶
type PaymentSchedule_EmptyPaymentSchedule struct {
EmptyPaymentSchedule *EmptyPaymentSchedule `` /* 129-byte string literal not displayed */
}
func (*PaymentSchedule_EmptyPaymentSchedule) MarshalTo ¶
func (m *PaymentSchedule_EmptyPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
func (*PaymentSchedule_EmptyPaymentSchedule) MarshalToSizedBuffer ¶
func (m *PaymentSchedule_EmptyPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentSchedule_EmptyPaymentSchedule) Size ¶
func (m *PaymentSchedule_EmptyPaymentSchedule) Size() (n int)
type PaymentSchedule_MonthlyPaymentSchedule ¶
type PaymentSchedule_MonthlyPaymentSchedule struct {
MonthlyPaymentSchedule *MonthlyPaymentSchedule `` /* 135-byte string literal not displayed */
}
func (*PaymentSchedule_MonthlyPaymentSchedule) MarshalTo ¶
func (m *PaymentSchedule_MonthlyPaymentSchedule) MarshalTo(dAtA []byte) (int, error)
func (*PaymentSchedule_MonthlyPaymentSchedule) MarshalToSizedBuffer ¶
func (m *PaymentSchedule_MonthlyPaymentSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentSchedule_MonthlyPaymentSchedule) Size ¶
func (m *PaymentSchedule_MonthlyPaymentSchedule) Size() (n int)
type PerformanceRequirement ¶
type PerformanceRequirement struct {
// The fraction of the total performance a validator can miss without affecting their reward.
// Represented as a decimal value in the range [0.0, 1.0], where 1.0 corresponds to 100%.
AllowedToMiss cosmossdk_io_math.LegacyDec `` /* 131-byte string literal not displayed */
// The minimum fraction of the total performance a validator must achieve to be eligible for
// network rewards. Validators falling below this threshold will not receive any rewards.
// Represented as a decimal value in the range [0.0, 1.0], where 1.0 corresponds to 100%.
RequiredAtLeast cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */
}
Specifies a performance criteria that validators must meet to qualify for network rewards.
func DefaultBlocksPerformanceRequirement ¶
func DefaultBlocksPerformanceRequirement() *PerformanceRequirement
DefaultBlocksPerformanceRequirement returns the default blocks performance requirement.
func DefaultOracleVotesPerformanceRequirement ¶
func DefaultOracleVotesPerformanceRequirement() *PerformanceRequirement
DefaultOracleVotesPerformanceRequirement returns the default oracle votes performance requirement.
func (*PerformanceRequirement) Descriptor ¶
func (*PerformanceRequirement) Descriptor() ([]byte, []int)
func (*PerformanceRequirement) Marshal ¶
func (m *PerformanceRequirement) Marshal() (dAtA []byte, err error)
func (*PerformanceRequirement) MarshalTo ¶
func (m *PerformanceRequirement) MarshalTo(dAtA []byte) (int, error)
func (*PerformanceRequirement) MarshalToSizedBuffer ¶
func (m *PerformanceRequirement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PerformanceRequirement) ProtoMessage ¶
func (*PerformanceRequirement) ProtoMessage()
func (*PerformanceRequirement) Reset ¶
func (m *PerformanceRequirement) Reset()
func (*PerformanceRequirement) Size ¶
func (m *PerformanceRequirement) Size() (n int)
func (*PerformanceRequirement) String ¶
func (m *PerformanceRequirement) String() string
func (*PerformanceRequirement) Unmarshal ¶
func (m *PerformanceRequirement) Unmarshal(dAtA []byte) error
func (*PerformanceRequirement) XXX_DiscardUnknown ¶
func (m *PerformanceRequirement) XXX_DiscardUnknown()
func (*PerformanceRequirement) XXX_Marshal ¶
func (m *PerformanceRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PerformanceRequirement) XXX_Merge ¶
func (m *PerformanceRequirement) XXX_Merge(src proto.Message)
func (*PerformanceRequirement) XXX_Size ¶
func (m *PerformanceRequirement) XXX_Size() int
func (*PerformanceRequirement) XXX_Unmarshal ¶
func (m *PerformanceRequirement) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface {
// Fetches the current parameters of the revenue module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Fetches the current payment info of the module such as payment schedule and revenue details.
PaymentInfo(ctx context.Context, in *QueryPaymentInfoRequest, opts ...grpc.CallOption) (*QueryPaymentInfoResponse, error)
// Fetches a given validator's stats from the revenue module's state.
ValidatorStats(ctx context.Context, in *QueryValidatorStatsRequest, opts ...grpc.CallOption) (*QueryValidatorStatsResponse, error)
// Fetches all validators' stats from the revenue module's state.
ValidatorsStats(ctx context.Context, in *QueryValidatorsStatsRequest, opts ...grpc.CallOption) (*QueryValidatorsStatsResponse, 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 QueryParamsRequest ¶
type QueryParamsRequest struct {
}
Request type for the Query/Params RPC method.
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 {
// Contains all parameters of the module.
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
Response type for the Query/Params RPC method.
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 QueryPaymentInfoRequest ¶
type QueryPaymentInfoRequest struct {
}
Request type for the Query/PaymentInfo RPC method.
func (*QueryPaymentInfoRequest) Descriptor ¶
func (*QueryPaymentInfoRequest) Descriptor() ([]byte, []int)
func (*QueryPaymentInfoRequest) Marshal ¶
func (m *QueryPaymentInfoRequest) Marshal() (dAtA []byte, err error)
func (*QueryPaymentInfoRequest) MarshalTo ¶
func (m *QueryPaymentInfoRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPaymentInfoRequest) MarshalToSizedBuffer ¶
func (m *QueryPaymentInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPaymentInfoRequest) ProtoMessage ¶
func (*QueryPaymentInfoRequest) ProtoMessage()
func (*QueryPaymentInfoRequest) Reset ¶
func (m *QueryPaymentInfoRequest) Reset()
func (*QueryPaymentInfoRequest) Size ¶
func (m *QueryPaymentInfoRequest) Size() (n int)
func (*QueryPaymentInfoRequest) String ¶
func (m *QueryPaymentInfoRequest) String() string
func (*QueryPaymentInfoRequest) Unmarshal ¶
func (m *QueryPaymentInfoRequest) Unmarshal(dAtA []byte) error
func (*QueryPaymentInfoRequest) XXX_DiscardUnknown ¶
func (m *QueryPaymentInfoRequest) XXX_DiscardUnknown()
func (*QueryPaymentInfoRequest) XXX_Marshal ¶
func (m *QueryPaymentInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPaymentInfoRequest) XXX_Merge ¶
func (m *QueryPaymentInfoRequest) XXX_Merge(src proto.Message)
func (*QueryPaymentInfoRequest) XXX_Size ¶
func (m *QueryPaymentInfoRequest) XXX_Size() int
func (*QueryPaymentInfoRequest) XXX_Unmarshal ¶
func (m *QueryPaymentInfoRequest) XXX_Unmarshal(b []byte) error
type QueryPaymentInfoResponse ¶
type QueryPaymentInfoResponse struct {
// The current payment schedule.
PaymentSchedule PaymentSchedule `protobuf:"bytes,1,opt,name=payment_schedule,json=paymentSchedule,proto3" json:"payment_schedule"`
// Revenue amount multiplier value that corresponds to the effective payment period progress.
EffectivePeriodProgress cosmossdk_io_math.LegacyDec `` /* 161-byte string literal not displayed */
// The current TWAP of the reward asset in quote asset. Is calculated as:
// twap_from_time_t(n)_to_time_t(m) = (cumulative_price_at_t(n) - cumulative_price_at_t(m)) / (t(n) - t(m))
RewardAssetTwap cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */
// The current evaluation of the base revenue amount. This is the maximum amount a validator can
// receive in the current price condition if not affected with reducing factors (e.g. imperfect
// performance, incomplete payment period, partial validator set presence).
BaseRevenueAmount github_com_cosmos_cosmos_sdk_types.Coin `` /* 155-byte string literal not displayed */
}
Response type for the Query/PaymentInfo RPC method.
func (*QueryPaymentInfoResponse) Descriptor ¶
func (*QueryPaymentInfoResponse) Descriptor() ([]byte, []int)
func (*QueryPaymentInfoResponse) GetPaymentSchedule ¶
func (m *QueryPaymentInfoResponse) GetPaymentSchedule() PaymentSchedule
func (*QueryPaymentInfoResponse) Marshal ¶
func (m *QueryPaymentInfoResponse) Marshal() (dAtA []byte, err error)
func (*QueryPaymentInfoResponse) MarshalTo ¶
func (m *QueryPaymentInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPaymentInfoResponse) MarshalToSizedBuffer ¶
func (m *QueryPaymentInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPaymentInfoResponse) ProtoMessage ¶
func (*QueryPaymentInfoResponse) ProtoMessage()
func (*QueryPaymentInfoResponse) Reset ¶
func (m *QueryPaymentInfoResponse) Reset()
func (*QueryPaymentInfoResponse) Size ¶
func (m *QueryPaymentInfoResponse) Size() (n int)
func (*QueryPaymentInfoResponse) String ¶
func (m *QueryPaymentInfoResponse) String() string
func (*QueryPaymentInfoResponse) Unmarshal ¶
func (m *QueryPaymentInfoResponse) Unmarshal(dAtA []byte) error
func (*QueryPaymentInfoResponse) XXX_DiscardUnknown ¶
func (m *QueryPaymentInfoResponse) XXX_DiscardUnknown()
func (*QueryPaymentInfoResponse) XXX_Marshal ¶
func (m *QueryPaymentInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPaymentInfoResponse) XXX_Merge ¶
func (m *QueryPaymentInfoResponse) XXX_Merge(src proto.Message)
func (*QueryPaymentInfoResponse) XXX_Size ¶
func (m *QueryPaymentInfoResponse) XXX_Size() int
func (*QueryPaymentInfoResponse) XXX_Unmarshal ¶
func (m *QueryPaymentInfoResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
// Fetches the current parameters of the revenue module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// Fetches the current payment info of the module such as payment schedule and revenue details.
PaymentInfo(context.Context, *QueryPaymentInfoRequest) (*QueryPaymentInfoResponse, error)
// Fetches a given validator's stats from the revenue module's state.
ValidatorStats(context.Context, *QueryValidatorStatsRequest) (*QueryValidatorStatsResponse, error)
// Fetches all validators' stats from the revenue module's state.
ValidatorsStats(context.Context, *QueryValidatorsStatsRequest) (*QueryValidatorsStatsResponse, error)
}
QueryServer is the server API for Query service.
type QueryValidatorStatsRequest ¶
type QueryValidatorStatsRequest struct {
// The validator's node operator address.
ValOperAddress string `protobuf:"bytes,1,opt,name=val_oper_address,json=valOperAddress,proto3" json:"val_oper_address,omitempty"`
}
Request type for the Query/ValidatorStats RPC method.
func (*QueryValidatorStatsRequest) Descriptor ¶
func (*QueryValidatorStatsRequest) Descriptor() ([]byte, []int)
func (*QueryValidatorStatsRequest) GetValOperAddress ¶
func (m *QueryValidatorStatsRequest) GetValOperAddress() string
func (*QueryValidatorStatsRequest) Marshal ¶
func (m *QueryValidatorStatsRequest) Marshal() (dAtA []byte, err error)
func (*QueryValidatorStatsRequest) MarshalTo ¶
func (m *QueryValidatorStatsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorStatsRequest) MarshalToSizedBuffer ¶
func (m *QueryValidatorStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorStatsRequest) ProtoMessage ¶
func (*QueryValidatorStatsRequest) ProtoMessage()
func (*QueryValidatorStatsRequest) Reset ¶
func (m *QueryValidatorStatsRequest) Reset()
func (*QueryValidatorStatsRequest) Size ¶
func (m *QueryValidatorStatsRequest) Size() (n int)
func (*QueryValidatorStatsRequest) String ¶
func (m *QueryValidatorStatsRequest) String() string
func (*QueryValidatorStatsRequest) Unmarshal ¶
func (m *QueryValidatorStatsRequest) Unmarshal(dAtA []byte) error
func (*QueryValidatorStatsRequest) XXX_DiscardUnknown ¶
func (m *QueryValidatorStatsRequest) XXX_DiscardUnknown()
func (*QueryValidatorStatsRequest) XXX_Marshal ¶
func (m *QueryValidatorStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorStatsRequest) XXX_Merge ¶
func (m *QueryValidatorStatsRequest) XXX_Merge(src proto.Message)
func (*QueryValidatorStatsRequest) XXX_Size ¶
func (m *QueryValidatorStatsRequest) XXX_Size() int
func (*QueryValidatorStatsRequest) XXX_Unmarshal ¶
func (m *QueryValidatorStatsRequest) XXX_Unmarshal(b []byte) error
type QueryValidatorStatsResponse ¶
type QueryValidatorStatsResponse struct {
// Contains the validator's information.
Stats ValidatorStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats"`
}
Response type for the Query/ValidatorStats RPC method.
func (*QueryValidatorStatsResponse) Descriptor ¶
func (*QueryValidatorStatsResponse) Descriptor() ([]byte, []int)
func (*QueryValidatorStatsResponse) GetStats ¶
func (m *QueryValidatorStatsResponse) GetStats() ValidatorStats
func (*QueryValidatorStatsResponse) Marshal ¶
func (m *QueryValidatorStatsResponse) Marshal() (dAtA []byte, err error)
func (*QueryValidatorStatsResponse) MarshalTo ¶
func (m *QueryValidatorStatsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorStatsResponse) MarshalToSizedBuffer ¶
func (m *QueryValidatorStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorStatsResponse) ProtoMessage ¶
func (*QueryValidatorStatsResponse) ProtoMessage()
func (*QueryValidatorStatsResponse) Reset ¶
func (m *QueryValidatorStatsResponse) Reset()
func (*QueryValidatorStatsResponse) Size ¶
func (m *QueryValidatorStatsResponse) Size() (n int)
func (*QueryValidatorStatsResponse) String ¶
func (m *QueryValidatorStatsResponse) String() string
func (*QueryValidatorStatsResponse) Unmarshal ¶
func (m *QueryValidatorStatsResponse) Unmarshal(dAtA []byte) error
func (*QueryValidatorStatsResponse) XXX_DiscardUnknown ¶
func (m *QueryValidatorStatsResponse) XXX_DiscardUnknown()
func (*QueryValidatorStatsResponse) XXX_Marshal ¶
func (m *QueryValidatorStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorStatsResponse) XXX_Merge ¶
func (m *QueryValidatorStatsResponse) XXX_Merge(src proto.Message)
func (*QueryValidatorStatsResponse) XXX_Size ¶
func (m *QueryValidatorStatsResponse) XXX_Size() int
func (*QueryValidatorStatsResponse) XXX_Unmarshal ¶
func (m *QueryValidatorStatsResponse) XXX_Unmarshal(b []byte) error
type QueryValidatorsStatsRequest ¶
type QueryValidatorsStatsRequest struct {
}
Request type for the Query/ValidatorsStats RPC method.
func (*QueryValidatorsStatsRequest) Descriptor ¶
func (*QueryValidatorsStatsRequest) Descriptor() ([]byte, []int)
func (*QueryValidatorsStatsRequest) Marshal ¶
func (m *QueryValidatorsStatsRequest) Marshal() (dAtA []byte, err error)
func (*QueryValidatorsStatsRequest) MarshalTo ¶
func (m *QueryValidatorsStatsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorsStatsRequest) MarshalToSizedBuffer ¶
func (m *QueryValidatorsStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorsStatsRequest) ProtoMessage ¶
func (*QueryValidatorsStatsRequest) ProtoMessage()
func (*QueryValidatorsStatsRequest) Reset ¶
func (m *QueryValidatorsStatsRequest) Reset()
func (*QueryValidatorsStatsRequest) Size ¶
func (m *QueryValidatorsStatsRequest) Size() (n int)
func (*QueryValidatorsStatsRequest) String ¶
func (m *QueryValidatorsStatsRequest) String() string
func (*QueryValidatorsStatsRequest) Unmarshal ¶
func (m *QueryValidatorsStatsRequest) Unmarshal(dAtA []byte) error
func (*QueryValidatorsStatsRequest) XXX_DiscardUnknown ¶
func (m *QueryValidatorsStatsRequest) XXX_DiscardUnknown()
func (*QueryValidatorsStatsRequest) XXX_Marshal ¶
func (m *QueryValidatorsStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorsStatsRequest) XXX_Merge ¶
func (m *QueryValidatorsStatsRequest) XXX_Merge(src proto.Message)
func (*QueryValidatorsStatsRequest) XXX_Size ¶
func (m *QueryValidatorsStatsRequest) XXX_Size() int
func (*QueryValidatorsStatsRequest) XXX_Unmarshal ¶
func (m *QueryValidatorsStatsRequest) XXX_Unmarshal(b []byte) error
type QueryValidatorsStatsResponse ¶
type QueryValidatorsStatsResponse struct {
// Contains the validators' information.
Stats []ValidatorStats `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats"`
}
Response type for the Query/ValidatorsStats RPC method.
func (*QueryValidatorsStatsResponse) Descriptor ¶
func (*QueryValidatorsStatsResponse) Descriptor() ([]byte, []int)
func (*QueryValidatorsStatsResponse) GetStats ¶
func (m *QueryValidatorsStatsResponse) GetStats() []ValidatorStats
func (*QueryValidatorsStatsResponse) Marshal ¶
func (m *QueryValidatorsStatsResponse) Marshal() (dAtA []byte, err error)
func (*QueryValidatorsStatsResponse) MarshalTo ¶
func (m *QueryValidatorsStatsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryValidatorsStatsResponse) MarshalToSizedBuffer ¶
func (m *QueryValidatorsStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryValidatorsStatsResponse) ProtoMessage ¶
func (*QueryValidatorsStatsResponse) ProtoMessage()
func (*QueryValidatorsStatsResponse) Reset ¶
func (m *QueryValidatorsStatsResponse) Reset()
func (*QueryValidatorsStatsResponse) Size ¶
func (m *QueryValidatorsStatsResponse) Size() (n int)
func (*QueryValidatorsStatsResponse) String ¶
func (m *QueryValidatorsStatsResponse) String() string
func (*QueryValidatorsStatsResponse) Unmarshal ¶
func (m *QueryValidatorsStatsResponse) Unmarshal(dAtA []byte) error
func (*QueryValidatorsStatsResponse) XXX_DiscardUnknown ¶
func (m *QueryValidatorsStatsResponse) XXX_DiscardUnknown()
func (*QueryValidatorsStatsResponse) XXX_Marshal ¶
func (m *QueryValidatorsStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryValidatorsStatsResponse) XXX_Merge ¶
func (m *QueryValidatorsStatsResponse) XXX_Merge(src proto.Message)
func (*QueryValidatorsStatsResponse) XXX_Size ¶
func (m *QueryValidatorsStatsResponse) XXX_Size() int
func (*QueryValidatorsStatsResponse) XXX_Unmarshal ¶
func (m *QueryValidatorsStatsResponse) XXX_Unmarshal(b []byte) error
type RewardAssetPrice ¶
type RewardAssetPrice struct {
// The cumulative price of the reward asset within the TWAP window. It is calculated as:
// `cumulative_price_at_timestamp_t(n)` = `last_price_at_t(n-1)` * (t(n) - t(n-1)) + `cumulative_price_at_timestamp_t(n-1)`
CumulativePrice cosmossdk_io_math.LegacyDec `` /* 135-byte string literal not displayed */
// The price of the reward asset in reward quote asset that corresponds to the timestamp.
AbsolutePrice cosmossdk_io_math.LegacyDec `` /* 129-byte string literal not displayed */
// The timestamp of the last update of the absolute and cumulative price.
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
Represents a data structure that tracks the cumulative price of an asset over the entire observation period, along with the last absolute asset price and the timestamp when this price was last recorded.
func (*RewardAssetPrice) Descriptor ¶
func (*RewardAssetPrice) Descriptor() ([]byte, []int)
func (*RewardAssetPrice) GetTimestamp ¶
func (m *RewardAssetPrice) GetTimestamp() int64
func (*RewardAssetPrice) Marshal ¶
func (m *RewardAssetPrice) Marshal() (dAtA []byte, err error)
func (*RewardAssetPrice) MarshalToSizedBuffer ¶
func (m *RewardAssetPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RewardAssetPrice) ProtoMessage ¶
func (*RewardAssetPrice) ProtoMessage()
func (*RewardAssetPrice) Reset ¶
func (m *RewardAssetPrice) Reset()
func (*RewardAssetPrice) Size ¶
func (m *RewardAssetPrice) Size() (n int)
func (*RewardAssetPrice) String ¶
func (m *RewardAssetPrice) String() string
func (*RewardAssetPrice) Unmarshal ¶
func (m *RewardAssetPrice) Unmarshal(dAtA []byte) error
func (*RewardAssetPrice) XXX_DiscardUnknown ¶
func (m *RewardAssetPrice) XXX_DiscardUnknown()
func (*RewardAssetPrice) XXX_Marshal ¶
func (m *RewardAssetPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RewardAssetPrice) XXX_Merge ¶
func (m *RewardAssetPrice) XXX_Merge(src proto.Message)
func (*RewardAssetPrice) XXX_Size ¶
func (m *RewardAssetPrice) XXX_Size() int
func (*RewardAssetPrice) XXX_Unmarshal ¶
func (m *RewardAssetPrice) XXX_Unmarshal(b []byte) error
type RewardQuote ¶
type RewardQuote struct {
// The compensation amount measured in the quote asset. The amount is divided by the price of
// the reward asset to determine the base revenue amount.
Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
// The name of the quote asset. It is used as a quote in price queries to the slinky oracle
// module to determine the price of the reward asset.
Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"`
}
Defines information about the reward quote.
func DefaultRewardQuote ¶
func DefaultRewardQuote() *RewardQuote
DefaultRewardQuote returns the default reward quote.
func (*RewardQuote) Descriptor ¶
func (*RewardQuote) Descriptor() ([]byte, []int)
func (*RewardQuote) GetAmount ¶
func (m *RewardQuote) GetAmount() uint64
func (*RewardQuote) GetAsset ¶
func (m *RewardQuote) GetAsset() string
func (*RewardQuote) Marshal ¶
func (m *RewardQuote) Marshal() (dAtA []byte, err error)
func (*RewardQuote) MarshalToSizedBuffer ¶
func (m *RewardQuote) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RewardQuote) ProtoMessage ¶
func (*RewardQuote) ProtoMessage()
func (*RewardQuote) Reset ¶
func (m *RewardQuote) Reset()
func (*RewardQuote) Size ¶
func (m *RewardQuote) Size() (n int)
func (*RewardQuote) String ¶
func (m *RewardQuote) String() string
func (*RewardQuote) Unmarshal ¶
func (m *RewardQuote) Unmarshal(dAtA []byte) error
func (*RewardQuote) XXX_DiscardUnknown ¶
func (m *RewardQuote) XXX_DiscardUnknown()
func (*RewardQuote) XXX_Marshal ¶
func (m *RewardQuote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RewardQuote) XXX_Merge ¶
func (m *RewardQuote) XXX_Merge(src proto.Message)
func (*RewardQuote) XXX_Size ¶
func (m *RewardQuote) XXX_Size() int
func (*RewardQuote) XXX_Unmarshal ¶
func (m *RewardQuote) XXX_Unmarshal(b []byte) error
type StakingKeeper ¶
type StakingKeeper interface {
// GetValidatorByConsAddr gets a single validator by consensus address
GetValidatorByConsAddr(ctx context.Context, consAddr sdktypes.ConsAddress) (validator stakingtypes.Validator, err error)
}
StakingKeeper defines the expected interface for getting validators by consensus address.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct {
}
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) FundTreasury ¶
func (*UnimplementedMsgServer) FundTreasury(ctx context.Context, req *MsgFundTreasury) (*MsgFundTreasuryResponse, error)
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) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) PaymentInfo ¶
func (*UnimplementedQueryServer) PaymentInfo(ctx context.Context, req *QueryPaymentInfoRequest) (*QueryPaymentInfoResponse, error)
func (*UnimplementedQueryServer) ValidatorStats ¶
func (*UnimplementedQueryServer) ValidatorStats(ctx context.Context, req *QueryValidatorStatsRequest) (*QueryValidatorStatsResponse, error)
func (*UnimplementedQueryServer) ValidatorsStats ¶
func (*UnimplementedQueryServer) ValidatorsStats(ctx context.Context, req *QueryValidatorsStatsRequest) (*QueryValidatorsStatsResponse, error)
type ValidatorInfo ¶
type ValidatorInfo struct {
// The validator's node operator address.
ValOperAddress string `protobuf:"bytes,1,opt,name=val_oper_address,json=valOperAddress,proto3" json:"val_oper_address,omitempty"`
// The number of blocks the validator has committed in the current payment period.
CommitedBlocksInPeriod uint64 `` /* 132-byte string literal not displayed */
// The number of oracle votes the validator has submitted in the current payment period.
CommitedOracleVotesInPeriod uint64 `` /* 149-byte string literal not displayed */
// The number of blocks the validator has remained in the active validator set for in the
// current payment period.
InActiveValsetForBlocksInPeriod uint64 `` /* 165-byte string literal not displayed */
}
Contains information about a validator.
func (*ValidatorInfo) Descriptor ¶
func (*ValidatorInfo) Descriptor() ([]byte, []int)
func (*ValidatorInfo) GetCommitedBlocksInPeriod ¶
func (m *ValidatorInfo) GetCommitedBlocksInPeriod() uint64
func (*ValidatorInfo) GetCommitedOracleVotesInPeriod ¶
func (m *ValidatorInfo) GetCommitedOracleVotesInPeriod() uint64
func (*ValidatorInfo) GetInActiveValsetForBlocksInPeriod ¶
func (m *ValidatorInfo) GetInActiveValsetForBlocksInPeriod() uint64
func (*ValidatorInfo) GetValOperAddress ¶
func (m *ValidatorInfo) GetValOperAddress() string
func (*ValidatorInfo) Marshal ¶
func (m *ValidatorInfo) Marshal() (dAtA []byte, err error)
func (*ValidatorInfo) MarshalToSizedBuffer ¶
func (m *ValidatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorInfo) ProtoMessage ¶
func (*ValidatorInfo) ProtoMessage()
func (*ValidatorInfo) Reset ¶
func (m *ValidatorInfo) Reset()
func (*ValidatorInfo) Size ¶
func (m *ValidatorInfo) Size() (n int)
func (*ValidatorInfo) String ¶
func (m *ValidatorInfo) String() string
func (*ValidatorInfo) Unmarshal ¶
func (m *ValidatorInfo) Unmarshal(dAtA []byte) error
func (*ValidatorInfo) XXX_DiscardUnknown ¶
func (m *ValidatorInfo) XXX_DiscardUnknown()
func (*ValidatorInfo) XXX_Marshal ¶
func (m *ValidatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorInfo) XXX_Merge ¶
func (m *ValidatorInfo) XXX_Merge(src proto.Message)
func (*ValidatorInfo) XXX_Size ¶
func (m *ValidatorInfo) XXX_Size() int
func (*ValidatorInfo) XXX_Unmarshal ¶
func (m *ValidatorInfo) XXX_Unmarshal(b []byte) error
type ValidatorParticipation ¶
type ValidatorParticipation struct {
// ValOperAddress is the validator's operator address.
ValOperAddress sdktypes.ValAddress
// BlockVote is the block ID flag the validator voted for.
BlockVote tmtypes.BlockIDFlag
// OracleVoteExtension is the validator's vote extension for the oracle module.
OracleVoteExtension vetypes.OracleVoteExtension
}
ValidatorParticipation represents a validator's participation in a block creation and oracle prices provision.
type ValidatorStats ¶
type ValidatorStats struct {
// Contains the validator's information.
ValidatorInfo ValidatorInfo `protobuf:"bytes,1,opt,name=validator_info,json=validatorInfo,proto3" json:"validator_info"`
// The total number of blocks produced by the chain in the current payment period.
TotalProducedBlocksInPeriod uint64 `` /* 149-byte string literal not displayed */
// The validator's performance rating. Represented as a decimal value.
PerformanceRating cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
// Contains expected revenue for the validator based on their performance rating in the current
// payment period, current reward asset TWAP, and duration of validator's presence in the active
// validator set. Does not take into account effective payment period progress.
ExpectedRevenue github_com_cosmos_cosmos_sdk_types.Coin `` /* 147-byte string literal not displayed */
}
Contains validator's info and their performance rating.
func (*ValidatorStats) Descriptor ¶
func (*ValidatorStats) Descriptor() ([]byte, []int)
func (*ValidatorStats) GetTotalProducedBlocksInPeriod ¶
func (m *ValidatorStats) GetTotalProducedBlocksInPeriod() uint64
func (*ValidatorStats) GetValidatorInfo ¶
func (m *ValidatorStats) GetValidatorInfo() ValidatorInfo
func (*ValidatorStats) Marshal ¶
func (m *ValidatorStats) Marshal() (dAtA []byte, err error)
func (*ValidatorStats) MarshalToSizedBuffer ¶
func (m *ValidatorStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorStats) ProtoMessage ¶
func (*ValidatorStats) ProtoMessage()
func (*ValidatorStats) Reset ¶
func (m *ValidatorStats) Reset()
func (*ValidatorStats) Size ¶
func (m *ValidatorStats) Size() (n int)
func (*ValidatorStats) String ¶
func (m *ValidatorStats) String() string
func (*ValidatorStats) Unmarshal ¶
func (m *ValidatorStats) Unmarshal(dAtA []byte) error
func (*ValidatorStats) XXX_DiscardUnknown ¶
func (m *ValidatorStats) XXX_DiscardUnknown()
func (*ValidatorStats) XXX_Marshal ¶
func (m *ValidatorStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorStats) XXX_Merge ¶
func (m *ValidatorStats) XXX_Merge(src proto.Message)
func (*ValidatorStats) XXX_Size ¶
func (m *ValidatorStats) XXX_Size() int
func (*ValidatorStats) XXX_Unmarshal ¶
func (m *ValidatorStats) XXX_Unmarshal(b []byte) error