Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func CalculateEpochMintProvision(params Params, period uint64, epochsPerPeriod int64, bondedRatio sdk.Dec) sdk.Dec
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- 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 DistrKeeper
- type ExponentialCalculation
- func (*ExponentialCalculation) Descriptor() ([]byte, []int)
- func (m *ExponentialCalculation) Marshal() (dAtA []byte, err error)
- func (m *ExponentialCalculation) MarshalTo(dAtA []byte) (int, error)
- func (m *ExponentialCalculation) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ExponentialCalculation) ProtoMessage()
- func (m *ExponentialCalculation) Reset()
- func (m *ExponentialCalculation) Size() (n int)
- func (m *ExponentialCalculation) String() string
- func (m *ExponentialCalculation) Unmarshal(dAtA []byte) error
- func (m *ExponentialCalculation) XXX_DiscardUnknown()
- func (m *ExponentialCalculation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExponentialCalculation) XXX_Merge(src proto.Message)
- func (m *ExponentialCalculation) XXX_Size() int
- func (m *ExponentialCalculation) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetEpochIdentifier() string
- func (m *GenesisState) GetEpochsPerPeriod() int64
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPeriod() uint64
- 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 InflationDistribution
- func (*InflationDistribution) Descriptor() ([]byte, []int)
- func (m *InflationDistribution) Marshal() (dAtA []byte, err error)
- func (m *InflationDistribution) MarshalTo(dAtA []byte) (int, error)
- func (m *InflationDistribution) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InflationDistribution) ProtoMessage()
- func (m *InflationDistribution) Reset()
- func (m *InflationDistribution) Size() (n int)
- func (m *InflationDistribution) String() string
- func (m *InflationDistribution) Unmarshal(dAtA []byte) error
- func (m *InflationDistribution) XXX_DiscardUnknown()
- func (m *InflationDistribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InflationDistribution) XXX_Merge(src proto.Message)
- func (m *InflationDistribution) XXX_Size() int
- func (m *InflationDistribution) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetExponentialCalculation() ExponentialCalculation
- func (m *Params) GetInflationDistribution() InflationDistribution
- func (m *Params) GetMintDenom() string
- 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 (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryEpochMintProvisionRequest
- func (*QueryEpochMintProvisionRequest) Descriptor() ([]byte, []int)
- func (m *QueryEpochMintProvisionRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryEpochMintProvisionRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEpochMintProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEpochMintProvisionRequest) ProtoMessage()
- func (m *QueryEpochMintProvisionRequest) Reset()
- func (m *QueryEpochMintProvisionRequest) Size() (n int)
- func (m *QueryEpochMintProvisionRequest) String() string
- func (m *QueryEpochMintProvisionRequest) Unmarshal(dAtA []byte) error
- func (m *QueryEpochMintProvisionRequest) XXX_DiscardUnknown()
- func (m *QueryEpochMintProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEpochMintProvisionRequest) XXX_Merge(src proto.Message)
- func (m *QueryEpochMintProvisionRequest) XXX_Size() int
- func (m *QueryEpochMintProvisionRequest) XXX_Unmarshal(b []byte) error
- type QueryEpochMintProvisionResponse
- func (*QueryEpochMintProvisionResponse) Descriptor() ([]byte, []int)
- func (m *QueryEpochMintProvisionResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryEpochMintProvisionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEpochMintProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEpochMintProvisionResponse) ProtoMessage()
- func (m *QueryEpochMintProvisionResponse) Reset()
- func (m *QueryEpochMintProvisionResponse) Size() (n int)
- func (m *QueryEpochMintProvisionResponse) String() string
- func (m *QueryEpochMintProvisionResponse) Unmarshal(dAtA []byte) error
- func (m *QueryEpochMintProvisionResponse) XXX_DiscardUnknown()
- func (m *QueryEpochMintProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEpochMintProvisionResponse) XXX_Merge(src proto.Message)
- func (m *QueryEpochMintProvisionResponse) XXX_Size() int
- func (m *QueryEpochMintProvisionResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryPeriodRequest
- func (*QueryPeriodRequest) Descriptor() ([]byte, []int)
- func (m *QueryPeriodRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPeriodRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPeriodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPeriodRequest) ProtoMessage()
- func (m *QueryPeriodRequest) Reset()
- func (m *QueryPeriodRequest) Size() (n int)
- func (m *QueryPeriodRequest) String() string
- func (m *QueryPeriodRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPeriodRequest) XXX_DiscardUnknown()
- func (m *QueryPeriodRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPeriodRequest) XXX_Merge(src proto.Message)
- func (m *QueryPeriodRequest) XXX_Size() int
- func (m *QueryPeriodRequest) XXX_Unmarshal(b []byte) error
- type QueryPeriodResponse
- func (*QueryPeriodResponse) Descriptor() ([]byte, []int)
- func (m *QueryPeriodResponse) GetPeriod() uint64
- func (m *QueryPeriodResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPeriodResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPeriodResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPeriodResponse) ProtoMessage()
- func (m *QueryPeriodResponse) Reset()
- func (m *QueryPeriodResponse) Size() (n int)
- func (m *QueryPeriodResponse) String() string
- func (m *QueryPeriodResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPeriodResponse) XXX_DiscardUnknown()
- func (m *QueryPeriodResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPeriodResponse) XXX_Merge(src proto.Message)
- func (m *QueryPeriodResponse) XXX_Size() int
- func (m *QueryPeriodResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type StakingKeeper
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) EpochMintProvision(ctx context.Context, req *QueryEpochMintProvisionRequest) (*QueryEpochMintProvisionResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Period(ctx context.Context, req *QueryPeriodRequest) (*QueryPeriodResponse, error)
Constants ¶
const ( EventTypeMint = ModuleName AttributeKeyEpochProvisions = "epoch_provisions" AttributeEpochNumber = "epoch_number" )
Minting module event types
const ( // module name ModuleName = "inflation" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for message routing RouterKey = ModuleName )
constants
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 ( ErrInvalidLengthInflation = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowInflation = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupInflation = fmt.Errorf("proto: unexpected end of group") )
var ( KeyPrefixPeriod = []byte{prefixPeriod} KeyPrefixEpochMintProvision = []byte{prefixEpochMintProvision} KeyPrefixEpochIdentifier = []byte{prefixEpochIdentifier} KeyPrefixEpochsPerPeriod = []byte{prefixEpochsPerPeriod} )
KVStore key prefixes
var ( KeyMintDenom = []byte("KeyMintDenom") KeyExponentialCalculation = []byte("KeyExponentialCalculation") KeyInflationDistribution = []byte("KeyInflationDistribution") )
Parameter store keys
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 ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
ModuleCdc references the global incentives module codec. Note, the codec should ONLY be used in certain instances of tests and for JSON encoding.
The actual codec used for serialization should be provided to modules/incentives and defined at the application level.
Functions ¶
func CalculateEpochMintProvision ¶
func CalculateEpochMintProvision( params Params, period uint64, epochsPerPeriod int64, bondedRatio sdk.Dec, ) sdk.Dec
CalculateEpochProvisions returns mint provision per epoch
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register implementations
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 (such as grpc.SendHeader, etc) 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 GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI GetAccount(sdk.Context, sdk.AccAddress) types.AccountI SetAccount(sdk.Context, types.AccountI) }
AccountKeeper defines the contract required for account APIs.
type BankKeeper ¶
type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error HasSupply(ctx sdk.Context, denom string) bool }
BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.
type DistrKeeper ¶
type DistrKeeper interface {
FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}
DistrKeeper defines the contract needed to be fulfilled for distribution keeper
type ExponentialCalculation ¶
type ExponentialCalculation struct { // initial value A github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=a,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"a"` // reduction factor R github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=r,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"r"` // long term inflation C github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=c,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"c"` // bonding target BondingTarget github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */ // max variance MaxVariance github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ }
ExponentialCalculation holds factors to calculate exponential inflation on each period. Calculation reference: periodProvision = exponentialDecay * bondingIncentive f(x) = (a * (1 - r) ^ x + c) * (1 + max_variance - bondedRatio * (max_variance / bonding_target))
func (*ExponentialCalculation) Descriptor ¶
func (*ExponentialCalculation) Descriptor() ([]byte, []int)
func (*ExponentialCalculation) Marshal ¶
func (m *ExponentialCalculation) Marshal() (dAtA []byte, err error)
func (*ExponentialCalculation) MarshalTo ¶
func (m *ExponentialCalculation) MarshalTo(dAtA []byte) (int, error)
func (*ExponentialCalculation) MarshalToSizedBuffer ¶
func (m *ExponentialCalculation) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ExponentialCalculation) ProtoMessage ¶
func (*ExponentialCalculation) ProtoMessage()
func (*ExponentialCalculation) Reset ¶
func (m *ExponentialCalculation) Reset()
func (*ExponentialCalculation) Size ¶
func (m *ExponentialCalculation) Size() (n int)
func (*ExponentialCalculation) String ¶
func (m *ExponentialCalculation) String() string
func (*ExponentialCalculation) Unmarshal ¶
func (m *ExponentialCalculation) Unmarshal(dAtA []byte) error
func (*ExponentialCalculation) XXX_DiscardUnknown ¶
func (m *ExponentialCalculation) XXX_DiscardUnknown()
func (*ExponentialCalculation) XXX_Marshal ¶
func (m *ExponentialCalculation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExponentialCalculation) XXX_Merge ¶
func (m *ExponentialCalculation) XXX_Merge(src proto.Message)
func (*ExponentialCalculation) XXX_Size ¶
func (m *ExponentialCalculation) XXX_Size() int
func (*ExponentialCalculation) XXX_Unmarshal ¶
func (m *ExponentialCalculation) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { // params defines all the paramaters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // amount of past periods, based on the epochs per period param Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` // inflation epoch identifier EpochIdentifier string `protobuf:"bytes,3,opt,name=epoch_identifier,json=epochIdentifier,proto3" json:"epoch_identifier,omitempty"` // number of epochs after which inflation is recalculated EpochsPerPeriod int64 `protobuf:"varint,4,opt,name=epochs_per_period,json=epochsPerPeriod,proto3" json:"epochs_per_period,omitempty"` }
GenesisState defines the inflation module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState creates a default GenesisState object
func NewGenesisState ¶
func NewGenesisState( params Params, period uint64, epochIdentifier string, epochsPerPeriod int64, bondedRatio sdk.Dec, ) GenesisState
NewGenesisState creates a new GenesisState object
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetEpochIdentifier ¶
func (m *GenesisState) GetEpochIdentifier() string
func (*GenesisState) GetEpochsPerPeriod ¶
func (m *GenesisState) GetEpochsPerPeriod() int64
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPeriod ¶
func (m *GenesisState) GetPeriod() uint64
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 InflationDistribution ¶
type InflationDistribution struct { // staking_rewards defines the proportion of the minted minted_denom that is // to be allocated as staking rewards StakingRewards github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ // usage_incentives defines the proportion of the minted minted_denom that is // to be allocated to the incentives module address UsageIncentives github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */ // community_pool defines the proportion of the minted minted_denom that is to // be allocated to the community pool CommunityPool github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */ }
InflationDistribution defines the distribution in which inflation is allocated through minting on each epoch (staking, incentives, community). It excludes the team vesting distribution, as this is minted once at genesis. The initial InflationDistribution can be calculated from the Evmvos Token Model like this: mintDistribution1 = distribution1 / (1 - teamVestingDistribution) 0.5333333 = 40% / (1 - 25%)
func (*InflationDistribution) Descriptor ¶
func (*InflationDistribution) Descriptor() ([]byte, []int)
func (*InflationDistribution) Marshal ¶
func (m *InflationDistribution) Marshal() (dAtA []byte, err error)
func (*InflationDistribution) MarshalTo ¶
func (m *InflationDistribution) MarshalTo(dAtA []byte) (int, error)
func (*InflationDistribution) MarshalToSizedBuffer ¶
func (m *InflationDistribution) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InflationDistribution) ProtoMessage ¶
func (*InflationDistribution) ProtoMessage()
func (*InflationDistribution) Reset ¶
func (m *InflationDistribution) Reset()
func (*InflationDistribution) Size ¶
func (m *InflationDistribution) Size() (n int)
func (*InflationDistribution) String ¶
func (m *InflationDistribution) String() string
func (*InflationDistribution) Unmarshal ¶
func (m *InflationDistribution) Unmarshal(dAtA []byte) error
func (*InflationDistribution) XXX_DiscardUnknown ¶
func (m *InflationDistribution) XXX_DiscardUnknown()
func (*InflationDistribution) XXX_Marshal ¶
func (m *InflationDistribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InflationDistribution) XXX_Merge ¶
func (m *InflationDistribution) XXX_Merge(src proto.Message)
func (*InflationDistribution) XXX_Size ¶
func (m *InflationDistribution) XXX_Size() int
func (*InflationDistribution) XXX_Unmarshal ¶
func (m *InflationDistribution) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { // type of coin to mint MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` // variables to calculate exponential inflation ExponentialCalculation ExponentialCalculation `protobuf:"bytes,2,opt,name=exponential_calculation,json=exponentialCalculation,proto3" json:"exponential_calculation"` // inflation distribution of the minted denom InflationDistribution InflationDistribution `protobuf:"bytes,3,opt,name=inflation_distribution,json=inflationDistribution,proto3" json:"inflation_distribution"` }
Params holds parameters for the inflation module.
func NewParams ¶
func NewParams( mintDenom string, exponentialCalculation ExponentialCalculation, inflationDistribution InflationDistribution, ) Params
func (*Params) Descriptor ¶
func (*Params) GetExponentialCalculation ¶
func (m *Params) GetExponentialCalculation() ExponentialCalculation
func (*Params) GetInflationDistribution ¶
func (m *Params) GetInflationDistribution() InflationDistribution
func (*Params) GetMintDenom ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
Implements 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 QueryClient ¶
type QueryClient interface { // Period retrieves current period. Period(ctx context.Context, in *QueryPeriodRequest, opts ...grpc.CallOption) (*QueryPeriodResponse, error) // EpochMintProvision retrieves current minting epoch provision value. EpochMintProvision(ctx context.Context, in *QueryEpochMintProvisionRequest, opts ...grpc.CallOption) (*QueryEpochMintProvisionResponse, error) // Params retrieves the total set of minting parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryEpochMintProvisionRequest ¶
type QueryEpochMintProvisionRequest struct { }
QueryEpochMintProvisionRequest is the request type for the Query/EpochMintProvision RPC method.
func (*QueryEpochMintProvisionRequest) Descriptor ¶
func (*QueryEpochMintProvisionRequest) Descriptor() ([]byte, []int)
func (*QueryEpochMintProvisionRequest) Marshal ¶
func (m *QueryEpochMintProvisionRequest) Marshal() (dAtA []byte, err error)
func (*QueryEpochMintProvisionRequest) MarshalTo ¶
func (m *QueryEpochMintProvisionRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryEpochMintProvisionRequest) MarshalToSizedBuffer ¶
func (m *QueryEpochMintProvisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEpochMintProvisionRequest) ProtoMessage ¶
func (*QueryEpochMintProvisionRequest) ProtoMessage()
func (*QueryEpochMintProvisionRequest) Reset ¶
func (m *QueryEpochMintProvisionRequest) Reset()
func (*QueryEpochMintProvisionRequest) Size ¶
func (m *QueryEpochMintProvisionRequest) Size() (n int)
func (*QueryEpochMintProvisionRequest) String ¶
func (m *QueryEpochMintProvisionRequest) String() string
func (*QueryEpochMintProvisionRequest) Unmarshal ¶
func (m *QueryEpochMintProvisionRequest) Unmarshal(dAtA []byte) error
func (*QueryEpochMintProvisionRequest) XXX_DiscardUnknown ¶
func (m *QueryEpochMintProvisionRequest) XXX_DiscardUnknown()
func (*QueryEpochMintProvisionRequest) XXX_Marshal ¶
func (m *QueryEpochMintProvisionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEpochMintProvisionRequest) XXX_Merge ¶
func (m *QueryEpochMintProvisionRequest) XXX_Merge(src proto.Message)
func (*QueryEpochMintProvisionRequest) XXX_Size ¶
func (m *QueryEpochMintProvisionRequest) XXX_Size() int
func (*QueryEpochMintProvisionRequest) XXX_Unmarshal ¶
func (m *QueryEpochMintProvisionRequest) XXX_Unmarshal(b []byte) error
type QueryEpochMintProvisionResponse ¶
type QueryEpochMintProvisionResponse struct { // epoch_mint_provision is the current minting per epoch provision value. EpochMintProvision github_com_cosmos_cosmos_sdk_types.Dec `` /* 157-byte string literal not displayed */ }
QueryEpochMintProvisionResponse is the response type for the Query/EpochMintProvision RPC method.
func (*QueryEpochMintProvisionResponse) Descriptor ¶
func (*QueryEpochMintProvisionResponse) Descriptor() ([]byte, []int)
func (*QueryEpochMintProvisionResponse) Marshal ¶
func (m *QueryEpochMintProvisionResponse) Marshal() (dAtA []byte, err error)
func (*QueryEpochMintProvisionResponse) MarshalTo ¶
func (m *QueryEpochMintProvisionResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryEpochMintProvisionResponse) MarshalToSizedBuffer ¶
func (m *QueryEpochMintProvisionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEpochMintProvisionResponse) ProtoMessage ¶
func (*QueryEpochMintProvisionResponse) ProtoMessage()
func (*QueryEpochMintProvisionResponse) Reset ¶
func (m *QueryEpochMintProvisionResponse) Reset()
func (*QueryEpochMintProvisionResponse) Size ¶
func (m *QueryEpochMintProvisionResponse) Size() (n int)
func (*QueryEpochMintProvisionResponse) String ¶
func (m *QueryEpochMintProvisionResponse) String() string
func (*QueryEpochMintProvisionResponse) Unmarshal ¶
func (m *QueryEpochMintProvisionResponse) Unmarshal(dAtA []byte) error
func (*QueryEpochMintProvisionResponse) XXX_DiscardUnknown ¶
func (m *QueryEpochMintProvisionResponse) XXX_DiscardUnknown()
func (*QueryEpochMintProvisionResponse) XXX_Marshal ¶
func (m *QueryEpochMintProvisionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEpochMintProvisionResponse) XXX_Merge ¶
func (m *QueryEpochMintProvisionResponse) XXX_Merge(src proto.Message)
func (*QueryEpochMintProvisionResponse) XXX_Size ¶
func (m *QueryEpochMintProvisionResponse) XXX_Size() int
func (*QueryEpochMintProvisionResponse) XXX_Unmarshal ¶
func (m *QueryEpochMintProvisionResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is the 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 defines the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is the 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 QueryPeriodRequest ¶
type QueryPeriodRequest struct { }
QueryPeriodRequest is the request type for the Query/Period RPC method.
func (*QueryPeriodRequest) Descriptor ¶
func (*QueryPeriodRequest) Descriptor() ([]byte, []int)
func (*QueryPeriodRequest) Marshal ¶
func (m *QueryPeriodRequest) Marshal() (dAtA []byte, err error)
func (*QueryPeriodRequest) MarshalTo ¶
func (m *QueryPeriodRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPeriodRequest) MarshalToSizedBuffer ¶
func (m *QueryPeriodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPeriodRequest) ProtoMessage ¶
func (*QueryPeriodRequest) ProtoMessage()
func (*QueryPeriodRequest) Reset ¶
func (m *QueryPeriodRequest) Reset()
func (*QueryPeriodRequest) Size ¶
func (m *QueryPeriodRequest) Size() (n int)
func (*QueryPeriodRequest) String ¶
func (m *QueryPeriodRequest) String() string
func (*QueryPeriodRequest) Unmarshal ¶
func (m *QueryPeriodRequest) Unmarshal(dAtA []byte) error
func (*QueryPeriodRequest) XXX_DiscardUnknown ¶
func (m *QueryPeriodRequest) XXX_DiscardUnknown()
func (*QueryPeriodRequest) XXX_Marshal ¶
func (m *QueryPeriodRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPeriodRequest) XXX_Merge ¶
func (m *QueryPeriodRequest) XXX_Merge(src proto.Message)
func (*QueryPeriodRequest) XXX_Size ¶
func (m *QueryPeriodRequest) XXX_Size() int
func (*QueryPeriodRequest) XXX_Unmarshal ¶
func (m *QueryPeriodRequest) XXX_Unmarshal(b []byte) error
type QueryPeriodResponse ¶
type QueryPeriodResponse struct { // period is the current minting per epoch provision value. Period uint64 `protobuf:"varint,1,opt,name=period,proto3" json:"period,omitempty"` }
QueryPeriodResponse is the response type for the Query/Period RPC method.
func (*QueryPeriodResponse) Descriptor ¶
func (*QueryPeriodResponse) Descriptor() ([]byte, []int)
func (*QueryPeriodResponse) GetPeriod ¶
func (m *QueryPeriodResponse) GetPeriod() uint64
func (*QueryPeriodResponse) Marshal ¶
func (m *QueryPeriodResponse) Marshal() (dAtA []byte, err error)
func (*QueryPeriodResponse) MarshalTo ¶
func (m *QueryPeriodResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPeriodResponse) MarshalToSizedBuffer ¶
func (m *QueryPeriodResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPeriodResponse) ProtoMessage ¶
func (*QueryPeriodResponse) ProtoMessage()
func (*QueryPeriodResponse) Reset ¶
func (m *QueryPeriodResponse) Reset()
func (*QueryPeriodResponse) Size ¶
func (m *QueryPeriodResponse) Size() (n int)
func (*QueryPeriodResponse) String ¶
func (m *QueryPeriodResponse) String() string
func (*QueryPeriodResponse) Unmarshal ¶
func (m *QueryPeriodResponse) Unmarshal(dAtA []byte) error
func (*QueryPeriodResponse) XXX_DiscardUnknown ¶
func (m *QueryPeriodResponse) XXX_DiscardUnknown()
func (*QueryPeriodResponse) XXX_Marshal ¶
func (m *QueryPeriodResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPeriodResponse) XXX_Merge ¶
func (m *QueryPeriodResponse) XXX_Merge(src proto.Message)
func (*QueryPeriodResponse) XXX_Size ¶
func (m *QueryPeriodResponse) XXX_Size() int
func (*QueryPeriodResponse) XXX_Unmarshal ¶
func (m *QueryPeriodResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Period retrieves current period. Period(context.Context, *QueryPeriodRequest) (*QueryPeriodResponse, error) // EpochMintProvision retrieves current minting epoch provision value. EpochMintProvision(context.Context, *QueryEpochMintProvisionRequest) (*QueryEpochMintProvisionResponse, error) // Params retrieves the total set of minting parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) }
QueryServer is the server API for Query service.
type StakingKeeper ¶
type StakingKeeper interface { // BondedRatio the fraction of the staking tokens which are currently bonded BondedRatio(ctx sdk.Context) sdk.Dec StakingTokenSupply(ctx sdk.Context) sdk.Int TotalBondedTokens(ctx sdk.Context) sdk.Int }
StakingKeeper expected staking keeper
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) EpochMintProvision ¶
func (*UnimplementedQueryServer) EpochMintProvision(ctx context.Context, req *QueryEpochMintProvisionRequest) (*QueryEpochMintProvisionResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Period ¶
func (*UnimplementedQueryServer) Period(ctx context.Context, req *QueryPeriodRequest) (*QueryPeriodResponse, error)