types

package
v0.1.0-dev.a53b6d4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeMint = ModuleName

	AttributeKeyBondedRatio      = "bonded_ratio"
	AttributeKeyInflation        = "inflation"
	AttributeKeyAnnualProvisions = "annual_provisions"
)

Minting module event types

View Source
const (
	// module name
	ModuleName = "mint"
	// ecosystem module account name
	EcosystemModuleName = "ecosystem"

	// StoreKey is the default store key for mint
	StoreKey = ModuleName

	// GovModuleName duplicates the gov module's name to avoid a cyclic dependency with x/gov.
	// It should be synced with the gov module's name if it is ever changed.
	// See: https://github.com/cosmos/cosmos-sdk/blob/b62a28aac041829da5ded4aeacfcd7a42873d1c8/x/gov/types/keys.go#L9
	GovModuleName = "gov"
)

Variables

View Source
var (
	ErrInvalidSigner                                   = errors.Register(ModuleName, 1, "expected authority account as only signer for proposal message")
	ErrNegativeTargetEmissionPerToken                  = errors.Register(ModuleName, 2, "negative target emission per token")
	ErrInvalidPreviousRewardEmissionPerUnitStakedToken = errors.Register(ModuleName, 3, "invalid previous reward")
	ErrInvalidEcosystemTokensMinted                    = errors.Register(ModuleName, 4, "invalid ecosystem tokens minted")
	ErrZeroDenominator                                 = errors.Register(ModuleName, 5, "zero denominator")
)
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 (
	ParamsKey                                   = collections.NewPrefix(138)
	PreviousRewardEmissionPerUnitStakedTokenKey = collections.NewPrefix(139)
	PreviousBlockEmissionKey                    = collections.NewPrefix(140)
	EcosystemTokensMintedKey                    = collections.NewPrefix(141)
)

these might need to be unique across the whole module space certain tests were failing in weird ways when they were not e.g. emissions starts at 0, so maybe there was a conflict with using the same integer for the keys for multiple keepers

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)

Functions

func DefaultBlocksPerMonth

func DefaultBlocksPerMonth() uint64

~5 seconds block time, 6311520 per year, 525960 per month

func DefaultEcosystemTokensMinted added in v0.2.6

func DefaultEcosystemTokensMinted() math.Int

at genesis, nothing has been minted yet

func DefaultPreviousBlockEmission added in v0.2.6

func DefaultPreviousBlockEmission() math.Int

no emission happened last block at genesis

func DefaultPreviousRewardEmissionPerUnitStakedToken added in v0.2.6

func DefaultPreviousRewardEmissionPerUnitStakedToken() math.LegacyDec

Default previous emission per token is zero

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the interfaces types with the interface registry.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the provided genesis state to ensure the expected invariants holds.

Types

type AccountKeeper

type AccountKeeper interface {
	AddressCodec() address.Codec
	GetModuleAddress(name string) sdk.AccAddress

	// TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862
	SetModuleAccount(context.Context, sdk.ModuleAccountI)
	GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI
}

AccountKeeper defines the contract required for account APIs.

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error
	MintCoins(ctx context.Context, name string, amt sdk.Coins) error
	GetSupply(ctx context.Context, denom string) sdk.Coin
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.

type EmissionsKeeper added in v0.2.6

type EmissionsKeeper interface {
	GetTotalStake(ctx context.Context) (math.Uint, error)
	GetParamsValidatorsVsAlloraPercentReward(ctx context.Context) (alloraMath.Dec, error)
}

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// previous target emission rewards per unit staked token
	PreviousRewardEmissionPerUnitStakedToken cosmossdk_io_math.LegacyDec `` /* 220-byte string literal not displayed */
	PreviousBlockEmission                    cosmossdk_io_math.Int       `` /* 149-byte string literal not displayed */
	// number of tokens minted into the ecosystem treasury
	EcosystemTokensMinted cosmossdk_io_math.Int `` /* 149-byte string literal not displayed */
}

GenesisState defines the mint module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(
	params Params,
	previousRewardEmissionPerUnitStakedToken math.LegacyDec,
	previousBlockEmission math.Int,
	ecosystemTokensMinted math.Int,
) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// UpdateParams defines a governance operation for updating the x/mint module
	// parameters. The authority is defaults to the x/gov module account.
	//
	// Since: cosmos-sdk 0.47
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// UpdateParams defines a governance operation for updating the x/mint module
	// parameters. The authority is defaults to the x/gov module account.
	//
	// Since: cosmos-sdk 0.47
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the x/mint parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the Msg/UpdateParams request type.

Since: cosmos-sdk 0.47

func (*MsgUpdateParams) Descriptor

func (*MsgUpdateParams) Descriptor() ([]byte, []int)

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

Since: cosmos-sdk 0.47

func (*MsgUpdateParamsResponse) Descriptor

func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// type of coin to mint
	MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"`
	// block emission rate in number of blocks expected per month
	BlocksPerMonth uint64 `protobuf:"varint,2,opt,name=blocks_per_month,json=blocksPerMonth,proto3" json:"blocks_per_month,omitempty"`
	// timestep to recalibrate the emission rate
	// in units of "times per month" e.g. 30 for daily
	// or 4 for weekly
	EmissionCalibrationsTimestepPerMonth uint64 `` /* 176-byte string literal not displayed */
	// maximum total supply of the coin
	MaxSupply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=max_supply,json=maxSupply,proto3,customtype=cosmossdk.io/math.Int" json:"max_supply"`
	// ecosystem treasury fraction ideally emitted per unit time
	FEmission cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=f_emission,json=fEmission,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"f_emission"`
	// exponential moving average smoothing factor for one month
	OneMonthSmoothingDegree cosmossdk_io_math.LegacyDec `` /* 163-byte string literal not displayed */
	// percentage of the total supply is reserved and locked in the ecosystem treasury
	EcosystemTreasuryPercentOfTotalSupply cosmossdk_io_math.LegacyDec `` /* 209-byte string literal not displayed */
	// percentage of the total supply that is unlocked and usable in the foundation treasury
	FoundationTreasuryPercentOfTotalSupply cosmossdk_io_math.LegacyDec `` /* 212-byte string literal not displayed */
	// percentage of the total supply that is unlocked and usable by partipicants at the genesis
	ParticipantsPercentOfTotalSupply cosmossdk_io_math.LegacyDec `` /* 192-byte string literal not displayed */
	// percentage of the total supply that is locked in the investors bucket at the genesis
	InvestorsPercentOfTotalSupply cosmossdk_io_math.LegacyDec `` /* 184-byte string literal not displayed */
	// percentage of the total supply that is locked in the team bucket at the genesis
	TeamPercentOfTotalSupply cosmossdk_io_math.LegacyDec `` /* 169-byte string literal not displayed */
}

Params defines the parameters for the x/mint module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default x/mint module parameters.

func NewParams

func NewParams(
	mintDenom string,
	blocksPerMonth uint64,
	emissionCalibrationTimestepPerMonth uint64,
	maxSupply math.Int,
	fEmission math.LegacyDec,
	oneMonthSmoothingDegree math.LegacyDec,
	ecosystemPercentOfTotalSupply math.LegacyDec,
	foundationPercentOfTotalSupply math.LegacyDec,
	participantsPercentOfTotalSupply math.LegacyDec,
	investorsPercentOfTotalSupply math.LegacyDec,
	teamPercentOfTotalSupply math.LegacyDec,
) Params

NewParams returns Params instance with the given values.

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetBlocksPerMonth

func (m *Params) GetBlocksPerMonth() uint64

func (*Params) GetEmissionCalibrationsTimestepPerMonth

func (m *Params) GetEmissionCalibrationsTimestepPerMonth() uint64

func (*Params) GetMintDenom

func (m *Params) GetMintDenom() string

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate does the sanity check on the 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 QueryClient

type QueryClient interface {
	// Params returns the total set of minting parameters.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Inflation returns the current minting inflation value.
	Inflation(ctx context.Context, in *QueryInflationRequest, opts ...grpc.CallOption) (*QueryInflationResponse, 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 QueryInflationRequest

type QueryInflationRequest struct {
}

QueryInflationRequest is the request type for the Query/Inflation RPC method.

func (*QueryInflationRequest) Descriptor

func (*QueryInflationRequest) Descriptor() ([]byte, []int)

func (*QueryInflationRequest) Marshal

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

func (*QueryInflationRequest) MarshalTo

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

func (*QueryInflationRequest) MarshalToSizedBuffer

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

func (*QueryInflationRequest) ProtoMessage

func (*QueryInflationRequest) ProtoMessage()

func (*QueryInflationRequest) Reset

func (m *QueryInflationRequest) Reset()

func (*QueryInflationRequest) Size

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

func (*QueryInflationRequest) String

func (m *QueryInflationRequest) String() string

func (*QueryInflationRequest) Unmarshal

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

func (*QueryInflationRequest) XXX_DiscardUnknown

func (m *QueryInflationRequest) XXX_DiscardUnknown()

func (*QueryInflationRequest) XXX_Marshal

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

func (*QueryInflationRequest) XXX_Merge

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

func (*QueryInflationRequest) XXX_Size

func (m *QueryInflationRequest) XXX_Size() int

func (*QueryInflationRequest) XXX_Unmarshal

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

type QueryInflationResponse

type QueryInflationResponse struct {
	// inflation is the current minting inflation value.
	Inflation cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation"`
}

QueryInflationResponse is the response type for the Query/Inflation RPC method.

func (*QueryInflationResponse) Descriptor

func (*QueryInflationResponse) Descriptor() ([]byte, []int)

func (*QueryInflationResponse) Marshal

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

func (*QueryInflationResponse) MarshalTo

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

func (*QueryInflationResponse) MarshalToSizedBuffer

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

func (*QueryInflationResponse) ProtoMessage

func (*QueryInflationResponse) ProtoMessage()

func (*QueryInflationResponse) Reset

func (m *QueryInflationResponse) Reset()

func (*QueryInflationResponse) Size

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

func (*QueryInflationResponse) String

func (m *QueryInflationResponse) String() string

func (*QueryInflationResponse) Unmarshal

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

func (*QueryInflationResponse) XXX_DiscardUnknown

func (m *QueryInflationResponse) XXX_DiscardUnknown()

func (*QueryInflationResponse) XXX_Marshal

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

func (*QueryInflationResponse) XXX_Merge

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

func (*QueryInflationResponse) XXX_Size

func (m *QueryInflationResponse) XXX_Size() int

func (*QueryInflationResponse) XXX_Unmarshal

func (m *QueryInflationResponse) 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 QueryServer

type QueryServer interface {
	// Params returns the total set of minting parameters.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Inflation returns the current minting inflation value.
	Inflation(context.Context, *QueryInflationRequest) (*QueryInflationResponse, error)
}

QueryServer is the server API for Query service.

type StakingKeeper

type StakingKeeper interface {
	TotalBondedTokens(ctx context.Context) (math.Int, error)
}

StakingKeeper defines the expected staking keeper

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Inflation

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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