Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- 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)
- type AccountKeeper
- type BankKeeper
- type BasePay
- func (*BasePay) Descriptor() ([]byte, []int)
- func (m *BasePay) Marshal() (dAtA []byte, err error)
- func (m *BasePay) MarshalTo(dAtA []byte) (int, error)
- func (m *BasePay) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BasePay) ProtoMessage()
- func (m *BasePay) Reset()
- func (m *BasePay) Size() (n int)
- func (m *BasePay) String() string
- func (m *BasePay) Unmarshal(dAtA []byte) error
- func (m *BasePay) XXX_DiscardUnknown()
- func (m *BasePay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BasePay) XXX_Merge(src proto.Message)
- func (m *BasePay) XXX_Size() int
- func (m *BasePay) XXX_Unmarshal(b []byte) error
- type BasePayGenesis
- func (*BasePayGenesis) Descriptor() ([]byte, []int)
- func (m *BasePayGenesis) GetBasePay() BasePay
- func (m *BasePayGenesis) GetIndex() string
- func (m *BasePayGenesis) Marshal() (dAtA []byte, err error)
- func (m *BasePayGenesis) MarshalTo(dAtA []byte) (int, error)
- func (m *BasePayGenesis) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BasePayGenesis) ProtoMessage()
- func (m *BasePayGenesis) Reset()
- func (m *BasePayGenesis) Size() (n int)
- func (m *BasePayGenesis) String() string
- func (m *BasePayGenesis) Unmarshal(dAtA []byte) error
- func (m *BasePayGenesis) XXX_DiscardUnknown()
- func (m *BasePayGenesis) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BasePayGenesis) XXX_Merge(src proto.Message)
- func (m *BasePayGenesis) XXX_Size() int
- func (m *BasePayGenesis) XXX_Unmarshal(b []byte) error
- type BasePayIndex
- type BasePayWithIndex
- type DistributionKeeper
- type DowntimeKeeper
- type DualStakingKeeper
- type EpochstorageKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetBasePays() []BasePayGenesis
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetRefillRewardsTS() types.GenesisState
- 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 MsgClient
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetMaxRewardBoost() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- 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 Pool
- type PoolInfo
- func (*PoolInfo) Descriptor() ([]byte, []int)
- func (m *PoolInfo) GetBalance() types.Coin
- func (m *PoolInfo) GetName() string
- func (m *PoolInfo) Marshal() (dAtA []byte, err error)
- func (m *PoolInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *PoolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PoolInfo) ProtoMessage()
- func (m *PoolInfo) Reset()
- func (m *PoolInfo) Size() (n int)
- func (m *PoolInfo) String() string
- func (m *PoolInfo) Unmarshal(dAtA []byte) error
- func (m *PoolInfo) XXX_DiscardUnknown()
- func (m *PoolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PoolInfo) XXX_Merge(src proto.Message)
- func (m *PoolInfo) XXX_Size() int
- func (m *PoolInfo) XXX_Unmarshal(b []byte) error
- type QueryBlockRewardRequest
- func (*QueryBlockRewardRequest) Descriptor() ([]byte, []int)
- func (m *QueryBlockRewardRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBlockRewardRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBlockRewardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBlockRewardRequest) ProtoMessage()
- func (m *QueryBlockRewardRequest) Reset()
- func (m *QueryBlockRewardRequest) Size() (n int)
- func (m *QueryBlockRewardRequest) String() string
- func (m *QueryBlockRewardRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBlockRewardRequest) XXX_DiscardUnknown()
- func (m *QueryBlockRewardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBlockRewardRequest) XXX_Merge(src proto.Message)
- func (m *QueryBlockRewardRequest) XXX_Size() int
- func (m *QueryBlockRewardRequest) XXX_Unmarshal(b []byte) error
- type QueryBlockRewardResponse
- func (*QueryBlockRewardResponse) Descriptor() ([]byte, []int)
- func (m *QueryBlockRewardResponse) GetReward() types.Coin
- func (m *QueryBlockRewardResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBlockRewardResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBlockRewardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBlockRewardResponse) ProtoMessage()
- func (m *QueryBlockRewardResponse) Reset()
- func (m *QueryBlockRewardResponse) Size() (n int)
- func (m *QueryBlockRewardResponse) String() string
- func (m *QueryBlockRewardResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBlockRewardResponse) XXX_DiscardUnknown()
- func (m *QueryBlockRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBlockRewardResponse) XXX_Merge(src proto.Message)
- func (m *QueryBlockRewardResponse) XXX_Size() int
- func (m *QueryBlockRewardResponse) 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 QueryPoolsRequest
- func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
- func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolsRequest) ProtoMessage()
- func (m *QueryPoolsRequest) Reset()
- func (m *QueryPoolsRequest) Size() (n int)
- func (m *QueryPoolsRequest) String() string
- func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPoolsRequest) XXX_DiscardUnknown()
- func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
- func (m *QueryPoolsRequest) XXX_Size() int
- func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
- type QueryPoolsResponse
- func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
- func (m *QueryPoolsResponse) GetAllocationPoolMonthsLeft() int64
- func (m *QueryPoolsResponse) GetEstimatedBlocksToRefill() int64
- func (m *QueryPoolsResponse) GetPools() []PoolInfo
- func (m *QueryPoolsResponse) GetTimeToRefill() int64
- func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolsResponse) ProtoMessage()
- func (m *QueryPoolsResponse) Reset()
- func (m *QueryPoolsResponse) Size() (n int)
- func (m *QueryPoolsResponse) String() string
- func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPoolsResponse) XXX_DiscardUnknown()
- func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
- func (m *QueryPoolsResponse) XXX_Size() int
- func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type SpecEmissionPart
- type SpecKeeper
- type StakingKeeper
- type TimerStoreKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) BlockReward(ctx context.Context, req *QueryBlockRewardRequest) (*QueryBlockRewardResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)
Constants ¶
const ( // ModuleName defines the module name ModuleName = "rewards" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_rewards" // prefix for the CU tracker timer store MonthlyRewardsTSPrefix = "monthly-rewards-ts" )
const ( ValidatorsRewardsAllocationPoolName Pool = "validators_rewards_allocation_pool" ProvidersRewardsAllocationPool Pool = "providers_rewards_allocation_pool" RewardsAllocationPoolsLifetime uint64 = 48 // 4 years (in months) )
Allocation pools constants: These pools are used as the main and reserve of tokens for the distribution rewards pools. Each month, the allocation pools transfer a monthly quota of tokens to the distribution pools so there will be funds to distribute rewards for validators/providers. The allocation pools will get depleted after RewardsAllocationPoolsLifetime.
const ( ValidatorsRewardsDistributionPoolName Pool = "validators_rewards_distribution_pool" ProviderRewardsDistributionPool Pool = "providers_rewards_distribution_pool" DistributionPoolRefillEventName = "distribution_pools_refill" ProvidersBonusRewardsEventName = "provider_bonus_rewards" )
Distribution pools constants: These pools are used as the reserve of tokens for validators/providers rewards. Once a month, these pools' tokens are burned by the burn rate and get their monthly quota of tokens from the allocation pools
const ( RefillRewardsPoolTimerPrefix = "refill-rewards-pool-ts" RefillRewardsPoolTimerName = "refill-rewards-timer" )
Refill reward pools time stores constants: This timer store is used to trigger the refill mechanism of the distribution pools once a month.
const (
// StakeStorageKeyPrefix is the prefix to retrieve all StakeStorage
BasePayPrefix = "BasePay/"
)
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
Variables ¶
var ( ErrInvalidLengthBasePay = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBasePay = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBasePay = fmt.Errorf("proto: unexpected end of group") )
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
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 ( KeyMinBondedTarget = []byte("MinBondedTarget") DefaultMinBondedTarget sdk.Dec = sdk.NewDecWithPrec(6, 1) // 0.6 )
var ( KeyMaxBondedTarget = []byte("MaxBondedTarget") DefaultMaxBondedTarget sdk.Dec = sdk.NewDecWithPrec(8, 1) // 0.8 )
var ( KeyLowFactor = []byte("LowFactor") DefaultLowFactor sdk.Dec = sdk.NewDecWithPrec(5, 1) // 0.5 )
var ( KeyLeftoverBurnRate = []byte("LeftoverBurnRate") DefaultLeftOverBurnRate sdk.Dec = sdk.OneDec() )
var ( KeyMaxRewardBoost = []byte("MaxRewardBoost") DefaultMaxRewardBoost = uint64(5) )
var ( KeyValidatorsSubscriptionParticipation = []byte("ValidatorsSubscriptionParticipation") DefaultValidatorsSubscriptionParticipation sdk.Dec = sdk.NewDecWithPrec(5, 2) // 0.05 )
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 BlocksToTimerExpirySlackFactor math.LegacyDec = sdk.NewDecWithPrec(105, 2) // 1.05
BlocksToTimerExpirySlackFactor is used to calculate the number of blocks until the next timer expiry which determine the validators block rewards. since the time/blocks conversion can be errornous, we multiply our calculated number of blocks by this error margin, so we'll won't have a case of having too few blocks
var (
ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)
x/rewards module sentinel errors
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
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)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetModuleAddress(name string) sdk.AccAddress
}
AccountKeeper defines the expected account keeper used for simulations (noalias)
type BankKeeper ¶
type BankKeeper interface { BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error }
BankKeeper defines the expected interface needed to retrieve account balances.
type BasePay ¶
type BasePay struct { Total github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=total,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total"` TotalAdjusted github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=totalAdjusted,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"totalAdjusted"` }
aggregated rewards for the provider through out the month
func (*BasePay) Descriptor ¶
func (*BasePay) MarshalToSizedBuffer ¶
func (*BasePay) ProtoMessage ¶
func (*BasePay) ProtoMessage()
func (*BasePay) XXX_DiscardUnknown ¶
func (m *BasePay) XXX_DiscardUnknown()
func (*BasePay) XXX_Marshal ¶
func (*BasePay) XXX_Unmarshal ¶
type BasePayGenesis ¶
type BasePayGenesis struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` BasePay BasePay `protobuf:"bytes,2,opt,name=base_pay,json=basePay,proto3" json:"base_pay"` }
aggregated rewards for the provider through out the month
func (*BasePayGenesis) Descriptor ¶
func (*BasePayGenesis) Descriptor() ([]byte, []int)
func (*BasePayGenesis) GetBasePay ¶
func (m *BasePayGenesis) GetBasePay() BasePay
func (*BasePayGenesis) GetIndex ¶
func (m *BasePayGenesis) GetIndex() string
func (*BasePayGenesis) Marshal ¶
func (m *BasePayGenesis) Marshal() (dAtA []byte, err error)
func (*BasePayGenesis) MarshalToSizedBuffer ¶
func (m *BasePayGenesis) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BasePayGenesis) ProtoMessage ¶
func (*BasePayGenesis) ProtoMessage()
func (*BasePayGenesis) Reset ¶
func (m *BasePayGenesis) Reset()
func (*BasePayGenesis) Size ¶
func (m *BasePayGenesis) Size() (n int)
func (*BasePayGenesis) String ¶
func (m *BasePayGenesis) String() string
func (*BasePayGenesis) Unmarshal ¶
func (m *BasePayGenesis) Unmarshal(dAtA []byte) error
func (*BasePayGenesis) XXX_DiscardUnknown ¶
func (m *BasePayGenesis) XXX_DiscardUnknown()
func (*BasePayGenesis) XXX_Marshal ¶
func (m *BasePayGenesis) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BasePayGenesis) XXX_Merge ¶
func (m *BasePayGenesis) XXX_Merge(src proto.Message)
func (*BasePayGenesis) XXX_Size ¶
func (m *BasePayGenesis) XXX_Size() int
func (*BasePayGenesis) XXX_Unmarshal ¶
func (m *BasePayGenesis) XXX_Unmarshal(b []byte) error
type BasePayIndex ¶
func BasePayKeyRecover ¶
func BasePayKeyRecover(key string) (bp BasePayIndex)
func (BasePayIndex) String ¶
func (bp BasePayIndex) String() string
type BasePayWithIndex ¶
type BasePayWithIndex struct { BasePayIndex BasePay }
type DistributionKeeper ¶
type DistributionKeeper interface { GetParams(ctx sdk.Context) (params distributiontypes.Params) GetFeePool(ctx sdk.Context) (feePool distributiontypes.FeePool) SetFeePool(ctx sdk.Context, feePool distributiontypes.FeePool) }
type DowntimeKeeper ¶
type DualStakingKeeper ¶
type DualStakingKeeper interface {
RewardProvidersAndDelegators(ctx sdk.Context, providerAddr sdk.AccAddress, chainID string, totalReward math.Int, senderModule string, calcOnlyProvider bool, calcOnlyDelegators bool, calcOnlyContributer bool) (providerReward math.Int, totalRewards math.Int, err error)
}
type EpochstorageKeeper ¶
type EpochstorageKeeper interface {
GetStakeStorageCurrent(ctx sdk.Context, chainID string) (epochstoragetypes.StakeStorage, bool)
}
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` RefillRewardsTS types.GenesisState `protobuf:"bytes,2,opt,name=refillRewardsTS,proto3" json:"refillRewardsTS"` BasePays []BasePayGenesis `protobuf:"bytes,3,rep,name=base_pays,json=basePays,proto3" json:"base_pays"` }
GenesisState defines the rewards module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetBasePays ¶
func (m *GenesisState) GetBasePays() []BasePayGenesis
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetRefillRewardsTS ¶
func (m *GenesisState) GetRefillRewardsTS() types.GenesisState
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 MsgClient ¶
type MsgClient interface { }
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 Params ¶
type Params struct { MinBondedTarget github_com_cosmos_cosmos_sdk_types.Dec `` /* 173-byte string literal not displayed */ MaxBondedTarget github_com_cosmos_cosmos_sdk_types.Dec `` /* 173-byte string literal not displayed */ LowFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */ LeftoverBurnRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 177-byte string literal not displayed */ MaxRewardBoost uint64 `protobuf:"varint,5,opt,name=max_reward_boost,json=maxRewardBoost,proto3" json:"max_reward_boost,omitempty"` ValidatorsSubscriptionParticipation github_com_cosmos_cosmos_sdk_types.Dec `` /* 253-byte string literal not displayed */ }
Params defines the parameters for the module.
func NewParams ¶
func NewParams( minBondedTarget sdk.Dec, maxBondedTarget sdk.Dec, lowFactor sdk.Dec, leftoverBurnRate sdk.Dec, maxRewardBoost uint64, validatorsSubscriptionParticipation sdk.Dec, ) Params
NewParams creates a new Params instance
func (*Params) Descriptor ¶
func (*Params) GetMaxRewardBoost ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PoolInfo ¶
type PoolInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Balance types.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` }
func (*PoolInfo) Descriptor ¶
func (*PoolInfo) GetBalance ¶
func (*PoolInfo) MarshalToSizedBuffer ¶
func (*PoolInfo) ProtoMessage ¶
func (*PoolInfo) ProtoMessage()
func (*PoolInfo) XXX_DiscardUnknown ¶
func (m *PoolInfo) XXX_DiscardUnknown()
func (*PoolInfo) XXX_Marshal ¶
func (*PoolInfo) XXX_Unmarshal ¶
type QueryBlockRewardRequest ¶
type QueryBlockRewardRequest struct { }
QueryBlockRewardRequest is request type for the Query/BlockReward RPC method.
func (*QueryBlockRewardRequest) Descriptor ¶
func (*QueryBlockRewardRequest) Descriptor() ([]byte, []int)
func (*QueryBlockRewardRequest) Marshal ¶
func (m *QueryBlockRewardRequest) Marshal() (dAtA []byte, err error)
func (*QueryBlockRewardRequest) MarshalTo ¶
func (m *QueryBlockRewardRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBlockRewardRequest) MarshalToSizedBuffer ¶
func (m *QueryBlockRewardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBlockRewardRequest) ProtoMessage ¶
func (*QueryBlockRewardRequest) ProtoMessage()
func (*QueryBlockRewardRequest) Reset ¶
func (m *QueryBlockRewardRequest) Reset()
func (*QueryBlockRewardRequest) Size ¶
func (m *QueryBlockRewardRequest) Size() (n int)
func (*QueryBlockRewardRequest) String ¶
func (m *QueryBlockRewardRequest) String() string
func (*QueryBlockRewardRequest) Unmarshal ¶
func (m *QueryBlockRewardRequest) Unmarshal(dAtA []byte) error
func (*QueryBlockRewardRequest) XXX_DiscardUnknown ¶
func (m *QueryBlockRewardRequest) XXX_DiscardUnknown()
func (*QueryBlockRewardRequest) XXX_Marshal ¶
func (m *QueryBlockRewardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBlockRewardRequest) XXX_Merge ¶
func (m *QueryBlockRewardRequest) XXX_Merge(src proto.Message)
func (*QueryBlockRewardRequest) XXX_Size ¶
func (m *QueryBlockRewardRequest) XXX_Size() int
func (*QueryBlockRewardRequest) XXX_Unmarshal ¶
func (m *QueryBlockRewardRequest) XXX_Unmarshal(b []byte) error
type QueryBlockRewardResponse ¶
type QueryBlockRewardResponse struct {
Reward types.Coin `protobuf:"bytes,1,opt,name=reward,proto3" json:"reward"`
}
QueryBlockRewardResponse is response type for the Query/BlockReward RPC method.
func (*QueryBlockRewardResponse) Descriptor ¶
func (*QueryBlockRewardResponse) Descriptor() ([]byte, []int)
func (*QueryBlockRewardResponse) GetReward ¶
func (m *QueryBlockRewardResponse) GetReward() types.Coin
func (*QueryBlockRewardResponse) Marshal ¶
func (m *QueryBlockRewardResponse) Marshal() (dAtA []byte, err error)
func (*QueryBlockRewardResponse) MarshalTo ¶
func (m *QueryBlockRewardResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBlockRewardResponse) MarshalToSizedBuffer ¶
func (m *QueryBlockRewardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBlockRewardResponse) ProtoMessage ¶
func (*QueryBlockRewardResponse) ProtoMessage()
func (*QueryBlockRewardResponse) Reset ¶
func (m *QueryBlockRewardResponse) Reset()
func (*QueryBlockRewardResponse) Size ¶
func (m *QueryBlockRewardResponse) Size() (n int)
func (*QueryBlockRewardResponse) String ¶
func (m *QueryBlockRewardResponse) String() string
func (*QueryBlockRewardResponse) Unmarshal ¶
func (m *QueryBlockRewardResponse) Unmarshal(dAtA []byte) error
func (*QueryBlockRewardResponse) XXX_DiscardUnknown ¶
func (m *QueryBlockRewardResponse) XXX_DiscardUnknown()
func (*QueryBlockRewardResponse) XXX_Marshal ¶
func (m *QueryBlockRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBlockRewardResponse) XXX_Merge ¶
func (m *QueryBlockRewardResponse) XXX_Merge(src proto.Message)
func (*QueryBlockRewardResponse) XXX_Size ¶
func (m *QueryBlockRewardResponse) XXX_Size() int
func (*QueryBlockRewardResponse) XXX_Unmarshal ¶
func (m *QueryBlockRewardResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Pools queries all the pools' info Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error) // BlockReward queries for the validators reward for proposing a block BlockReward(ctx context.Context, in *QueryBlockRewardRequest, opts ...grpc.CallOption) (*QueryBlockRewardResponse, 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 { }
QueryParamsRequest is 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 { // params holds all the parameters of this module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is 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 QueryPoolsRequest ¶
type QueryPoolsRequest struct { }
QueryPoolsRequest is request type for the Query/Pools RPC method.
func (*QueryPoolsRequest) Descriptor ¶
func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
func (*QueryPoolsRequest) Marshal ¶
func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPoolsRequest) MarshalTo ¶
func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsRequest) MarshalToSizedBuffer ¶
func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsRequest) ProtoMessage ¶
func (*QueryPoolsRequest) ProtoMessage()
func (*QueryPoolsRequest) Reset ¶
func (m *QueryPoolsRequest) Reset()
func (*QueryPoolsRequest) Size ¶
func (m *QueryPoolsRequest) Size() (n int)
func (*QueryPoolsRequest) String ¶
func (m *QueryPoolsRequest) String() string
func (*QueryPoolsRequest) Unmarshal ¶
func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
func (*QueryPoolsRequest) XXX_DiscardUnknown ¶
func (m *QueryPoolsRequest) XXX_DiscardUnknown()
func (*QueryPoolsRequest) XXX_Marshal ¶
func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsRequest) XXX_Merge ¶
func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
func (*QueryPoolsRequest) XXX_Size ¶
func (m *QueryPoolsRequest) XXX_Size() int
func (*QueryPoolsRequest) XXX_Unmarshal ¶
func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
type QueryPoolsResponse ¶
type QueryPoolsResponse struct { // details holds all the info of this module's pools. Pools []PoolInfo `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"` TimeToRefill int64 `protobuf:"varint,2,opt,name=time_to_refill,json=timeToRefill,proto3" json:"time_to_refill,omitempty"` EstimatedBlocksToRefill int64 `` /* 135-byte string literal not displayed */ AllocationPoolMonthsLeft int64 `` /* 138-byte string literal not displayed */ }
QueryPoolsResponse is response type for the Query/Pools RPC method.
func (*QueryPoolsResponse) Descriptor ¶
func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
func (*QueryPoolsResponse) GetAllocationPoolMonthsLeft ¶
func (m *QueryPoolsResponse) GetAllocationPoolMonthsLeft() int64
func (*QueryPoolsResponse) GetEstimatedBlocksToRefill ¶
func (m *QueryPoolsResponse) GetEstimatedBlocksToRefill() int64
func (*QueryPoolsResponse) GetPools ¶
func (m *QueryPoolsResponse) GetPools() []PoolInfo
func (*QueryPoolsResponse) GetTimeToRefill ¶
func (m *QueryPoolsResponse) GetTimeToRefill() int64
func (*QueryPoolsResponse) Marshal ¶
func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPoolsResponse) MarshalTo ¶
func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsResponse) MarshalToSizedBuffer ¶
func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsResponse) ProtoMessage ¶
func (*QueryPoolsResponse) ProtoMessage()
func (*QueryPoolsResponse) Reset ¶
func (m *QueryPoolsResponse) Reset()
func (*QueryPoolsResponse) Size ¶
func (m *QueryPoolsResponse) Size() (n int)
func (*QueryPoolsResponse) String ¶
func (m *QueryPoolsResponse) String() string
func (*QueryPoolsResponse) Unmarshal ¶
func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
func (*QueryPoolsResponse) XXX_DiscardUnknown ¶
func (m *QueryPoolsResponse) XXX_DiscardUnknown()
func (*QueryPoolsResponse) XXX_Marshal ¶
func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsResponse) XXX_Merge ¶
func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
func (*QueryPoolsResponse) XXX_Size ¶
func (m *QueryPoolsResponse) XXX_Size() int
func (*QueryPoolsResponse) XXX_Unmarshal ¶
func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Pools queries all the pools' info Pools(context.Context, *QueryPoolsRequest) (*QueryPoolsResponse, error) // BlockReward queries for the validators reward for proposing a block BlockReward(context.Context, *QueryBlockRewardRequest) (*QueryBlockRewardResponse, error) }
QueryServer is the server API for Query service.
type SpecEmissionPart ¶
type SpecKeeper ¶
type StakingKeeper ¶
type TimerStoreKeeper ¶
type TimerStoreKeeper interface {
NewTimerStoreEndBlock(storeKey storetypes.StoreKey, prefix string) *timerstoretypes.TimerStore
}
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) BlockReward ¶
func (*UnimplementedQueryServer) BlockReward(ctx context.Context, req *QueryBlockRewardRequest) (*QueryBlockRewardResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Pools ¶
func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)