types

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ErrTextInvalidParamType                   = "invalid parameter type: %T"
	ErrTextBlocksPerYearMustBePositive        = "blocks per year must be positive: %d"
	ErrTextExcludeAmountMustBePositive        = "exclude amount must be positive: %s"
	ErrTextPhasesShouldHaveValue              = "phases should have value: %v"
	ErrTextMintParamInflationShouldBePositive = "mint parameter Inflation should be positive, is %s"
	ErrTextYearCoefficientMustBePositive      = "year coefficient should be non-zero and positive value"
	ErrTextEndPhaseParamNotAllowed            = "adding phase with equal values with end phase is not allowed"
	ErrTextNilMinter                          = "stored minter should not be nil"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "mint"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName
)

module constants

View Source
const (
	YearSeconds = 60 * 60 * yearHours

	BlocksPerYear = int64(YearSeconds / expectedBlockTime)
)

block timing

View Source
const (
	// AttributeKeyPhaseProvisions is the type name for the phase provisions events
	AttributeKeyPhaseProvisions = "phase_provisions"
)

Minting module event types

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const (
	// EndPhaseAlias is an alias for built-in end phase if
	// no valid phase available according to the current block
	EndPhaseAlias = -1
)

phase step constants

Variables

View Source
var (
	// Amino is the legacy amino codec
	Amino = codec.NewLegacyAmino()
	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
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 (
	ErrInvalidLengthMinter        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMinter          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMinter = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// DefaultExcludeAmount is the default value for exclude amount
	DefaultExcludeAmount = sdk.NewInt(int64(0))

	// DefaultPhases is the default value for inflation phases
	DefaultPhases = []Phase{
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.229787234042553191"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.286259541984732824"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.150250417362270451"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.116459627329192547"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.088041085840058694"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.063246661981728742"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.040871934604904632"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.032042723631508678"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.019710906701708279"),
		},
		{
			YearCoefficient: sdk.MustNewDecFromStr("0.5"),
			Inflation:       sdk.MustNewDecFromStr("0.003903708523096942"),
		},
	}
)
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 (
	ErrInvalidLengthPhase        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPhase          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPhase = 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 (
	ErrMintDenomIsBlank = sdkerrors.Register(ModuleName, 3001, "mint denom cannot be blank")
)

ErrMintDenomIsBlank x/mint module sentinel errors

View Source
var (
	// MinterKey is the key to use for the keeper store.
	MinterKey = []byte{0x00}
)

keys

Functions

func IsEndPhase

func IsEndPhase(phase Phase) bool

IsEndPhase returns true if the phase is equal to end phase props

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec

func RegisterCodec(_ *codec.LegacyAmino)

RegisterCodec registers module codec to the app codec

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the module interface types

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 ValidateMinter

func ValidateMinter(minter Minter) error

ValidateMinter validates minter

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
}

AccountKeeper defines the contract required for account APIs.

type BankKeeper

type BankKeeper interface {
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	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
}

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

type GenesisState

type GenesisState struct {
	// minter is a space for holding current inflation information.
	Minter Minter `protobuf:"bytes,1,opt,name=minter,proto3" json:"minter"`
	// params contains the mint module parameters.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

GenesisState defines the mint module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func NewGenesisState

func NewGenesisState(minter Minter, params Params) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor

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

func (*GenesisState) GetMinter

func (m *GenesisState) GetMinter() Minter

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

type Minter struct {
	// inflation is the current annual inflation rate.
	Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"`
	// phase_step is the index of phases slice + 1.
	PhaseStep int32 `protobuf:"varint,2,opt,name=phase_step,json=phaseStep,proto3" json:"phase_step,omitempty"`
	// phase_provisions is the current phase expected provisions.
	PhaseProvisions github_com_cosmos_cosmos_sdk_types.Dec `` /* 170-byte string literal not displayed */
	// truncated_tokens holds current truncated tokens because of Dec to Int
	// conversion in the minting.
	TruncatedTokens github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */
}

Minter represents the minting state.

func DefaultInitialMinter

func DefaultInitialMinter() Minter

DefaultInitialMinter returns a default initial Minter object for a new chain which uses an inflation rate of 10%.

func InitialMinter

func InitialMinter(inflation sdk.Dec) Minter

InitialMinter returns an initial Minter object with a given inflation value.

func NewMinter

func NewMinter(inflation, phaseProvisions sdk.Dec, phaseStep int32, truncatedTokens sdk.Dec) Minter

NewMinter returns a new Minter object with the given inflation and phase provisions values.

func (Minter) AnnualProvisions

func (m Minter) AnnualProvisions(phase Phase) sdk.Dec

AnnualProvisions returns annual provisions for the phase.

func (Minter) BlockProvisions

func (m Minter) BlockProvisions(params Params, phaseStep int) (sdk.Coin, sdk.Dec)

BlockProvisions returns the provisions for a block based on the phase provisions rate.

func (Minter) CurrentPhase

func (Minter) CurrentPhase(params Params, currentBlock int64) (Phase, int)

CurrentPhase returns current phase of the inflation

func (*Minter) Descriptor

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

func (*Minter) GetPhaseStep

func (m *Minter) GetPhaseStep() int32

func (*Minter) Marshal

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

func (*Minter) MarshalTo

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

func (*Minter) MarshalToSizedBuffer

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

func (Minter) NextPhaseProvisions

func (m Minter) NextPhaseProvisions(totalSupply sdk.Int, excludeAmount sdk.Int, phase Phase) sdk.Dec

NextPhaseProvisions returns the phase provisions based on current total supply and inflation rate.

func (*Minter) ProtoMessage

func (*Minter) ProtoMessage()

func (*Minter) Reset

func (m *Minter) Reset()

func (*Minter) Size

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

func (*Minter) String

func (m *Minter) String() string

func (*Minter) Unmarshal

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

func (*Minter) XXX_DiscardUnknown

func (m *Minter) XXX_DiscardUnknown()

func (*Minter) XXX_Marshal

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

func (*Minter) XXX_Merge

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

func (*Minter) XXX_Size

func (m *Minter) XXX_Size() int

func (*Minter) XXX_Unmarshal

func (m *Minter) 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 {
	// mint_denom is the type of coin to mint.
	MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"`
	// blocks_per_year is expected blocks per year.
	BlocksPerYear int64 `` /* 126-byte string literal not displayed */
	// phases contains phases of inflation.
	Phases []Phase `protobuf:"bytes,3,rep,name=phases,proto3" json:"phases" yaml:"phases"`
	// exclude_amount is the excluded amount form being calculated in inflation.
	ExcludeAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 162-byte string literal not displayed */
}

Params define the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(mintDenom string, blocksPerYear int64, excludeAmount sdk.Int, phases []Phase) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetBlocksPerYear

func (m *Params) GetBlocksPerYear() int64

func (*Params) GetMintDenom

func (m *Params) GetMintDenom() string

func (Params) GetPhaseAtStep

func (p Params) GetPhaseAtStep(phaseStep int) Phase

GetPhaseAtStep returns the phase object at certain step

func (*Params) GetPhases

func (m *Params) GetPhases() []Phase

func (Params) IsEndPhaseByStep

func (p Params) IsEndPhaseByStep(phaseStep int) bool

IsEndPhaseByStep checks if the phase is end phase by step

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 Phase

type Phase struct {
	// inflation is the current phase inflation rate.
	Inflation github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// year_coefficient is the proportion of a complete year.
	YearCoefficient github_com_cosmos_cosmos_sdk_types.Dec `` /* 170-byte string literal not displayed */
}

Phase defines the phase parameters for the module.

func EndPhase

func EndPhase() Phase

EndPhase returns end phase which there is no phase item with remaining blocks

func NonePhase

func NonePhase() Phase

NonePhase returns none phase object none phase is the initial phase of inflation with height 1

func (*Phase) Descriptor

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

func (*Phase) Marshal

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

func (*Phase) MarshalTo

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

func (*Phase) MarshalToSizedBuffer

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

func (*Phase) ProtoMessage

func (*Phase) ProtoMessage()

func (*Phase) Reset

func (m *Phase) Reset()

func (*Phase) Size

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

func (Phase) String

func (p Phase) String() string

String implements the Stringer interface.

func (*Phase) Unmarshal

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

func (*Phase) XXX_DiscardUnknown

func (m *Phase) XXX_DiscardUnknown()

func (*Phase) XXX_Marshal

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

func (*Phase) XXX_Merge

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

func (*Phase) XXX_Size

func (m *Phase) XXX_Size() int

func (*Phase) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the module.
	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)
	// PhaseStep returns the current phase step.
	PhaseStep(ctx context.Context, in *QueryPhaseStepRequest, opts ...grpc.CallOption) (*QueryPhaseStepResponse, error)
	// PhaseProvisions current minting phase provisions value.
	PhaseProvisions(ctx context.Context, in *QueryPhaseProvisionsRequest, opts ...grpc.CallOption) (*QueryPhaseProvisionsResponse, error)
	// EndPhaseStatus returns the current minting phase status.
	EndPhaseStatus(ctx context.Context, in *QueryEndPhaseStatusRequest, opts ...grpc.CallOption) (*QueryEndPhaseStatusResponse, 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 QueryEndPhaseStatusRequest

type QueryEndPhaseStatusRequest struct {
}

QueryEndPhaseStatusRequest is the request type for the Query/Inflation RPC method. Query/EndPhaseStatus RPC method.

func (*QueryEndPhaseStatusRequest) Descriptor

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

func (*QueryEndPhaseStatusRequest) Marshal

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

func (*QueryEndPhaseStatusRequest) MarshalTo

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

func (*QueryEndPhaseStatusRequest) MarshalToSizedBuffer

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

func (*QueryEndPhaseStatusRequest) ProtoMessage

func (*QueryEndPhaseStatusRequest) ProtoMessage()

func (*QueryEndPhaseStatusRequest) Reset

func (m *QueryEndPhaseStatusRequest) Reset()

func (*QueryEndPhaseStatusRequest) Size

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

func (*QueryEndPhaseStatusRequest) String

func (m *QueryEndPhaseStatusRequest) String() string

func (*QueryEndPhaseStatusRequest) Unmarshal

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

func (*QueryEndPhaseStatusRequest) XXX_DiscardUnknown

func (m *QueryEndPhaseStatusRequest) XXX_DiscardUnknown()

func (*QueryEndPhaseStatusRequest) XXX_Marshal

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

func (*QueryEndPhaseStatusRequest) XXX_Merge

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

func (*QueryEndPhaseStatusRequest) XXX_Size

func (m *QueryEndPhaseStatusRequest) XXX_Size() int

func (*QueryEndPhaseStatusRequest) XXX_Unmarshal

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

type QueryEndPhaseStatusResponse

type QueryEndPhaseStatusResponse struct {
	// is_in_end_phase is true if there is no more valid phase in the mint
	// parameters.
	IsInEndPhase bool `protobuf:"varint,1,opt,name=is_in_end_phase,json=isInEndPhase,proto3" json:"is_in_end_phase,omitempty"`
}

QueryEndPhaseStatusResponse is the response type for the Query/Inflation RPC method. Query/EndPhaseStatus RPC method.

func (*QueryEndPhaseStatusResponse) Descriptor

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

func (*QueryEndPhaseStatusResponse) GetIsInEndPhase

func (m *QueryEndPhaseStatusResponse) GetIsInEndPhase() bool

func (*QueryEndPhaseStatusResponse) Marshal

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

func (*QueryEndPhaseStatusResponse) MarshalTo

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

func (*QueryEndPhaseStatusResponse) MarshalToSizedBuffer

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

func (*QueryEndPhaseStatusResponse) ProtoMessage

func (*QueryEndPhaseStatusResponse) ProtoMessage()

func (*QueryEndPhaseStatusResponse) Reset

func (m *QueryEndPhaseStatusResponse) Reset()

func (*QueryEndPhaseStatusResponse) Size

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

func (*QueryEndPhaseStatusResponse) String

func (m *QueryEndPhaseStatusResponse) String() string

func (*QueryEndPhaseStatusResponse) Unmarshal

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

func (*QueryEndPhaseStatusResponse) XXX_DiscardUnknown

func (m *QueryEndPhaseStatusResponse) XXX_DiscardUnknown()

func (*QueryEndPhaseStatusResponse) XXX_Marshal

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

func (*QueryEndPhaseStatusResponse) XXX_Merge

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

func (*QueryEndPhaseStatusResponse) XXX_Size

func (m *QueryEndPhaseStatusResponse) XXX_Size() int

func (*QueryEndPhaseStatusResponse) XXX_Unmarshal

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

type QueryInflationRequest

type QueryInflationRequest struct {
}

QueryInflationRequest is the request type for the Query/Inflation RPC method. 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 github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"`
}

QueryInflationResponse is the response type for the Query/Inflation RPC method. 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. 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 contains all of the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method. 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 QueryPhaseProvisionsRequest

type QueryPhaseProvisionsRequest struct {
}

QueryPhaseProvisionsRequest is the request type for the Query/PhaseProvisions RPC method.

func (*QueryPhaseProvisionsRequest) Descriptor

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

func (*QueryPhaseProvisionsRequest) Marshal

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

func (*QueryPhaseProvisionsRequest) MarshalTo

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

func (*QueryPhaseProvisionsRequest) MarshalToSizedBuffer

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

func (*QueryPhaseProvisionsRequest) ProtoMessage

func (*QueryPhaseProvisionsRequest) ProtoMessage()

func (*QueryPhaseProvisionsRequest) Reset

func (m *QueryPhaseProvisionsRequest) Reset()

func (*QueryPhaseProvisionsRequest) Size

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

func (*QueryPhaseProvisionsRequest) String

func (m *QueryPhaseProvisionsRequest) String() string

func (*QueryPhaseProvisionsRequest) Unmarshal

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

func (*QueryPhaseProvisionsRequest) XXX_DiscardUnknown

func (m *QueryPhaseProvisionsRequest) XXX_DiscardUnknown()

func (*QueryPhaseProvisionsRequest) XXX_Marshal

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

func (*QueryPhaseProvisionsRequest) XXX_Merge

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

func (*QueryPhaseProvisionsRequest) XXX_Size

func (m *QueryPhaseProvisionsRequest) XXX_Size() int

func (*QueryPhaseProvisionsRequest) XXX_Unmarshal

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

type QueryPhaseProvisionsResponse

type QueryPhaseProvisionsResponse struct {
	// phase_provisions is the current minting phase provisions value.
	PhaseProvisions github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */
}

QueryPhaseProvisionsResponse is the response type for the Query/PhaseProvisions RPC method.

func (*QueryPhaseProvisionsResponse) Descriptor

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

func (*QueryPhaseProvisionsResponse) Marshal

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

func (*QueryPhaseProvisionsResponse) MarshalTo

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

func (*QueryPhaseProvisionsResponse) MarshalToSizedBuffer

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

func (*QueryPhaseProvisionsResponse) ProtoMessage

func (*QueryPhaseProvisionsResponse) ProtoMessage()

func (*QueryPhaseProvisionsResponse) Reset

func (m *QueryPhaseProvisionsResponse) Reset()

func (*QueryPhaseProvisionsResponse) Size

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

func (*QueryPhaseProvisionsResponse) String

func (*QueryPhaseProvisionsResponse) Unmarshal

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

func (*QueryPhaseProvisionsResponse) XXX_DiscardUnknown

func (m *QueryPhaseProvisionsResponse) XXX_DiscardUnknown()

func (*QueryPhaseProvisionsResponse) XXX_Marshal

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

func (*QueryPhaseProvisionsResponse) XXX_Merge

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

func (*QueryPhaseProvisionsResponse) XXX_Size

func (m *QueryPhaseProvisionsResponse) XXX_Size() int

func (*QueryPhaseProvisionsResponse) XXX_Unmarshal

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

type QueryPhaseStepRequest

type QueryPhaseStepRequest struct {
}

QueryPhaseStepRequest is the request type for the Query/Inflation RPC method. Query/PhaseStep RPC method.

func (*QueryPhaseStepRequest) Descriptor

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

func (*QueryPhaseStepRequest) Marshal

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

func (*QueryPhaseStepRequest) MarshalTo

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

func (*QueryPhaseStepRequest) MarshalToSizedBuffer

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

func (*QueryPhaseStepRequest) ProtoMessage

func (*QueryPhaseStepRequest) ProtoMessage()

func (*QueryPhaseStepRequest) Reset

func (m *QueryPhaseStepRequest) Reset()

func (*QueryPhaseStepRequest) Size

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

func (*QueryPhaseStepRequest) String

func (m *QueryPhaseStepRequest) String() string

func (*QueryPhaseStepRequest) Unmarshal

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

func (*QueryPhaseStepRequest) XXX_DiscardUnknown

func (m *QueryPhaseStepRequest) XXX_DiscardUnknown()

func (*QueryPhaseStepRequest) XXX_Marshal

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

func (*QueryPhaseStepRequest) XXX_Merge

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

func (*QueryPhaseStepRequest) XXX_Size

func (m *QueryPhaseStepRequest) XXX_Size() int

func (*QueryPhaseStepRequest) XXX_Unmarshal

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

type QueryPhaseStepResponse

type QueryPhaseStepResponse struct {
	// phase_step is the current phase number of the blockchain.
	PhaseStep int32 `protobuf:"varint,1,opt,name=phase_step,json=phaseStep,proto3" json:"phase_step,omitempty"`
}

QueryPhaseStepResponse is the response type for the Query/Inflation RPC method. Query/PhaseStep RPC method.

func (*QueryPhaseStepResponse) Descriptor

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

func (*QueryPhaseStepResponse) GetPhaseStep

func (m *QueryPhaseStepResponse) GetPhaseStep() int32

func (*QueryPhaseStepResponse) Marshal

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

func (*QueryPhaseStepResponse) MarshalTo

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

func (*QueryPhaseStepResponse) MarshalToSizedBuffer

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

func (*QueryPhaseStepResponse) ProtoMessage

func (*QueryPhaseStepResponse) ProtoMessage()

func (*QueryPhaseStepResponse) Reset

func (m *QueryPhaseStepResponse) Reset()

func (*QueryPhaseStepResponse) Size

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

func (*QueryPhaseStepResponse) String

func (m *QueryPhaseStepResponse) String() string

func (*QueryPhaseStepResponse) Unmarshal

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

func (*QueryPhaseStepResponse) XXX_DiscardUnknown

func (m *QueryPhaseStepResponse) XXX_DiscardUnknown()

func (*QueryPhaseStepResponse) XXX_Marshal

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

func (*QueryPhaseStepResponse) XXX_Merge

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

func (*QueryPhaseStepResponse) XXX_Size

func (m *QueryPhaseStepResponse) XXX_Size() int

func (*QueryPhaseStepResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Inflation returns the current minting inflation value.
	Inflation(context.Context, *QueryInflationRequest) (*QueryInflationResponse, error)
	// PhaseStep returns the current phase step.
	PhaseStep(context.Context, *QueryPhaseStepRequest) (*QueryPhaseStepResponse, error)
	// PhaseProvisions current minting phase provisions value.
	PhaseProvisions(context.Context, *QueryPhaseProvisionsRequest) (*QueryPhaseProvisionsResponse, error)
	// EndPhaseStatus returns the current minting phase status.
	EndPhaseStatus(context.Context, *QueryEndPhaseStatusRequest) (*QueryEndPhaseStatusResponse, error)
}

QueryServer is the server API for Query service.

type StakingKeeper

type StakingKeeper interface {
	StakingTokenSupply(ctx sdk.Context) sdk.Int
	BondedRatio(ctx sdk.Context) sdk.Dec
}

StakingKeeper defines the expected staking keeper

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

func (*UnimplementedQueryServer) Inflation

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) PhaseProvisions

func (*UnimplementedQueryServer) PhaseStep

Jump to

Keyboard shortcuts

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