types

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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"
)
View Source
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.

View Source
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

View Source
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.

View Source
const (
	// StakeStorageKeyPrefix is the prefix to retrieve all StakeStorage
	BasePayPrefix = "BasePay/"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

Variables

View Source
var (
	ErrInvalidLengthBasePay        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBasePay          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBasePay = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyMinBondedTarget             = []byte("MinBondedTarget")
	DefaultMinBondedTarget sdk.Dec = sdk.NewDecWithPrec(6, 1) // 0.6
)
View Source
var (
	KeyMaxBondedTarget             = []byte("MaxBondedTarget")
	DefaultMaxBondedTarget sdk.Dec = sdk.NewDecWithPrec(8, 1) // 0.8
)
View Source
var (
	KeyLowFactor             = []byte("LowFactor")
	DefaultLowFactor sdk.Dec = sdk.NewDecWithPrec(5, 1) // 0.5
)
View Source
var (
	KeyLeftoverBurnRate             = []byte("LeftoverBurnRate")
	DefaultLeftOverBurnRate sdk.Dec = sdk.OneDec()
)
View Source
var (
	KeyMaxRewardBoost     = []byte("MaxRewardBoost")
	DefaultMaxRewardBoost = uint64(5)
)
View Source
var (
	KeyValidatorsSubscriptionParticipation             = []byte("ValidatorsSubscriptionParticipation")
	DefaultValidatorsSubscriptionParticipation sdk.Dec = sdk.NewDecWithPrec(5, 2) // 0.05
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var 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

View Source
var (
	ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)

x/rewards module sentinel errors

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

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

func RegisterQueryHandler

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

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

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) Descriptor() ([]byte, []int)

func (*BasePay) Marshal

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

func (*BasePay) MarshalTo

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

func (*BasePay) MarshalToSizedBuffer

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

func (*BasePay) ProtoMessage

func (*BasePay) ProtoMessage()

func (*BasePay) Reset

func (m *BasePay) Reset()

func (*BasePay) Size

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

func (*BasePay) String

func (m *BasePay) String() string

func (*BasePay) Unmarshal

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

func (*BasePay) XXX_DiscardUnknown

func (m *BasePay) XXX_DiscardUnknown()

func (*BasePay) XXX_Marshal

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

func (*BasePay) XXX_Merge

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

func (*BasePay) XXX_Size

func (m *BasePay) XXX_Size() int

func (*BasePay) XXX_Unmarshal

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

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

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

type BasePayIndex struct {
	Provider string
	ChainID  string
}

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 DowntimeKeeper interface {
	GetParams(ctx sdk.Context) (params v1.Params)
}

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

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (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 MsgServer

type MsgServer interface {
}

MsgServer is the server API for Msg service.

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 DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

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) Descriptor() ([]byte, []int)

func (*Params) GetMaxRewardBoost

func (m *Params) GetMaxRewardBoost() uint64

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Pool

type Pool string

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) Descriptor() ([]byte, []int)

func (*PoolInfo) GetBalance

func (m *PoolInfo) GetBalance() types.Coin

func (*PoolInfo) GetName

func (m *PoolInfo) GetName() string

func (*PoolInfo) Marshal

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

func (*PoolInfo) MarshalTo

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

func (*PoolInfo) MarshalToSizedBuffer

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

func (*PoolInfo) ProtoMessage

func (*PoolInfo) ProtoMessage()

func (*PoolInfo) Reset

func (m *PoolInfo) Reset()

func (*PoolInfo) Size

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

func (*PoolInfo) String

func (m *PoolInfo) String() string

func (*PoolInfo) Unmarshal

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

func (*PoolInfo) XXX_DiscardUnknown

func (m *PoolInfo) XXX_DiscardUnknown()

func (*PoolInfo) XXX_Marshal

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

func (*PoolInfo) XXX_Merge

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

func (*PoolInfo) XXX_Size

func (m *PoolInfo) XXX_Size() int

func (*PoolInfo) XXX_Unmarshal

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

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 SpecEmissionPart struct {
	ChainID  string
	Emission sdk.Dec
}

type SpecKeeper

type SpecKeeper interface {
	GetAllChainIDs(ctx sdk.Context) (chainIDs []string)
	GetSpec(ctx sdk.Context, index string) (val spectypes.Spec, found bool)
}

type StakingKeeper

type StakingKeeper interface {
	BondedRatio(ctx sdk.Context) math.LegacyDec
	BondDenom(ctx sdk.Context) string
}

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

func (*UnimplementedQueryServer) Pools

Jump to

Keyboard shortcuts

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