types

package
v0.0.98 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Overview

NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages. These types remains solely for migration purposes and will be removed in a future release.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeUGDMint = ModuleName

	AttributeKeyBondedRatio            = "bonded_ratio"
	AttributeKeySubsidyHalvingInterval = "subsidy_halving_interval"
)

Minting module event types

View Source
const (
	// ModuleName defines the module name
	ModuleName = "ugdmint"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const PreviousBlockTimeKey = "previousBlockTime"

Variables

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 (
	// MinterKey is the key to use for the keeper store.
	MinterKey = []byte{0x00}
	ParamsKey = []byte{0x01}
)
View Source
var (
	ErrInvalidLengthMintRecord        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMintRecord          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMintRecord = fmt.Errorf("proto: unexpected end of group")
)
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 (
	KeyMintDenom              = []byte("MintDenom")
	KeySubsidyHalvingInterval = []byte("SubsidyHalvingInterval")
	KeyGoalBonded             = []byte("GoalBonded")
	KeyBlocksPerYear          = []byte("BlocksPerYear")
)

Parameter store keys

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 (
	ErrSample = errors.Register(ModuleName, 1100, "sample error")
)

x/ugdmint module sentinel errors

Functions

func ConvertIntToCoin

func ConvertIntToCoin(params Params, amount int) sdk.Coins

func ConvertStringToAcc

func ConvertStringToAcc(address string) (sdk.AccAddress, error)

func DefaultInflationCalculationFn

func DefaultInflationCalculationFn(_ sdk.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec

DefaultInflationCalculationFn is the default function used to calculate inflation.

func ParamKeyTable deprecated

func ParamKeyTable() paramtypes.KeyTable

Deprecated: ParamKeyTable the param key table for launch module

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.

func ValidateMinter

func ValidateMinter(minter Minter) error

validate minter

Types

type AccountKeeper

type AccountKeeper interface {
	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

	// Add these methods
	GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	SetAccount(ctx context.Context, acc sdk.AccountI)
	// Fetch the next account number, and increment the internal counter.
	NextAccountNumber(context.Context) uint64
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

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, moduleName string, amt sdk.Coins) error
	GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type ErrorWhenGettingCache

type ErrorWhenGettingCache struct{}

func (*ErrorWhenGettingCache) Error

func (e *ErrorWhenGettingCache) Error() string

type GenesisState

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

GenesisState defines the ugdmint module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

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 HedgehogData

type HedgehogData struct {
	Timestamp         string `json:"timestamp"`
	PreviousTimeStamp string `json:"previousTimeStamp"`
	Flags             int    `json:"flags"`
	Hedgehogtype      string `json:"type"`
	Data              Mints  `json:"data"`
	PreviousData      Mints  `json:"previousData"`
	Signature         string `json:"signature"`
}

type InflationCalculationFn

type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec

InflationCalculationFn defines the function required to calculate inflation rate during BeginBlock. It receives the minter and params stored in the keeper, along with the current bondedRatio and returns the newly calculated inflation rate. It can be used to specify a custom inflation calculation logic, instead of relying on the default logic provided by the sdk.

type Mint

type Mint struct {
	Address string
	Amount  int
	// contains filtered or unexported fields
}

type MintCache

type MintCache struct {
	// contains filtered or unexported fields
}

func GetCache

func GetCache() *MintCache

func NewCache

func NewCache() *MintCache

func (*MintCache) Read

func (mc *MintCache) Read(height uint64) (Mint, error)

type MintRecord

type MintRecord struct {
	BlockHeight int64                                    `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	Account     string                                   `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	Amount      github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

MintRecord represents a record of minting activity

func (*MintRecord) Descriptor

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

func (*MintRecord) GetAccount

func (m *MintRecord) GetAccount() string

func (*MintRecord) GetAmount

func (*MintRecord) GetBlockHeight

func (m *MintRecord) GetBlockHeight() int64

func (*MintRecord) Marshal

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

func (*MintRecord) MarshalTo

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

func (*MintRecord) MarshalToSizedBuffer

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

func (*MintRecord) ProtoMessage

func (*MintRecord) ProtoMessage()

func (*MintRecord) Reset

func (m *MintRecord) Reset()

func (*MintRecord) Size

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

func (*MintRecord) String

func (m *MintRecord) String() string

func (*MintRecord) Unmarshal

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

func (*MintRecord) XXX_DiscardUnknown

func (m *MintRecord) XXX_DiscardUnknown()

func (*MintRecord) XXX_Marshal

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

func (*MintRecord) XXX_Merge

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

func (*MintRecord) XXX_Size

func (m *MintRecord) XXX_Size() int

func (*MintRecord) XXX_Unmarshal

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

type Minter

type Minter struct {
	// current subsidy halving interval
	SubsidyHalvingInterval cosmossdk_io_math.LegacyDec `` /* 158-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 a subsidy halving interval of 13%.

func InitialMinter

func InitialMinter(subsidyHalvingInterval cosmosmath.LegacyDec) Minter

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

func NewMinter

func NewMinter(subsidyHalvingInterval cosmosmath.LegacyDec) Minter

NewMinter returns a new Minter object with the given subsidy halving interval.

func (Minter) BlockProvision

func (m Minter) BlockProvision(params Params, height uint64, ctx sdk.Context, prevCtx sdk.Context) sdk.Coins

BlockProvision returns the provisions for a block based on the UGD algorithm provisions rate.

func (*Minter) Descriptor

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

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

type Mints struct {
	Mints map[string]int
}

type MsgClient

type MsgClient interface {
	// UpdateParams defines a governance operation for updating the x/ugdmint 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/ugdmint 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/ugdmint 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) GetSigners

func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for a MsgUpdateParams message.

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

func (m *MsgUpdateParams) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

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"`
	// subsidy halving interval
	SubsidyHalvingInterval cosmossdk_io_math.LegacyDec `` /* 158-byte string literal not displayed */
	// goal of percent bonded atoms
	GoalBonded cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=goal_bonded,json=goalBonded,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"goal_bonded"`
	// expected blocks per year
	BlocksPerYear uint64 `protobuf:"varint,4,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty"`
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(
	mintDenom string, subsidyHalvingInterval, goalBonded math.LegacyDec, blocksPerYear uint64,
) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetBlocksPerYear

func (m *Params) GetBlocksPerYear() 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) ParamSetPairs

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

ParamSetPairs get the params.ParamSet

Deprecated.

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 QueryAllMintRecordsRequest

type QueryAllMintRecordsRequest struct {
}

QueryAllMintRecordsRequest is request type for the Query/AllMintRecords RPC method.

func (*QueryAllMintRecordsRequest) Descriptor

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

func (*QueryAllMintRecordsRequest) Marshal

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

func (*QueryAllMintRecordsRequest) MarshalTo

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

func (*QueryAllMintRecordsRequest) MarshalToSizedBuffer

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

func (*QueryAllMintRecordsRequest) ProtoMessage

func (*QueryAllMintRecordsRequest) ProtoMessage()

func (*QueryAllMintRecordsRequest) Reset

func (m *QueryAllMintRecordsRequest) Reset()

func (*QueryAllMintRecordsRequest) Size

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

func (*QueryAllMintRecordsRequest) String

func (m *QueryAllMintRecordsRequest) String() string

func (*QueryAllMintRecordsRequest) Unmarshal

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

func (*QueryAllMintRecordsRequest) XXX_DiscardUnknown

func (m *QueryAllMintRecordsRequest) XXX_DiscardUnknown()

func (*QueryAllMintRecordsRequest) XXX_Marshal

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

func (*QueryAllMintRecordsRequest) XXX_Merge

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

func (*QueryAllMintRecordsRequest) XXX_Size

func (m *QueryAllMintRecordsRequest) XXX_Size() int

func (*QueryAllMintRecordsRequest) XXX_Unmarshal

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

type QueryAllMintRecordsResponse

type QueryAllMintRecordsResponse struct {
	MintRecords []MintRecord `protobuf:"bytes,1,rep,name=mint_records,json=mintRecords,proto3" json:"mint_records"`
}

QueryAllMintRecordsResponse is response type for the Query/AllMintRecords RPC method.

func (*QueryAllMintRecordsResponse) Descriptor

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

func (*QueryAllMintRecordsResponse) GetMintRecords

func (m *QueryAllMintRecordsResponse) GetMintRecords() []MintRecord

func (*QueryAllMintRecordsResponse) Marshal

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

func (*QueryAllMintRecordsResponse) MarshalTo

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

func (*QueryAllMintRecordsResponse) MarshalToSizedBuffer

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

func (*QueryAllMintRecordsResponse) ProtoMessage

func (*QueryAllMintRecordsResponse) ProtoMessage()

func (*QueryAllMintRecordsResponse) Reset

func (m *QueryAllMintRecordsResponse) Reset()

func (*QueryAllMintRecordsResponse) Size

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

func (*QueryAllMintRecordsResponse) String

func (m *QueryAllMintRecordsResponse) String() string

func (*QueryAllMintRecordsResponse) Unmarshal

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

func (*QueryAllMintRecordsResponse) XXX_DiscardUnknown

func (m *QueryAllMintRecordsResponse) XXX_DiscardUnknown()

func (*QueryAllMintRecordsResponse) XXX_Marshal

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

func (*QueryAllMintRecordsResponse) XXX_Merge

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

func (*QueryAllMintRecordsResponse) XXX_Size

func (m *QueryAllMintRecordsResponse) XXX_Size() int

func (*QueryAllMintRecordsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Subsidy halving interval
	SubsidyHalvingInterval(ctx context.Context, in *QuerySubsidyHalvingIntervalRequest, opts ...grpc.CallOption) (*QuerySubsidyHalvingIntervalResponse, error)
	// AllMintRecords queries all mint records stored by the module.
	AllMintRecords(ctx context.Context, in *QueryAllMintRecordsRequest, opts ...grpc.CallOption) (*QueryAllMintRecordsResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Subsidy halving interval
	SubsidyHalvingInterval(context.Context, *QuerySubsidyHalvingIntervalRequest) (*QuerySubsidyHalvingIntervalResponse, error)
	// AllMintRecords queries all mint records stored by the module.
	AllMintRecords(context.Context, *QueryAllMintRecordsRequest) (*QueryAllMintRecordsResponse, error)
}

QueryServer is the server API for Query service.

type QuerySubsidyHalvingIntervalRequest

type QuerySubsidyHalvingIntervalRequest struct {
}

QuerySubsidyHalvingIntervalRequest is the request type for the Query/SubsidyHalvingInterval RPC method.

func (*QuerySubsidyHalvingIntervalRequest) Descriptor

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

func (*QuerySubsidyHalvingIntervalRequest) Marshal

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

func (*QuerySubsidyHalvingIntervalRequest) MarshalTo

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

func (*QuerySubsidyHalvingIntervalRequest) MarshalToSizedBuffer

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

func (*QuerySubsidyHalvingIntervalRequest) ProtoMessage

func (*QuerySubsidyHalvingIntervalRequest) ProtoMessage()

func (*QuerySubsidyHalvingIntervalRequest) Reset

func (*QuerySubsidyHalvingIntervalRequest) Size

func (*QuerySubsidyHalvingIntervalRequest) String

func (*QuerySubsidyHalvingIntervalRequest) Unmarshal

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

func (*QuerySubsidyHalvingIntervalRequest) XXX_DiscardUnknown

func (m *QuerySubsidyHalvingIntervalRequest) XXX_DiscardUnknown()

func (*QuerySubsidyHalvingIntervalRequest) XXX_Marshal

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

func (*QuerySubsidyHalvingIntervalRequest) XXX_Merge

func (*QuerySubsidyHalvingIntervalRequest) XXX_Size

func (*QuerySubsidyHalvingIntervalRequest) XXX_Unmarshal

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

type QuerySubsidyHalvingIntervalResponse

type QuerySubsidyHalvingIntervalResponse struct {
	// subsidy halving interval value.
	SubsidyHalvingInterval cosmossdk_io_math.LegacyDec `` /* 158-byte string literal not displayed */
}

QuerySubsidyHalvingIntervalResponse is the response type for the Query/SubsidyHalvingInterval RPC method.

func (*QuerySubsidyHalvingIntervalResponse) Descriptor

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

func (*QuerySubsidyHalvingIntervalResponse) Marshal

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

func (*QuerySubsidyHalvingIntervalResponse) MarshalTo

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

func (*QuerySubsidyHalvingIntervalResponse) MarshalToSizedBuffer

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

func (*QuerySubsidyHalvingIntervalResponse) ProtoMessage

func (*QuerySubsidyHalvingIntervalResponse) ProtoMessage()

func (*QuerySubsidyHalvingIntervalResponse) Reset

func (*QuerySubsidyHalvingIntervalResponse) Size

func (*QuerySubsidyHalvingIntervalResponse) String

func (*QuerySubsidyHalvingIntervalResponse) Unmarshal

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

func (*QuerySubsidyHalvingIntervalResponse) XXX_DiscardUnknown

func (m *QuerySubsidyHalvingIntervalResponse) XXX_DiscardUnknown()

func (*QuerySubsidyHalvingIntervalResponse) XXX_Marshal

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

func (*QuerySubsidyHalvingIntervalResponse) XXX_Merge

func (*QuerySubsidyHalvingIntervalResponse) XXX_Size

func (*QuerySubsidyHalvingIntervalResponse) XXX_Unmarshal

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

type StakingKeeper

type StakingKeeper interface {
	StakingTokenSupply(ctx context.Context) (math.Int, error)
	BondedRatio(ctx context.Context) (math.LegacyDec, 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) AllMintRecords

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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