Documentation ¶
Overview ¶
Package metoken is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ExponentFactor(initialExponent, resultExponent uint32) (sdk.Dec, error)
- func IsMeToken(denom string) bool
- func Rate(fromPrice, toPrice sdk.Dec, fromExponent, toExponent uint32) (sdk.Dec, error)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AcceptedAsset
- func (*AcceptedAsset) Descriptor() ([]byte, []int)
- func (this *AcceptedAsset) Equal(that interface{}) bool
- func (m *AcceptedAsset) GetDenom() string
- func (m *AcceptedAsset) Marshal() (dAtA []byte, err error)
- func (m *AcceptedAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *AcceptedAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AcceptedAsset) ProtoMessage()
- func (m *AcceptedAsset) Reset()
- func (m *AcceptedAsset) Size() (n int)
- func (m *AcceptedAsset) String() string
- func (m *AcceptedAsset) Unmarshal(dAtA []byte) error
- func (aa AcceptedAsset) Validate() error
- func (m *AcceptedAsset) XXX_DiscardUnknown()
- func (m *AcceptedAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AcceptedAsset) XXX_Merge(src proto.Message)
- func (m *AcceptedAsset) XXX_Size() int
- func (m *AcceptedAsset) XXX_Unmarshal(b []byte) error
- type AssetBalance
- func (ab AssetBalance) AvailableSupply() sdkmath.Int
- func (*AssetBalance) Descriptor() ([]byte, []int)
- func (m *AssetBalance) GetDenom() string
- func (m *AssetBalance) Marshal() (dAtA []byte, err error)
- func (m *AssetBalance) MarshalTo(dAtA []byte) (int, error)
- func (m *AssetBalance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AssetBalance) ProtoMessage()
- func (m *AssetBalance) Reset()
- func (m *AssetBalance) Size() (n int)
- func (m *AssetBalance) String() string
- func (m *AssetBalance) Unmarshal(dAtA []byte) error
- func (ab AssetBalance) Validate() error
- func (m *AssetBalance) XXX_DiscardUnknown()
- func (m *AssetBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AssetBalance) XXX_Merge(src proto.Message)
- func (m *AssetBalance) XXX_Size() int
- func (m *AssetBalance) XXX_Unmarshal(b []byte) error
- type AssetPrice
- func (*AssetPrice) Descriptor() ([]byte, []int)
- func (this *AssetPrice) Equal(that interface{}) bool
- func (m *AssetPrice) GetBaseDenom() string
- func (m *AssetPrice) GetExponent() uint32
- func (m *AssetPrice) GetSymbolDenom() string
- func (m *AssetPrice) Marshal() (dAtA []byte, err error)
- func (m *AssetPrice) MarshalTo(dAtA []byte) (int, error)
- func (m *AssetPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AssetPrice) ProtoMessage()
- func (m *AssetPrice) Reset()
- func (m *AssetPrice) Size() (n int)
- func (m *AssetPrice) String() string
- func (m *AssetPrice) Unmarshal(dAtA []byte) error
- func (m *AssetPrice) XXX_DiscardUnknown()
- func (m *AssetPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AssetPrice) XXX_Merge(src proto.Message)
- func (m *AssetPrice) XXX_Size() int
- func (m *AssetPrice) XXX_Unmarshal(b []byte) error
- type BankKeeper
- type EventInterestClaim
- func (*EventInterestClaim) Descriptor() ([]byte, []int)
- func (m *EventInterestClaim) Marshal() (dAtA []byte, err error)
- func (m *EventInterestClaim) MarshalTo(dAtA []byte) (int, error)
- func (m *EventInterestClaim) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventInterestClaim) ProtoMessage()
- func (m *EventInterestClaim) Reset()
- func (m *EventInterestClaim) Size() (n int)
- func (m *EventInterestClaim) String() string
- func (m *EventInterestClaim) Unmarshal(dAtA []byte) error
- func (m *EventInterestClaim) XXX_DiscardUnknown()
- func (m *EventInterestClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventInterestClaim) XXX_Merge(src proto.Message)
- func (m *EventInterestClaim) XXX_Size() int
- func (m *EventInterestClaim) XXX_Unmarshal(b []byte) error
- type EventRebalancing
- func (*EventRebalancing) Descriptor() ([]byte, []int)
- func (m *EventRebalancing) Marshal() (dAtA []byte, err error)
- func (m *EventRebalancing) MarshalTo(dAtA []byte) (int, error)
- func (m *EventRebalancing) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventRebalancing) ProtoMessage()
- func (m *EventRebalancing) Reset()
- func (m *EventRebalancing) Size() (n int)
- func (m *EventRebalancing) String() string
- func (m *EventRebalancing) Unmarshal(dAtA []byte) error
- func (m *EventRebalancing) XXX_DiscardUnknown()
- func (m *EventRebalancing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventRebalancing) XXX_Merge(src proto.Message)
- func (m *EventRebalancing) XXX_Size() int
- func (m *EventRebalancing) XXX_Unmarshal(b []byte) error
- type EventRedeem
- func (*EventRedeem) Descriptor() ([]byte, []int)
- func (m *EventRedeem) Marshal() (dAtA []byte, err error)
- func (m *EventRedeem) MarshalTo(dAtA []byte) (int, error)
- func (m *EventRedeem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventRedeem) ProtoMessage()
- func (m *EventRedeem) Reset()
- func (m *EventRedeem) Size() (n int)
- func (m *EventRedeem) String() string
- func (m *EventRedeem) Unmarshal(dAtA []byte) error
- func (m *EventRedeem) XXX_DiscardUnknown()
- func (m *EventRedeem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventRedeem) XXX_Merge(src proto.Message)
- func (m *EventRedeem) XXX_Size() int
- func (m *EventRedeem) XXX_Unmarshal(b []byte) error
- type EventSwap
- func (*EventSwap) Descriptor() ([]byte, []int)
- func (m *EventSwap) Marshal() (dAtA []byte, err error)
- func (m *EventSwap) MarshalTo(dAtA []byte) (int, error)
- func (m *EventSwap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventSwap) ProtoMessage()
- func (m *EventSwap) Reset()
- func (m *EventSwap) Size() (n int)
- func (m *EventSwap) String() string
- func (m *EventSwap) Unmarshal(dAtA []byte) error
- func (m *EventSwap) XXX_DiscardUnknown()
- func (m *EventSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventSwap) XXX_Merge(src proto.Message)
- func (m *EventSwap) XXX_Size() int
- func (m *EventSwap) XXX_Unmarshal(b []byte) error
- type Fee
- func (f Fee) CalculateFee(allocationDeviation sdk.Dec) sdk.Dec
- func (*Fee) Descriptor() ([]byte, []int)
- func (this *Fee) Equal(that interface{}) bool
- func (m *Fee) Marshal() (dAtA []byte, err error)
- func (m *Fee) MarshalTo(dAtA []byte) (int, error)
- func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Fee) ProtoMessage()
- func (m *Fee) Reset()
- func (m *Fee) Size() (n int)
- func (m *Fee) String() string
- func (m *Fee) Unmarshal(dAtA []byte) error
- func (f Fee) Validate() error
- func (m *Fee) XXX_DiscardUnknown()
- func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fee) XXX_Merge(src proto.Message)
- func (m *Fee) XXX_Size() int
- func (m *Fee) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetBalances() []IndexBalances
- func (m *GenesisState) GetNextInterestClaimTime() time.Time
- func (m *GenesisState) GetNextRebalancingTime() time.Time
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetRegistry() []Index
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type Index
- func (i Index) AcceptedAsset(denom string) (AcceptedAsset, int)
- func (*Index) Descriptor() ([]byte, []int)
- func (this *Index) Equal(that interface{}) bool
- func (m *Index) GetAcceptedAssets() []AcceptedAsset
- func (m *Index) GetDenom() string
- func (m *Index) GetExponent() uint32
- func (m *Index) GetFee() Fee
- func (i Index) HasAcceptedAsset(denom string) bool
- func (m *Index) Marshal() (dAtA []byte, err error)
- func (m *Index) MarshalTo(dAtA []byte) (int, error)
- func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Index) ProtoMessage()
- func (m *Index) Reset()
- func (i *Index) SetAcceptedAsset(acceptedAsset AcceptedAsset)
- func (m *Index) Size() (n int)
- func (m *Index) String() string
- func (m *Index) Unmarshal(dAtA []byte) error
- func (i Index) Validate() error
- func (m *Index) XXX_DiscardUnknown()
- func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Index) XXX_Merge(src proto.Message)
- func (m *Index) XXX_Size() int
- func (m *Index) XXX_Unmarshal(b []byte) error
- type IndexBalances
- func (ib IndexBalances) AssetBalance(denom string) (AssetBalance, int)
- func (*IndexBalances) Descriptor() ([]byte, []int)
- func (m *IndexBalances) GetAssetBalances() []AssetBalance
- func (m *IndexBalances) GetMetokenSupply() types.Coin
- func (m *IndexBalances) Marshal() (dAtA []byte, err error)
- func (m *IndexBalances) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexBalances) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IndexBalances) ProtoMessage()
- func (m *IndexBalances) Reset()
- func (ib *IndexBalances) SetAssetBalance(balance AssetBalance)
- func (m *IndexBalances) Size() (n int)
- func (m *IndexBalances) String() string
- func (m *IndexBalances) Unmarshal(dAtA []byte) error
- func (ib IndexBalances) Validate() error
- func (m *IndexBalances) XXX_DiscardUnknown()
- func (m *IndexBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexBalances) XXX_Merge(src proto.Message)
- func (m *IndexBalances) XXX_Size() int
- func (m *IndexBalances) XXX_Unmarshal(b []byte) error
- type IndexPrices
- func (*IndexPrices) Descriptor() ([]byte, []int)
- func (this *IndexPrices) Equal(that interface{}) bool
- func (m *IndexPrices) GetAssets() []AssetPrice
- func (m *IndexPrices) GetDenom() string
- func (m *IndexPrices) GetExponent() uint32
- func (m *IndexPrices) Marshal() (dAtA []byte, err error)
- func (m *IndexPrices) MarshalTo(dAtA []byte) (int, error)
- func (m *IndexPrices) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (ip IndexPrices) PriceByBaseDenom(denom string) (AssetPrice, error)
- func (*IndexPrices) ProtoMessage()
- func (ip IndexPrices) RedeemRate(from sdk.Coin, to string) (sdkmath.Int, error)
- func (m *IndexPrices) Reset()
- func (ip *IndexPrices) SetPrice(price AssetPrice)
- func (m *IndexPrices) Size() (n int)
- func (m *IndexPrices) String() string
- func (ip IndexPrices) SwapRate(from sdk.Coin) (sdkmath.Int, error)
- func (m *IndexPrices) Unmarshal(dAtA []byte) error
- func (m *IndexPrices) XXX_DiscardUnknown()
- func (m *IndexPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexPrices) XXX_Merge(src proto.Message)
- func (m *IndexPrices) XXX_Size() int
- func (m *IndexPrices) XXX_Unmarshal(b []byte) error
- type LeverageKeeper
- type MsgClient
- type MsgGovSetParams
- func (*MsgGovSetParams) Descriptor() ([]byte, []int)
- func (this *MsgGovSetParams) Equal(that interface{}) bool
- func (msg MsgGovSetParams) GetSignBytes() []byte
- func (msg *MsgGovSetParams) GetSigners() []sdk.AccAddress
- func (m *MsgGovSetParams) Marshal() (dAtA []byte, err error)
- func (m *MsgGovSetParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGovSetParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGovSetParams) ProtoMessage()
- func (m *MsgGovSetParams) Reset()
- func (msg MsgGovSetParams) Route() string
- func (m *MsgGovSetParams) Size() (n int)
- func (m *MsgGovSetParams) String() string
- func (msg MsgGovSetParams) Type() string
- func (m *MsgGovSetParams) Unmarshal(dAtA []byte) error
- func (msg *MsgGovSetParams) ValidateBasic() error
- func (m *MsgGovSetParams) XXX_DiscardUnknown()
- func (m *MsgGovSetParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGovSetParams) XXX_Merge(src proto.Message)
- func (m *MsgGovSetParams) XXX_Size() int
- func (m *MsgGovSetParams) XXX_Unmarshal(b []byte) error
- type MsgGovSetParamsResponse
- func (*MsgGovSetParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgGovSetParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgGovSetParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGovSetParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGovSetParamsResponse) ProtoMessage()
- func (m *MsgGovSetParamsResponse) Reset()
- func (m *MsgGovSetParamsResponse) Size() (n int)
- func (m *MsgGovSetParamsResponse) String() string
- func (m *MsgGovSetParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgGovSetParamsResponse) XXX_DiscardUnknown()
- func (m *MsgGovSetParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGovSetParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgGovSetParamsResponse) XXX_Size() int
- func (m *MsgGovSetParamsResponse) XXX_Unmarshal(b []byte) error
- type MsgGovUpdateRegistry
- func (*MsgGovUpdateRegistry) Descriptor() ([]byte, []int)
- func (this *MsgGovUpdateRegistry) Equal(that interface{}) bool
- func (msg MsgGovUpdateRegistry) GetSignBytes() []byte
- func (msg *MsgGovUpdateRegistry) GetSigners() []sdk.AccAddress
- func (m *MsgGovUpdateRegistry) Marshal() (dAtA []byte, err error)
- func (m *MsgGovUpdateRegistry) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGovUpdateRegistry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGovUpdateRegistry) ProtoMessage()
- func (m *MsgGovUpdateRegistry) Reset()
- func (msg MsgGovUpdateRegistry) Route() string
- func (m *MsgGovUpdateRegistry) Size() (n int)
- func (m *MsgGovUpdateRegistry) String() string
- func (msg MsgGovUpdateRegistry) Type() string
- func (m *MsgGovUpdateRegistry) Unmarshal(dAtA []byte) error
- func (msg *MsgGovUpdateRegistry) ValidateBasic() error
- func (m *MsgGovUpdateRegistry) XXX_DiscardUnknown()
- func (m *MsgGovUpdateRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGovUpdateRegistry) XXX_Merge(src proto.Message)
- func (m *MsgGovUpdateRegistry) XXX_Size() int
- func (m *MsgGovUpdateRegistry) XXX_Unmarshal(b []byte) error
- type MsgGovUpdateRegistryResponse
- func (*MsgGovUpdateRegistryResponse) Descriptor() ([]byte, []int)
- func (m *MsgGovUpdateRegistryResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgGovUpdateRegistryResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGovUpdateRegistryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGovUpdateRegistryResponse) ProtoMessage()
- func (m *MsgGovUpdateRegistryResponse) Reset()
- func (m *MsgGovUpdateRegistryResponse) Size() (n int)
- func (m *MsgGovUpdateRegistryResponse) String() string
- func (m *MsgGovUpdateRegistryResponse) Unmarshal(dAtA []byte) error
- func (m *MsgGovUpdateRegistryResponse) XXX_DiscardUnknown()
- func (m *MsgGovUpdateRegistryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGovUpdateRegistryResponse) XXX_Merge(src proto.Message)
- func (m *MsgGovUpdateRegistryResponse) XXX_Size() int
- func (m *MsgGovUpdateRegistryResponse) XXX_Unmarshal(b []byte) error
- type MsgRedeem
- func (*MsgRedeem) Descriptor() ([]byte, []int)
- func (msg MsgRedeem) GetSignBytes() []byte
- func (msg *MsgRedeem) GetSigners() []sdk.AccAddress
- func (m *MsgRedeem) Marshal() (dAtA []byte, err error)
- func (m *MsgRedeem) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRedeem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRedeem) ProtoMessage()
- func (m *MsgRedeem) Reset()
- func (msg MsgRedeem) Route() string
- func (m *MsgRedeem) Size() (n int)
- func (m *MsgRedeem) String() string
- func (msg MsgRedeem) Type() string
- func (m *MsgRedeem) Unmarshal(dAtA []byte) error
- func (msg *MsgRedeem) ValidateBasic() error
- func (m *MsgRedeem) XXX_DiscardUnknown()
- func (m *MsgRedeem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRedeem) XXX_Merge(src proto.Message)
- func (m *MsgRedeem) XXX_Size() int
- func (m *MsgRedeem) XXX_Unmarshal(b []byte) error
- type MsgRedeemResponse
- func (*MsgRedeemResponse) Descriptor() ([]byte, []int)
- func (m *MsgRedeemResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRedeemResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRedeemResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRedeemResponse) ProtoMessage()
- func (m *MsgRedeemResponse) Reset()
- func (m *MsgRedeemResponse) Size() (n int)
- func (m *MsgRedeemResponse) String() string
- func (m *MsgRedeemResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRedeemResponse) XXX_DiscardUnknown()
- func (m *MsgRedeemResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRedeemResponse) XXX_Merge(src proto.Message)
- func (m *MsgRedeemResponse) XXX_Size() int
- func (m *MsgRedeemResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgSwap
- func (*MsgSwap) Descriptor() ([]byte, []int)
- func (msg MsgSwap) GetSignBytes() []byte
- func (msg *MsgSwap) GetSigners() []sdk.AccAddress
- func (m *MsgSwap) Marshal() (dAtA []byte, err error)
- func (m *MsgSwap) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwap) ProtoMessage()
- func (m *MsgSwap) Reset()
- func (msg MsgSwap) Route() string
- func (m *MsgSwap) Size() (n int)
- func (m *MsgSwap) String() string
- func (msg MsgSwap) Type() string
- func (m *MsgSwap) Unmarshal(dAtA []byte) error
- func (msg *MsgSwap) ValidateBasic() error
- func (m *MsgSwap) XXX_DiscardUnknown()
- func (m *MsgSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwap) XXX_Merge(src proto.Message)
- func (m *MsgSwap) XXX_Size() int
- func (m *MsgSwap) XXX_Unmarshal(b []byte) error
- type MsgSwapResponse
- func (*MsgSwapResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapResponse) ProtoMessage()
- func (m *MsgSwapResponse) Reset()
- func (m *MsgSwapResponse) Size() (n int)
- func (m *MsgSwapResponse) String() string
- func (m *MsgSwapResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapResponse) XXX_DiscardUnknown()
- func (m *MsgSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapResponse) XXX_Size() int
- func (m *MsgSwapResponse) XXX_Unmarshal(b []byte) error
- type OracleKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetClaimingFrequency() int64
- func (m *Params) GetRebalancingFrequency() int64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryIndexBalances
- func (*QueryIndexBalances) Descriptor() ([]byte, []int)
- func (m *QueryIndexBalances) Marshal() (dAtA []byte, err error)
- func (m *QueryIndexBalances) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryIndexBalances) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryIndexBalances) ProtoMessage()
- func (m *QueryIndexBalances) Reset()
- func (m *QueryIndexBalances) Size() (n int)
- func (m *QueryIndexBalances) String() string
- func (m *QueryIndexBalances) Unmarshal(dAtA []byte) error
- func (m *QueryIndexBalances) XXX_DiscardUnknown()
- func (m *QueryIndexBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryIndexBalances) XXX_Merge(src proto.Message)
- func (m *QueryIndexBalances) XXX_Size() int
- func (m *QueryIndexBalances) XXX_Unmarshal(b []byte) error
- type QueryIndexBalancesResponse
- func (*QueryIndexBalancesResponse) Descriptor() ([]byte, []int)
- func (m *QueryIndexBalancesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryIndexBalancesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryIndexBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryIndexBalancesResponse) ProtoMessage()
- func (m *QueryIndexBalancesResponse) Reset()
- func (m *QueryIndexBalancesResponse) Size() (n int)
- func (m *QueryIndexBalancesResponse) String() string
- func (m *QueryIndexBalancesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryIndexBalancesResponse) XXX_DiscardUnknown()
- func (m *QueryIndexBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryIndexBalancesResponse) XXX_Merge(src proto.Message)
- func (m *QueryIndexBalancesResponse) XXX_Size() int
- func (m *QueryIndexBalancesResponse) XXX_Unmarshal(b []byte) error
- type QueryIndexPrices
- func (*QueryIndexPrices) Descriptor() ([]byte, []int)
- func (m *QueryIndexPrices) Marshal() (dAtA []byte, err error)
- func (m *QueryIndexPrices) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryIndexPrices) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryIndexPrices) ProtoMessage()
- func (m *QueryIndexPrices) Reset()
- func (m *QueryIndexPrices) Size() (n int)
- func (m *QueryIndexPrices) String() string
- func (m *QueryIndexPrices) Unmarshal(dAtA []byte) error
- func (m *QueryIndexPrices) XXX_DiscardUnknown()
- func (m *QueryIndexPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryIndexPrices) XXX_Merge(src proto.Message)
- func (m *QueryIndexPrices) XXX_Size() int
- func (m *QueryIndexPrices) XXX_Unmarshal(b []byte) error
- type QueryIndexPricesResponse
- func (*QueryIndexPricesResponse) Descriptor() ([]byte, []int)
- func (m *QueryIndexPricesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryIndexPricesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryIndexPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryIndexPricesResponse) ProtoMessage()
- func (m *QueryIndexPricesResponse) Reset()
- func (m *QueryIndexPricesResponse) Size() (n int)
- func (m *QueryIndexPricesResponse) String() string
- func (m *QueryIndexPricesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryIndexPricesResponse) XXX_DiscardUnknown()
- func (m *QueryIndexPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryIndexPricesResponse) XXX_Merge(src proto.Message)
- func (m *QueryIndexPricesResponse) XXX_Size() int
- func (m *QueryIndexPricesResponse) XXX_Unmarshal(b []byte) error
- type QueryIndexes
- func (*QueryIndexes) Descriptor() ([]byte, []int)
- func (m *QueryIndexes) Marshal() (dAtA []byte, err error)
- func (m *QueryIndexes) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryIndexes) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryIndexes) ProtoMessage()
- func (m *QueryIndexes) Reset()
- func (m *QueryIndexes) Size() (n int)
- func (m *QueryIndexes) String() string
- func (m *QueryIndexes) Unmarshal(dAtA []byte) error
- func (m *QueryIndexes) XXX_DiscardUnknown()
- func (m *QueryIndexes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryIndexes) XXX_Merge(src proto.Message)
- func (m *QueryIndexes) XXX_Size() int
- func (m *QueryIndexes) XXX_Unmarshal(b []byte) error
- type QueryIndexesResponse
- func (*QueryIndexesResponse) Descriptor() ([]byte, []int)
- func (m *QueryIndexesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryIndexesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryIndexesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryIndexesResponse) ProtoMessage()
- func (m *QueryIndexesResponse) Reset()
- func (m *QueryIndexesResponse) Size() (n int)
- func (m *QueryIndexesResponse) String() string
- func (m *QueryIndexesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryIndexesResponse) XXX_DiscardUnknown()
- func (m *QueryIndexesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryIndexesResponse) XXX_Merge(src proto.Message)
- func (m *QueryIndexesResponse) XXX_Size() int
- func (m *QueryIndexesResponse) XXX_Unmarshal(b []byte) error
- type QueryParams
- func (*QueryParams) Descriptor() ([]byte, []int)
- func (m *QueryParams) Marshal() (dAtA []byte, err error)
- func (m *QueryParams) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParams) ProtoMessage()
- func (m *QueryParams) Reset()
- func (m *QueryParams) Size() (n int)
- func (m *QueryParams) String() string
- func (m *QueryParams) Unmarshal(dAtA []byte) error
- func (m *QueryParams) XXX_DiscardUnknown()
- func (m *QueryParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParams) XXX_Merge(src proto.Message)
- func (m *QueryParams) XXX_Size() int
- func (m *QueryParams) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryRedeemFee
- func (*QueryRedeemFee) Descriptor() ([]byte, []int)
- func (m *QueryRedeemFee) Marshal() (dAtA []byte, err error)
- func (m *QueryRedeemFee) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRedeemFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRedeemFee) ProtoMessage()
- func (m *QueryRedeemFee) Reset()
- func (m *QueryRedeemFee) Size() (n int)
- func (m *QueryRedeemFee) String() string
- func (m *QueryRedeemFee) Unmarshal(dAtA []byte) error
- func (m *QueryRedeemFee) XXX_DiscardUnknown()
- func (m *QueryRedeemFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRedeemFee) XXX_Merge(src proto.Message)
- func (m *QueryRedeemFee) XXX_Size() int
- func (m *QueryRedeemFee) XXX_Unmarshal(b []byte) error
- type QueryRedeemFeeResponse
- func (*QueryRedeemFeeResponse) Descriptor() ([]byte, []int)
- func (m *QueryRedeemFeeResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryRedeemFeeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRedeemFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRedeemFeeResponse) ProtoMessage()
- func (m *QueryRedeemFeeResponse) Reset()
- func (m *QueryRedeemFeeResponse) Size() (n int)
- func (m *QueryRedeemFeeResponse) String() string
- func (m *QueryRedeemFeeResponse) Unmarshal(dAtA []byte) error
- func (m *QueryRedeemFeeResponse) XXX_DiscardUnknown()
- func (m *QueryRedeemFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRedeemFeeResponse) XXX_Merge(src proto.Message)
- func (m *QueryRedeemFeeResponse) XXX_Size() int
- func (m *QueryRedeemFeeResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QuerySwapFee
- func (*QuerySwapFee) Descriptor() ([]byte, []int)
- func (m *QuerySwapFee) Marshal() (dAtA []byte, err error)
- func (m *QuerySwapFee) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySwapFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySwapFee) ProtoMessage()
- func (m *QuerySwapFee) Reset()
- func (m *QuerySwapFee) Size() (n int)
- func (m *QuerySwapFee) String() string
- func (m *QuerySwapFee) Unmarshal(dAtA []byte) error
- func (m *QuerySwapFee) XXX_DiscardUnknown()
- func (m *QuerySwapFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySwapFee) XXX_Merge(src proto.Message)
- func (m *QuerySwapFee) XXX_Size() int
- func (m *QuerySwapFee) XXX_Unmarshal(b []byte) error
- type QuerySwapFeeResponse
- func (*QuerySwapFeeResponse) Descriptor() ([]byte, []int)
- func (m *QuerySwapFeeResponse) Marshal() (dAtA []byte, err error)
- func (m *QuerySwapFeeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySwapFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySwapFeeResponse) ProtoMessage()
- func (m *QuerySwapFeeResponse) Reset()
- func (m *QuerySwapFeeResponse) Size() (n int)
- func (m *QuerySwapFeeResponse) String() string
- func (m *QuerySwapFeeResponse) Unmarshal(dAtA []byte) error
- func (m *QuerySwapFeeResponse) XXX_DiscardUnknown()
- func (m *QuerySwapFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySwapFeeResponse) XXX_Merge(src proto.Message)
- func (m *QuerySwapFeeResponse) XXX_Size() int
- func (m *QuerySwapFeeResponse) XXX_Unmarshal(b []byte) error
- type RebalancingResult
- func (*RebalancingResult) Descriptor() ([]byte, []int)
- func (m *RebalancingResult) Marshal() (dAtA []byte, err error)
- func (m *RebalancingResult) MarshalTo(dAtA []byte) (int, error)
- func (m *RebalancingResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RebalancingResult) ProtoMessage()
- func (m *RebalancingResult) Reset()
- func (m *RebalancingResult) Size() (n int)
- func (m *RebalancingResult) String() string
- func (m *RebalancingResult) Unmarshal(dAtA []byte) error
- func (m *RebalancingResult) XXX_DiscardUnknown()
- func (m *RebalancingResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RebalancingResult) XXX_Merge(src proto.Message)
- func (m *RebalancingResult) XXX_Size() int
- func (m *RebalancingResult) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) GovSetParams(ctx context.Context, req *MsgGovSetParams) (*MsgGovSetParamsResponse, error)
- func (*UnimplementedMsgServer) GovUpdateRegistry(ctx context.Context, req *MsgGovUpdateRegistry) (*MsgGovUpdateRegistryResponse, error)
- func (*UnimplementedMsgServer) Redeem(ctx context.Context, req *MsgRedeem) (*MsgRedeemResponse, error)
- func (*UnimplementedMsgServer) Swap(ctx context.Context, req *MsgSwap) (*MsgSwapResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) IndexBalances(ctx context.Context, req *QueryIndexBalances) (*QueryIndexBalancesResponse, error)
- func (*UnimplementedQueryServer) IndexPrices(ctx context.Context, req *QueryIndexPrices) (*QueryIndexPricesResponse, error)
- func (*UnimplementedQueryServer) Indexes(ctx context.Context, req *QueryIndexes) (*QueryIndexesResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) RedeemFee(ctx context.Context, req *QueryRedeemFee) (*QueryRedeemFeeResponse, error)
- func (*UnimplementedQueryServer) SwapFee(ctx context.Context, req *QuerySwapFee) (*QuerySwapFeeResponse, error)
Constants ¶
const ( // ModuleName defines the module name ModuleName = "metoken" // StoreKey defines the primary module store key StoreKey = ModuleName )
const (
// MeTokenPrefix defines the meToken denomination prefix for all meToken Indexes.
MeTokenPrefix = "me/"
)
Variables ¶
var ( ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthMetoken = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetoken = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMetoken = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleCdc references the global x/metoken module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding as // Amino is still used for that purpose. ModuleCdc = codec.NewAminoCodec(amino) )
Functions ¶
func ExponentFactor ¶
ExponentFactor calculates the factor to multiply by which the assets with different exponents. If there is no such difference the result will be 1.
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/metoken interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AcceptedAsset ¶
type AcceptedAsset struct { // Denom is the denomination of the underlying asset. Must be the base // denom as registered in the Bank module (so IBC denom for IBC tokens). Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` // Reserve portion is the portion of swapped assets that will be kept in the metoken module as reserves, // instead of supplied to the leverage module. It is also the // portion that will be taken from metoken module reserves when a redemption occurs. // Valid values: 0-1. ReservePortion github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ // Target allocation is the portion of an accepted asset the Index is targeting to have. The sum of // target allocations of every accepted asset in the Index should be equal to 1. // Valid values: 0-1. TargetAllocation github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */ }
AcceptedAsset is an asset that is accepted to participate in the Index's swaps and redemptions, along with its metadata and parameters
func NewAcceptedAsset ¶
func NewAcceptedAsset(denom string, reservePortion, targetAllocation sdk.Dec) AcceptedAsset
NewAcceptedAsset creates a new AcceptedAsset object
func (*AcceptedAsset) Descriptor ¶
func (*AcceptedAsset) Descriptor() ([]byte, []int)
func (*AcceptedAsset) Equal ¶
func (this *AcceptedAsset) Equal(that interface{}) bool
func (*AcceptedAsset) GetDenom ¶
func (m *AcceptedAsset) GetDenom() string
func (*AcceptedAsset) Marshal ¶
func (m *AcceptedAsset) Marshal() (dAtA []byte, err error)
func (*AcceptedAsset) MarshalToSizedBuffer ¶
func (m *AcceptedAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AcceptedAsset) ProtoMessage ¶
func (*AcceptedAsset) ProtoMessage()
func (*AcceptedAsset) Reset ¶
func (m *AcceptedAsset) Reset()
func (*AcceptedAsset) Size ¶
func (m *AcceptedAsset) Size() (n int)
func (*AcceptedAsset) String ¶
func (m *AcceptedAsset) String() string
func (*AcceptedAsset) Unmarshal ¶
func (m *AcceptedAsset) Unmarshal(dAtA []byte) error
func (AcceptedAsset) Validate ¶
func (aa AcceptedAsset) Validate() error
Validate perform basic validation of the AcceptedAsset
func (*AcceptedAsset) XXX_DiscardUnknown ¶
func (m *AcceptedAsset) XXX_DiscardUnknown()
func (*AcceptedAsset) XXX_Marshal ¶
func (m *AcceptedAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AcceptedAsset) XXX_Merge ¶
func (m *AcceptedAsset) XXX_Merge(src proto.Message)
func (*AcceptedAsset) XXX_Size ¶
func (m *AcceptedAsset) XXX_Size() int
func (*AcceptedAsset) XXX_Unmarshal ¶
func (m *AcceptedAsset) XXX_Unmarshal(b []byte) error
type AssetBalance ¶
type AssetBalance struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Leveraged cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=leveraged,proto3,customtype=cosmossdk.io/math.Int" json:"leveraged"` Reserved cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=reserved,proto3,customtype=cosmossdk.io/math.Int" json:"reserved"` Fees cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=fees,proto3,customtype=cosmossdk.io/math.Int" json:"fees"` Interest cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=interest,proto3,customtype=cosmossdk.io/math.Int" json:"interest"` }
AssetBalance tracks how much of a single asset is held in leverage, reserves, fees and interest account.
func NewAssetBalance ¶
func NewAssetBalance(denom string, inLeverage, inReserves, inFees, inInterest sdkmath.Int) AssetBalance
NewAssetBalance creates a new AssetBalance object.
func NewZeroAssetBalance ¶
func NewZeroAssetBalance(denom string) AssetBalance
NewZeroAssetBalance creates a new AssetBalance object with all balances in zero.
func (AssetBalance) AvailableSupply ¶
func (ab AssetBalance) AvailableSupply() sdkmath.Int
AvailableSupply returns reserved plus leveraged
func (*AssetBalance) Descriptor ¶
func (*AssetBalance) Descriptor() ([]byte, []int)
func (*AssetBalance) GetDenom ¶
func (m *AssetBalance) GetDenom() string
func (*AssetBalance) Marshal ¶
func (m *AssetBalance) Marshal() (dAtA []byte, err error)
func (*AssetBalance) MarshalToSizedBuffer ¶
func (m *AssetBalance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AssetBalance) ProtoMessage ¶
func (*AssetBalance) ProtoMessage()
func (*AssetBalance) Reset ¶
func (m *AssetBalance) Reset()
func (*AssetBalance) Size ¶
func (m *AssetBalance) Size() (n int)
func (*AssetBalance) String ¶
func (m *AssetBalance) String() string
func (*AssetBalance) Unmarshal ¶
func (m *AssetBalance) Unmarshal(dAtA []byte) error
func (AssetBalance) Validate ¶
func (ab AssetBalance) Validate() error
Validate perform basic validation of the AssetBalance
func (*AssetBalance) XXX_DiscardUnknown ¶
func (m *AssetBalance) XXX_DiscardUnknown()
func (*AssetBalance) XXX_Marshal ¶
func (m *AssetBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AssetBalance) XXX_Merge ¶
func (m *AssetBalance) XXX_Merge(src proto.Message)
func (*AssetBalance) XXX_Size ¶
func (m *AssetBalance) XXX_Size() int
func (*AssetBalance) XXX_Unmarshal ¶
func (m *AssetBalance) XXX_Unmarshal(b []byte) error
type AssetPrice ¶
type AssetPrice struct { BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` SymbolDenom string `protobuf:"bytes,2,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty"` // Price in USD of one unit of asset, expressed in decimals. Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` // Exponent is the power of ten by which to multiply, in order to convert // an amount of the asset for the exchange operations. Exponent uint32 `protobuf:"varint,4,opt,name=exponent,proto3" json:"exponent,omitempty"` // SwapRate used for exchange calculations asset -> meToken. SwapRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=swap_rate,json=swapRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_rate"` // RedeemRate used for exchange calculations meToken -> asset. RedeemRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */ }
AssetPrice information related to the index operations.
func (*AssetPrice) Descriptor ¶
func (*AssetPrice) Descriptor() ([]byte, []int)
func (*AssetPrice) Equal ¶
func (this *AssetPrice) Equal(that interface{}) bool
func (*AssetPrice) GetBaseDenom ¶
func (m *AssetPrice) GetBaseDenom() string
func (*AssetPrice) GetExponent ¶
func (m *AssetPrice) GetExponent() uint32
func (*AssetPrice) GetSymbolDenom ¶
func (m *AssetPrice) GetSymbolDenom() string
func (*AssetPrice) Marshal ¶
func (m *AssetPrice) Marshal() (dAtA []byte, err error)
func (*AssetPrice) MarshalToSizedBuffer ¶
func (m *AssetPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AssetPrice) ProtoMessage ¶
func (*AssetPrice) ProtoMessage()
func (*AssetPrice) Reset ¶
func (m *AssetPrice) Reset()
func (*AssetPrice) Size ¶
func (m *AssetPrice) Size() (n int)
func (*AssetPrice) String ¶
func (m *AssetPrice) String() string
func (*AssetPrice) Unmarshal ¶
func (m *AssetPrice) Unmarshal(dAtA []byte) error
func (*AssetPrice) XXX_DiscardUnknown ¶
func (m *AssetPrice) XXX_DiscardUnknown()
func (*AssetPrice) XXX_Marshal ¶
func (m *AssetPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AssetPrice) XXX_Merge ¶
func (m *AssetPrice) XXX_Merge(src proto.Message)
func (*AssetPrice) XXX_Size ¶
func (m *AssetPrice) XXX_Size() int
func (*AssetPrice) XXX_Unmarshal ¶
func (m *AssetPrice) XXX_Unmarshal(b []byte) error
type BankKeeper ¶
type BankKeeper interface { MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error SendCoinsFromModuleToAccount( ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error SendCoinsFromAccountToModule( ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error }
BankKeeper defines the expected x/bank keeper interface.
type EventInterestClaim ¶
type EventInterestClaim struct { // The denom and amount of successfully claimed interest ClaimedAsset []types.Coin `protobuf:"bytes,1,rep,name=claimed_asset,json=claimedAsset,proto3" json:"claimed_asset"` }
EventInterestClaim is emitted when the accrued interest was claimed from x/leverage
func (*EventInterestClaim) Descriptor ¶
func (*EventInterestClaim) Descriptor() ([]byte, []int)
func (*EventInterestClaim) Marshal ¶
func (m *EventInterestClaim) Marshal() (dAtA []byte, err error)
func (*EventInterestClaim) MarshalTo ¶
func (m *EventInterestClaim) MarshalTo(dAtA []byte) (int, error)
func (*EventInterestClaim) MarshalToSizedBuffer ¶
func (m *EventInterestClaim) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventInterestClaim) ProtoMessage ¶
func (*EventInterestClaim) ProtoMessage()
func (*EventInterestClaim) Reset ¶
func (m *EventInterestClaim) Reset()
func (*EventInterestClaim) Size ¶
func (m *EventInterestClaim) Size() (n int)
func (*EventInterestClaim) String ¶
func (m *EventInterestClaim) String() string
func (*EventInterestClaim) Unmarshal ¶
func (m *EventInterestClaim) Unmarshal(dAtA []byte) error
func (*EventInterestClaim) XXX_DiscardUnknown ¶
func (m *EventInterestClaim) XXX_DiscardUnknown()
func (*EventInterestClaim) XXX_Marshal ¶
func (m *EventInterestClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventInterestClaim) XXX_Merge ¶
func (m *EventInterestClaim) XXX_Merge(src proto.Message)
func (*EventInterestClaim) XXX_Size ¶
func (m *EventInterestClaim) XXX_Size() int
func (*EventInterestClaim) XXX_Unmarshal ¶
func (m *EventInterestClaim) XXX_Unmarshal(b []byte) error
type EventRebalancing ¶
type EventRebalancing struct { // RebalancingResults of every asset in every Index. Results []RebalancingResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results"` }
EventRebalancing is emitted when a reserve re-balancing occurs.
func (*EventRebalancing) Descriptor ¶
func (*EventRebalancing) Descriptor() ([]byte, []int)
func (*EventRebalancing) Marshal ¶
func (m *EventRebalancing) Marshal() (dAtA []byte, err error)
func (*EventRebalancing) MarshalToSizedBuffer ¶
func (m *EventRebalancing) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventRebalancing) ProtoMessage ¶
func (*EventRebalancing) ProtoMessage()
func (*EventRebalancing) Reset ¶
func (m *EventRebalancing) Reset()
func (*EventRebalancing) Size ¶
func (m *EventRebalancing) Size() (n int)
func (*EventRebalancing) String ¶
func (m *EventRebalancing) String() string
func (*EventRebalancing) Unmarshal ¶
func (m *EventRebalancing) Unmarshal(dAtA []byte) error
func (*EventRebalancing) XXX_DiscardUnknown ¶
func (m *EventRebalancing) XXX_DiscardUnknown()
func (*EventRebalancing) XXX_Marshal ¶
func (m *EventRebalancing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventRebalancing) XXX_Merge ¶
func (m *EventRebalancing) XXX_Merge(src proto.Message)
func (*EventRebalancing) XXX_Size ¶
func (m *EventRebalancing) XXX_Size() int
func (*EventRebalancing) XXX_Unmarshal ¶
func (m *EventRebalancing) XXX_Unmarshal(b []byte) error
type EventRedeem ¶
type EventRedeem struct { // Asset recipient bech32 address. Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` // meToken provided for the redemption. Metoken types.Coin `protobuf:"bytes,2,opt,name=metoken,proto3" json:"metoken"` // Asset received by the recipient in exchange for the provided meToken. Asset types.Coin `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset"` // Fee provided for the redemption. Fee types.Coin `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee"` }
EventRedeem is emitted on Msg/Redeem
func (*EventRedeem) Descriptor ¶
func (*EventRedeem) Descriptor() ([]byte, []int)
func (*EventRedeem) Marshal ¶
func (m *EventRedeem) Marshal() (dAtA []byte, err error)
func (*EventRedeem) MarshalToSizedBuffer ¶
func (m *EventRedeem) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventRedeem) ProtoMessage ¶
func (*EventRedeem) ProtoMessage()
func (*EventRedeem) Reset ¶
func (m *EventRedeem) Reset()
func (*EventRedeem) Size ¶
func (m *EventRedeem) Size() (n int)
func (*EventRedeem) String ¶
func (m *EventRedeem) String() string
func (*EventRedeem) Unmarshal ¶
func (m *EventRedeem) Unmarshal(dAtA []byte) error
func (*EventRedeem) XXX_DiscardUnknown ¶
func (m *EventRedeem) XXX_DiscardUnknown()
func (*EventRedeem) XXX_Marshal ¶
func (m *EventRedeem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventRedeem) XXX_Merge ¶
func (m *EventRedeem) XXX_Merge(src proto.Message)
func (*EventRedeem) XXX_Size ¶
func (m *EventRedeem) XXX_Size() int
func (*EventRedeem) XXX_Unmarshal ¶
func (m *EventRedeem) XXX_Unmarshal(b []byte) error
type EventSwap ¶
type EventSwap struct { // meToken recipient bech32 address. Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` // Asset provided for the swap. Asset types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"` // meToken received by the recipient in exchange for the provided asset. Metoken types.Coin `protobuf:"bytes,3,opt,name=metoken,proto3" json:"metoken"` // Fee provided for the swap. Fee types.Coin `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee"` }
EventSwap is emitted on Msg/Swap
func (*EventSwap) Descriptor ¶
func (*EventSwap) MarshalToSizedBuffer ¶
func (*EventSwap) ProtoMessage ¶
func (*EventSwap) ProtoMessage()
func (*EventSwap) XXX_DiscardUnknown ¶
func (m *EventSwap) XXX_DiscardUnknown()
func (*EventSwap) XXX_Marshal ¶
func (*EventSwap) XXX_Unmarshal ¶
type Fee ¶
type Fee struct { // Min fee is the minimum fee to be charged to the user. The applied fee will tend to decrease down to this value, // when the accepted asset is undersupplied in the index. It must be less than Balanced and Max fees. // Valid values: 0-1. MinFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=min_fee,json=minFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_fee"` // Balanced fee is the fee to be charged to the user when the index is balanced. It must be greater than min_fee and // lower than max_fee // Valid values: 0-1. BalancedFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ // Max fee is the maximum fee to be charged to the user. The applied fee will tend to increase up to this value, // when the accepted asset is oversupplied in the index. It must be greater than Min and Balanced fee. // Valid values: 0-1. MaxFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_fee"` }
Fee are the parameters used for the calculation of the fee to be applied for swaps and redemptions and charged to the user. The usage of these parameters is explained here: https://github.com/umee-network/umee/tree/main/x/metoken#dynamic-fee
func (Fee) CalculateFee ¶
CalculateFee based on its settings and allocation deviation.
func (*Fee) Descriptor ¶
func (*Fee) ProtoMessage ¶
func (*Fee) ProtoMessage()
func (*Fee) XXX_DiscardUnknown ¶
func (m *Fee) XXX_DiscardUnknown()
func (*Fee) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` Registry []Index `protobuf:"bytes,2,rep,name=registry,proto3" json:"registry"` Balances []IndexBalances `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances"` NextRebalancingTime time.Time `protobuf:"bytes,4,opt,name=next_rebalancing_time,json=nextRebalancingTime,proto3,stdtime" json:"next_rebalancing_time"` NextInterestClaimTime time.Time `` /* 126-byte string literal not displayed */ }
GenesisState defines the x/metoken module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState creates a new default GenesisState object
func NewGenesisState ¶
func NewGenesisState( params Params, registry []Index, balances []IndexBalances, nextRebalancingTime time.Time, nextInterestClaimTime time.Time, ) *GenesisState
NewGenesisState creates a new GenesisState object
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetBalances ¶
func (m *GenesisState) GetBalances() []IndexBalances
func (*GenesisState) GetNextInterestClaimTime ¶
func (m *GenesisState) GetNextInterestClaimTime() time.Time
func (*GenesisState) GetNextRebalancingTime ¶
func (m *GenesisState) GetNextRebalancingTime() time.Time
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetRegistry ¶
func (m *GenesisState) GetRegistry() []Index
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate perform basic validation of the GenesisState
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 Index ¶
type Index struct { // Denom is the denomination of the Index's meToken denom that will be given to user in exchange of accepted // assets. Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` // MaxSupply is the maximum amount of Index's meTokens can be minted. // A swap that requires to mint more Index's meToken than this value will result in an error. // Must be a non negative value. 0 means that there is no limit. MaxSupply cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=max_supply,json=maxSupply,proto3,customtype=cosmossdk.io/math.Int" json:"max_supply"` // Exponent is the power of ten by which to multiply, in order to convert // an amount of the meToken for the exchange operations. // Valid value: must be the same as the oracle.Denom.exponent. Exponent uint32 `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty"` // Fee contains fee parameters used for swap and redemption fee calculations for all underlying // assets in this index. Fee Fee `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee"` // Accepted Assets is the list of underlying Tokens that can be swapped and redeemed for the Index's meToken, // along with their token-specific parameters. AcceptedAssets []AcceptedAsset `protobuf:"bytes,5,rep,name=accepted_assets,json=acceptedAssets,proto3" json:"accepted_assets"` }
Index defines an index of assets that are allowed to swap and redeem for the Index's meToken, along with its metadata and parameters.
func NewIndex ¶
func NewIndex(denom string, maxSupply sdkmath.Int, exponent uint32, fee Fee, acceptedAssets []AcceptedAsset) Index
NewIndex creates a new Index object
func (Index) AcceptedAsset ¶
func (i Index) AcceptedAsset(denom string) (AcceptedAsset, int)
AcceptedAsset returns an accepted asset and its index in the list, given a specific denom. If it isn't present, returns -1.
func (*Index) Descriptor ¶
func (*Index) GetAcceptedAssets ¶
func (m *Index) GetAcceptedAssets() []AcceptedAsset
func (*Index) GetExponent ¶
func (Index) HasAcceptedAsset ¶
HasAcceptedAsset returns true if an accepted asset is present in the index. Otherwise returns false.
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) SetAcceptedAsset ¶
func (i *Index) SetAcceptedAsset(acceptedAsset AcceptedAsset)
SetAcceptedAsset overrides an accepted asset if exists in the list, otherwise add it to the list.
func (*Index) XXX_DiscardUnknown ¶
func (m *Index) XXX_DiscardUnknown()
func (*Index) XXX_Marshal ¶
func (*Index) XXX_Unmarshal ¶
type IndexBalances ¶
type IndexBalances struct { MetokenSupply types.Coin `protobuf:"bytes,1,opt,name=metoken_supply,json=metokenSupply,proto3" json:"metoken_supply"` AssetBalances []AssetBalance `protobuf:"bytes,2,rep,name=asset_balances,json=assetBalances,proto3" json:"asset_balances"` }
IndexBalances is the state of an Index, containing its meToken supply and all underlying asset balances.
func NewIndexBalances ¶
func NewIndexBalances(meTokenSupply sdk.Coin, assetBalances []AssetBalance) IndexBalances
NewIndexBalances creates a new IndexBalances object.
func (IndexBalances) AssetBalance ¶
func (ib IndexBalances) AssetBalance(denom string) (AssetBalance, int)
AssetBalance returns an asset balance and its index from balances, given a specific denom. If it isn't present, -1 as index.
func (*IndexBalances) Descriptor ¶
func (*IndexBalances) Descriptor() ([]byte, []int)
func (*IndexBalances) GetAssetBalances ¶
func (m *IndexBalances) GetAssetBalances() []AssetBalance
func (*IndexBalances) GetMetokenSupply ¶
func (m *IndexBalances) GetMetokenSupply() types.Coin
func (*IndexBalances) Marshal ¶
func (m *IndexBalances) Marshal() (dAtA []byte, err error)
func (*IndexBalances) MarshalToSizedBuffer ¶
func (m *IndexBalances) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IndexBalances) ProtoMessage ¶
func (*IndexBalances) ProtoMessage()
func (*IndexBalances) Reset ¶
func (m *IndexBalances) Reset()
func (*IndexBalances) SetAssetBalance ¶
func (ib *IndexBalances) SetAssetBalance(balance AssetBalance)
SetAssetBalance overrides an asset balance if exists in the list, otherwise add it to the list.
func (*IndexBalances) Size ¶
func (m *IndexBalances) Size() (n int)
func (*IndexBalances) String ¶
func (m *IndexBalances) String() string
func (*IndexBalances) Unmarshal ¶
func (m *IndexBalances) Unmarshal(dAtA []byte) error
func (IndexBalances) Validate ¶
func (ib IndexBalances) Validate() error
Validate perform basic validation of the IndexBalances
func (*IndexBalances) XXX_DiscardUnknown ¶
func (m *IndexBalances) XXX_DiscardUnknown()
func (*IndexBalances) XXX_Marshal ¶
func (m *IndexBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexBalances) XXX_Merge ¶
func (m *IndexBalances) XXX_Merge(src proto.Message)
func (*IndexBalances) XXX_Size ¶
func (m *IndexBalances) XXX_Size() int
func (*IndexBalances) XXX_Unmarshal ¶
func (m *IndexBalances) XXX_Unmarshal(b []byte) error
type IndexPrices ¶
type IndexPrices struct { // meToken denom. Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` // Price in USD of one unit of meToken, expressed in decimals. Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` // Exponent is the power of ten by which to multiply, in order to convert // an amount of the meToken for the exchange operations. Exponent uint32 `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty"` Assets []AssetPrice `protobuf:"bytes,4,rep,name=assets,proto3" json:"assets"` }
IndexPrices provides meToken price related index information.
func EmptyIndexPrices ¶
func EmptyIndexPrices(index Index) IndexPrices
func (*IndexPrices) Descriptor ¶
func (*IndexPrices) Descriptor() ([]byte, []int)
func (*IndexPrices) Equal ¶
func (this *IndexPrices) Equal(that interface{}) bool
func (*IndexPrices) GetAssets ¶
func (m *IndexPrices) GetAssets() []AssetPrice
func (*IndexPrices) GetDenom ¶
func (m *IndexPrices) GetDenom() string
func (*IndexPrices) GetExponent ¶
func (m *IndexPrices) GetExponent() uint32
func (*IndexPrices) Marshal ¶
func (m *IndexPrices) Marshal() (dAtA []byte, err error)
func (*IndexPrices) MarshalToSizedBuffer ¶
func (m *IndexPrices) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (IndexPrices) PriceByBaseDenom ¶
func (ip IndexPrices) PriceByBaseDenom(denom string) (AssetPrice, error)
PriceByBaseDenom returns a AssetPrice given a specific base_denom.
func (*IndexPrices) ProtoMessage ¶
func (*IndexPrices) ProtoMessage()
func (IndexPrices) RedeemRate ¶
RedeemRate converts meToken to an asset applying exchange_rate and normalizing the exponent.
func (*IndexPrices) Reset ¶
func (m *IndexPrices) Reset()
func (*IndexPrices) SetPrice ¶
func (ip *IndexPrices) SetPrice(price AssetPrice)
SetPrice to the IndexPrices.
func (*IndexPrices) Size ¶
func (m *IndexPrices) Size() (n int)
func (*IndexPrices) String ¶
func (m *IndexPrices) String() string
func (IndexPrices) SwapRate ¶
SwapRate converts an asset to meToken applying exchange_rate and normalizing the exponent.
func (*IndexPrices) Unmarshal ¶
func (m *IndexPrices) Unmarshal(dAtA []byte) error
func (*IndexPrices) XXX_DiscardUnknown ¶
func (m *IndexPrices) XXX_DiscardUnknown()
func (*IndexPrices) XXX_Marshal ¶
func (m *IndexPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexPrices) XXX_Merge ¶
func (m *IndexPrices) XXX_Merge(src proto.Message)
func (*IndexPrices) XXX_Size ¶
func (m *IndexPrices) XXX_Size() int
func (*IndexPrices) XXX_Unmarshal ¶
func (m *IndexPrices) XXX_Unmarshal(b []byte) error
type LeverageKeeper ¶
type LeverageKeeper interface { GetTokenSettings(ctx sdk.Context, denom string) (ltypes.Token, error) ToUToken(ctx sdk.Context, token sdk.Coin) (sdk.Coin, error) ToToken(ctx sdk.Context, uToken sdk.Coin) (sdk.Coin, error) SupplyFromModule(ctx sdk.Context, fromModule string, coin sdk.Coin) (sdk.Coin, bool, error) WithdrawToModule(ctx sdk.Context, toModule string, uToken sdk.Coin) (sdk.Coin, bool, error) ModuleMaxWithdraw(ctx sdk.Context, spendableUTokens sdk.Coin) (sdkmath.Int, error) GetTotalSupply(ctx sdk.Context, denom string) (sdk.Coin, error) GetAllSupplied(ctx sdk.Context, supplierAddr sdk.AccAddress) (sdk.Coins, error) }
LeverageKeeper interface for interacting with x/leverage
type MsgClient ¶
type MsgClient interface { // Swap defines a method for swapping an accepted asset for Index's meToken. Swap(ctx context.Context, in *MsgSwap, opts ...grpc.CallOption) (*MsgSwapResponse, error) // Redeem defines a method for redeeming Index's meToken for an accepted asset. Redeem(ctx context.Context, in *MsgRedeem, opts ...grpc.CallOption) (*MsgRedeemResponse, error) // GovSetParams is used by governance proposals to update parameters. GovSetParams(ctx context.Context, in *MsgGovSetParams, opts ...grpc.CallOption) (*MsgGovSetParamsResponse, error) // GovUpdateRegistry adds new index to the index registry or // updates existing index with new settings. GovUpdateRegistry(ctx context.Context, in *MsgGovUpdateRegistry, opts ...grpc.CallOption) (*MsgGovUpdateRegistryResponse, 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 MsgGovSetParams ¶
type MsgGovSetParams struct { // authority must be the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgGovSetParams defines the Msg/GovSetParams request type.
func NewMsgGovSetParams ¶
func NewMsgGovSetParams(authority string, params Params) *MsgGovSetParams
func (*MsgGovSetParams) Descriptor ¶
func (*MsgGovSetParams) Descriptor() ([]byte, []int)
func (*MsgGovSetParams) Equal ¶
func (this *MsgGovSetParams) Equal(that interface{}) bool
func (MsgGovSetParams) GetSignBytes ¶
func (msg MsgGovSetParams) GetSignBytes() []byte
func (*MsgGovSetParams) GetSigners ¶
func (msg *MsgGovSetParams) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgGovSetParams) Marshal ¶
func (m *MsgGovSetParams) Marshal() (dAtA []byte, err error)
func (*MsgGovSetParams) MarshalToSizedBuffer ¶
func (m *MsgGovSetParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGovSetParams) ProtoMessage ¶
func (*MsgGovSetParams) ProtoMessage()
func (*MsgGovSetParams) Reset ¶
func (m *MsgGovSetParams) Reset()
func (MsgGovSetParams) Route ¶
func (msg MsgGovSetParams) Route() string
LegacyMsg.Type implementations
func (*MsgGovSetParams) Size ¶
func (m *MsgGovSetParams) Size() (n int)
func (*MsgGovSetParams) String ¶
func (m *MsgGovSetParams) String() string
func (MsgGovSetParams) Type ¶
func (msg MsgGovSetParams) Type() string
func (*MsgGovSetParams) Unmarshal ¶
func (m *MsgGovSetParams) Unmarshal(dAtA []byte) error
func (*MsgGovSetParams) ValidateBasic ¶
func (msg *MsgGovSetParams) ValidateBasic() error
ValidateBasic implements Msg
func (*MsgGovSetParams) XXX_DiscardUnknown ¶
func (m *MsgGovSetParams) XXX_DiscardUnknown()
func (*MsgGovSetParams) XXX_Marshal ¶
func (m *MsgGovSetParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGovSetParams) XXX_Merge ¶
func (m *MsgGovSetParams) XXX_Merge(src proto.Message)
func (*MsgGovSetParams) XXX_Size ¶
func (m *MsgGovSetParams) XXX_Size() int
func (*MsgGovSetParams) XXX_Unmarshal ¶
func (m *MsgGovSetParams) XXX_Unmarshal(b []byte) error
type MsgGovSetParamsResponse ¶
type MsgGovSetParamsResponse struct { }
MsgGovSetParamsResponse defines the Msg/GovSetParams response type.
func (*MsgGovSetParamsResponse) Descriptor ¶
func (*MsgGovSetParamsResponse) Descriptor() ([]byte, []int)
func (*MsgGovSetParamsResponse) Marshal ¶
func (m *MsgGovSetParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgGovSetParamsResponse) MarshalTo ¶
func (m *MsgGovSetParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgGovSetParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgGovSetParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGovSetParamsResponse) ProtoMessage ¶
func (*MsgGovSetParamsResponse) ProtoMessage()
func (*MsgGovSetParamsResponse) Reset ¶
func (m *MsgGovSetParamsResponse) Reset()
func (*MsgGovSetParamsResponse) Size ¶
func (m *MsgGovSetParamsResponse) Size() (n int)
func (*MsgGovSetParamsResponse) String ¶
func (m *MsgGovSetParamsResponse) String() string
func (*MsgGovSetParamsResponse) Unmarshal ¶
func (m *MsgGovSetParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgGovSetParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgGovSetParamsResponse) XXX_DiscardUnknown()
func (*MsgGovSetParamsResponse) XXX_Marshal ¶
func (m *MsgGovSetParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGovSetParamsResponse) XXX_Merge ¶
func (m *MsgGovSetParamsResponse) XXX_Merge(src proto.Message)
func (*MsgGovSetParamsResponse) XXX_Size ¶
func (m *MsgGovSetParamsResponse) XXX_Size() int
func (*MsgGovSetParamsResponse) XXX_Unmarshal ¶
func (m *MsgGovSetParamsResponse) XXX_Unmarshal(b []byte) error
type MsgGovUpdateRegistry ¶
type MsgGovUpdateRegistry struct { // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // add_index defines new index settings. AddIndex []Index `protobuf:"bytes,2,rep,name=add_index,json=addIndex,proto3" json:"add_index"` // update_index defines the new settings for existing index. UpdateIndex []Index `protobuf:"bytes,3,rep,name=update_index,json=updateIndex,proto3" json:"update_index"` }
MsgGovUpdateRegistry defines the Msg/GovUpdateRegistry request type.
func NewMsgGovUpdateRegistry ¶
func NewMsgGovUpdateRegistry(authority string, addIndex, updateIndex []Index) *MsgGovUpdateRegistry
func (*MsgGovUpdateRegistry) Descriptor ¶
func (*MsgGovUpdateRegistry) Descriptor() ([]byte, []int)
func (*MsgGovUpdateRegistry) Equal ¶
func (this *MsgGovUpdateRegistry) Equal(that interface{}) bool
func (MsgGovUpdateRegistry) GetSignBytes ¶
func (msg MsgGovUpdateRegistry) GetSignBytes() []byte
func (*MsgGovUpdateRegistry) GetSigners ¶
func (msg *MsgGovUpdateRegistry) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgGovUpdateRegistry) Marshal ¶
func (m *MsgGovUpdateRegistry) Marshal() (dAtA []byte, err error)
func (*MsgGovUpdateRegistry) MarshalTo ¶
func (m *MsgGovUpdateRegistry) MarshalTo(dAtA []byte) (int, error)
func (*MsgGovUpdateRegistry) MarshalToSizedBuffer ¶
func (m *MsgGovUpdateRegistry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGovUpdateRegistry) ProtoMessage ¶
func (*MsgGovUpdateRegistry) ProtoMessage()
func (*MsgGovUpdateRegistry) Reset ¶
func (m *MsgGovUpdateRegistry) Reset()
func (MsgGovUpdateRegistry) Route ¶
func (msg MsgGovUpdateRegistry) Route() string
LegacyMsg.Type implementations
func (*MsgGovUpdateRegistry) Size ¶
func (m *MsgGovUpdateRegistry) Size() (n int)
func (*MsgGovUpdateRegistry) String ¶
func (m *MsgGovUpdateRegistry) String() string
func (MsgGovUpdateRegistry) Type ¶
func (msg MsgGovUpdateRegistry) Type() string
func (*MsgGovUpdateRegistry) Unmarshal ¶
func (m *MsgGovUpdateRegistry) Unmarshal(dAtA []byte) error
func (*MsgGovUpdateRegistry) ValidateBasic ¶
func (msg *MsgGovUpdateRegistry) ValidateBasic() error
ValidateBasic implements Msg
func (*MsgGovUpdateRegistry) XXX_DiscardUnknown ¶
func (m *MsgGovUpdateRegistry) XXX_DiscardUnknown()
func (*MsgGovUpdateRegistry) XXX_Marshal ¶
func (m *MsgGovUpdateRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGovUpdateRegistry) XXX_Merge ¶
func (m *MsgGovUpdateRegistry) XXX_Merge(src proto.Message)
func (*MsgGovUpdateRegistry) XXX_Size ¶
func (m *MsgGovUpdateRegistry) XXX_Size() int
func (*MsgGovUpdateRegistry) XXX_Unmarshal ¶
func (m *MsgGovUpdateRegistry) XXX_Unmarshal(b []byte) error
type MsgGovUpdateRegistryResponse ¶
type MsgGovUpdateRegistryResponse struct { }
MsgGovUpdateRegistryResponse defines the Msg/GovUpdateRegistry response type.
func (*MsgGovUpdateRegistryResponse) Descriptor ¶
func (*MsgGovUpdateRegistryResponse) Descriptor() ([]byte, []int)
func (*MsgGovUpdateRegistryResponse) Marshal ¶
func (m *MsgGovUpdateRegistryResponse) Marshal() (dAtA []byte, err error)
func (*MsgGovUpdateRegistryResponse) MarshalTo ¶
func (m *MsgGovUpdateRegistryResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgGovUpdateRegistryResponse) MarshalToSizedBuffer ¶
func (m *MsgGovUpdateRegistryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGovUpdateRegistryResponse) ProtoMessage ¶
func (*MsgGovUpdateRegistryResponse) ProtoMessage()
func (*MsgGovUpdateRegistryResponse) Reset ¶
func (m *MsgGovUpdateRegistryResponse) Reset()
func (*MsgGovUpdateRegistryResponse) Size ¶
func (m *MsgGovUpdateRegistryResponse) Size() (n int)
func (*MsgGovUpdateRegistryResponse) String ¶
func (m *MsgGovUpdateRegistryResponse) String() string
func (*MsgGovUpdateRegistryResponse) Unmarshal ¶
func (m *MsgGovUpdateRegistryResponse) Unmarshal(dAtA []byte) error
func (*MsgGovUpdateRegistryResponse) XXX_DiscardUnknown ¶
func (m *MsgGovUpdateRegistryResponse) XXX_DiscardUnknown()
func (*MsgGovUpdateRegistryResponse) XXX_Marshal ¶
func (m *MsgGovUpdateRegistryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGovUpdateRegistryResponse) XXX_Merge ¶
func (m *MsgGovUpdateRegistryResponse) XXX_Merge(src proto.Message)
func (*MsgGovUpdateRegistryResponse) XXX_Size ¶
func (m *MsgGovUpdateRegistryResponse) XXX_Size() int
func (*MsgGovUpdateRegistryResponse) XXX_Unmarshal ¶
func (m *MsgGovUpdateRegistryResponse) XXX_Unmarshal(b []byte) error
type MsgRedeem ¶
type MsgRedeem struct { // User is the account address redeeming assets and the signer of the message. User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Metoken types.Coin `protobuf:"bytes,2,opt,name=metoken,proto3" json:"metoken"` AssetDenom string `protobuf:"bytes,3,opt,name=asset_denom,json=assetDenom,proto3" json:"asset_denom,omitempty"` }
MsgRedeem represents a user's request to redeem Index's meTokens for one of the accepted assets.
func NewMsgRedeem ¶
func (*MsgRedeem) Descriptor ¶
func (MsgRedeem) GetSignBytes ¶
func (*MsgRedeem) GetSigners ¶
func (msg *MsgRedeem) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgRedeem) MarshalToSizedBuffer ¶
func (*MsgRedeem) ProtoMessage ¶
func (*MsgRedeem) ProtoMessage()
func (*MsgRedeem) ValidateBasic ¶
ValidateBasic implements Msg
func (*MsgRedeem) XXX_DiscardUnknown ¶
func (m *MsgRedeem) XXX_DiscardUnknown()
func (*MsgRedeem) XXX_Marshal ¶
func (*MsgRedeem) XXX_Unmarshal ¶
type MsgRedeemResponse ¶
type MsgRedeemResponse struct { // Returned is the amount of accepted asset returned to the user. Returned types.Coin `protobuf:"bytes,1,opt,name=returned,proto3" json:"returned"` // Fee is the amount of accepted asset charged to the user as the fee for the transaction. Fee types.Coin `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee"` }
MsgRedeemResponse defines the Msg/Redeem response type.
func (*MsgRedeemResponse) Descriptor ¶
func (*MsgRedeemResponse) Descriptor() ([]byte, []int)
func (*MsgRedeemResponse) Marshal ¶
func (m *MsgRedeemResponse) Marshal() (dAtA []byte, err error)
func (*MsgRedeemResponse) MarshalTo ¶
func (m *MsgRedeemResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRedeemResponse) MarshalToSizedBuffer ¶
func (m *MsgRedeemResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRedeemResponse) ProtoMessage ¶
func (*MsgRedeemResponse) ProtoMessage()
func (*MsgRedeemResponse) Reset ¶
func (m *MsgRedeemResponse) Reset()
func (*MsgRedeemResponse) Size ¶
func (m *MsgRedeemResponse) Size() (n int)
func (*MsgRedeemResponse) String ¶
func (m *MsgRedeemResponse) String() string
func (*MsgRedeemResponse) Unmarshal ¶
func (m *MsgRedeemResponse) Unmarshal(dAtA []byte) error
func (*MsgRedeemResponse) XXX_DiscardUnknown ¶
func (m *MsgRedeemResponse) XXX_DiscardUnknown()
func (*MsgRedeemResponse) XXX_Marshal ¶
func (m *MsgRedeemResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRedeemResponse) XXX_Merge ¶
func (m *MsgRedeemResponse) XXX_Merge(src proto.Message)
func (*MsgRedeemResponse) XXX_Size ¶
func (m *MsgRedeemResponse) XXX_Size() int
func (*MsgRedeemResponse) XXX_Unmarshal ¶
func (m *MsgRedeemResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Swap defines a method for swapping an accepted asset for Index's meToken. Swap(context.Context, *MsgSwap) (*MsgSwapResponse, error) // Redeem defines a method for redeeming Index's meToken for an accepted asset. Redeem(context.Context, *MsgRedeem) (*MsgRedeemResponse, error) // GovSetParams is used by governance proposals to update parameters. GovSetParams(context.Context, *MsgGovSetParams) (*MsgGovSetParamsResponse, error) // GovUpdateRegistry adds new index to the index registry or // updates existing index with new settings. GovUpdateRegistry(context.Context, *MsgGovUpdateRegistry) (*MsgGovUpdateRegistryResponse, error) }
MsgServer is the server API for Msg service.
type MsgSwap ¶
type MsgSwap struct { // User is the account address swapping assets and the signer of the message. User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Asset types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"` MetokenDenom string `protobuf:"bytes,3,opt,name=metoken_denom,json=metokenDenom,proto3" json:"metoken_denom,omitempty"` }
MsgSwap represents a user's request to swap assets for Index's meToken.
func NewMsgSwap ¶
func (*MsgSwap) Descriptor ¶
func (MsgSwap) GetSignBytes ¶
func (*MsgSwap) GetSigners ¶
func (msg *MsgSwap) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgSwap) MarshalToSizedBuffer ¶
func (*MsgSwap) ProtoMessage ¶
func (*MsgSwap) ProtoMessage()
func (*MsgSwap) ValidateBasic ¶
ValidateBasic implements Msg
func (*MsgSwap) XXX_DiscardUnknown ¶
func (m *MsgSwap) XXX_DiscardUnknown()
func (*MsgSwap) XXX_Marshal ¶
func (*MsgSwap) XXX_Unmarshal ¶
type MsgSwapResponse ¶
type MsgSwapResponse struct { // Fee is the amount of accepted asset charged to the user as the fee for the transaction. Fee types.Coin `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee"` // Returned is the amount of Index's meToken minted and returned to the user. Returned types.Coin `protobuf:"bytes,2,opt,name=returned,proto3" json:"returned"` }
MsgSwapResponse defines the Msg/Swap response type.
func (*MsgSwapResponse) Descriptor ¶
func (*MsgSwapResponse) Descriptor() ([]byte, []int)
func (*MsgSwapResponse) Marshal ¶
func (m *MsgSwapResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapResponse) ProtoMessage ¶
func (*MsgSwapResponse) ProtoMessage()
func (*MsgSwapResponse) Reset ¶
func (m *MsgSwapResponse) Reset()
func (*MsgSwapResponse) Size ¶
func (m *MsgSwapResponse) Size() (n int)
func (*MsgSwapResponse) String ¶
func (m *MsgSwapResponse) String() string
func (*MsgSwapResponse) Unmarshal ¶
func (m *MsgSwapResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapResponse) XXX_DiscardUnknown()
func (*MsgSwapResponse) XXX_Marshal ¶
func (m *MsgSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapResponse) XXX_Merge ¶
func (m *MsgSwapResponse) XXX_Merge(src proto.Message)
func (*MsgSwapResponse) XXX_Size ¶
func (m *MsgSwapResponse) XXX_Size() int
func (*MsgSwapResponse) XXX_Unmarshal ¶
func (m *MsgSwapResponse) XXX_Unmarshal(b []byte) error
type OracleKeeper ¶
OracleKeeper interface for price feed.
type Params ¶
type Params struct { // Reserves Re-balancing Frequency in seconds, determines how often the re-balancing of the module reserves will be // triggered RebalancingFrequency int64 `protobuf:"varint,1,opt,name=rebalancing_frequency,json=rebalancingFrequency,proto3" json:"rebalancing_frequency,omitempty"` // Interest claiming frequency in seconds, determines how often metoken module will claim accrued interest from // leverage module ClaimingFrequency int64 `protobuf:"varint,2,opt,name=claiming_frequency,json=claimingFrequency,proto3" json:"claiming_frequency,omitempty"` }
Params defines the parameters for the metoken module.
func (*Params) Descriptor ¶
func (*Params) GetClaimingFrequency ¶
func (*Params) GetRebalancingFrequency ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // Params queries the parameters of the x/metoken module. Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Indexes queries for a specific or all the registered indexes. Indexes(ctx context.Context, in *QueryIndexes, opts ...grpc.CallOption) (*QueryIndexesResponse, error) // SwapFee computes fee that would be applied when executing MsgSwap. SwapFee(ctx context.Context, in *QuerySwapFee, opts ...grpc.CallOption) (*QuerySwapFeeResponse, error) // RedeemFee computes a fee that would be applied when executing MsgRedeem. RedeemFee(ctx context.Context, in *QueryRedeemFee, opts ...grpc.CallOption) (*QueryRedeemFeeResponse, error) // IndexBalances queries for Index's balances of a specific or all the registered indexes. IndexBalances(ctx context.Context, in *QueryIndexBalances, opts ...grpc.CallOption) (*QueryIndexBalancesResponse, error) // IndexPrices queries for Index's price of a specific or all the registered indexes. It also includes the // underlying assets prices as well as swap and redeem rates. IndexPrices(ctx context.Context, in *QueryIndexPrices, opts ...grpc.CallOption) (*QueryIndexPricesResponse, 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 QueryIndexBalances ¶
type QueryIndexBalances struct {
MetokenDenom string `protobuf:"bytes,1,opt,name=metoken_denom,json=metokenDenom,proto3" json:"metoken_denom,omitempty"`
}
QueryIndexBalances defines the request structure for the IndexBalances gRPC service handler. metoken_denom param is optional, if it is not informed the query will return all the Indexes.
func (*QueryIndexBalances) Descriptor ¶
func (*QueryIndexBalances) Descriptor() ([]byte, []int)
func (*QueryIndexBalances) Marshal ¶
func (m *QueryIndexBalances) Marshal() (dAtA []byte, err error)
func (*QueryIndexBalances) MarshalTo ¶
func (m *QueryIndexBalances) MarshalTo(dAtA []byte) (int, error)
func (*QueryIndexBalances) MarshalToSizedBuffer ¶
func (m *QueryIndexBalances) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryIndexBalances) ProtoMessage ¶
func (*QueryIndexBalances) ProtoMessage()
func (*QueryIndexBalances) Reset ¶
func (m *QueryIndexBalances) Reset()
func (*QueryIndexBalances) Size ¶
func (m *QueryIndexBalances) Size() (n int)
func (*QueryIndexBalances) String ¶
func (m *QueryIndexBalances) String() string
func (*QueryIndexBalances) Unmarshal ¶
func (m *QueryIndexBalances) Unmarshal(dAtA []byte) error
func (*QueryIndexBalances) XXX_DiscardUnknown ¶
func (m *QueryIndexBalances) XXX_DiscardUnknown()
func (*QueryIndexBalances) XXX_Marshal ¶
func (m *QueryIndexBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryIndexBalances) XXX_Merge ¶
func (m *QueryIndexBalances) XXX_Merge(src proto.Message)
func (*QueryIndexBalances) XXX_Size ¶
func (m *QueryIndexBalances) XXX_Size() int
func (*QueryIndexBalances) XXX_Unmarshal ¶
func (m *QueryIndexBalances) XXX_Unmarshal(b []byte) error
type QueryIndexBalancesResponse ¶
type QueryIndexBalancesResponse struct { IndexBalances []IndexBalances `protobuf:"bytes,1,rep,name=index_balances,json=indexBalances,proto3" json:"index_balances"` Prices []IndexPrices `protobuf:"bytes,2,rep,name=prices,proto3" json:"prices"` }
QueryIndexBalanceResponse defines the response structure for the IndexBalances gRPC service handler.
func (*QueryIndexBalancesResponse) Descriptor ¶
func (*QueryIndexBalancesResponse) Descriptor() ([]byte, []int)
func (*QueryIndexBalancesResponse) Marshal ¶
func (m *QueryIndexBalancesResponse) Marshal() (dAtA []byte, err error)
func (*QueryIndexBalancesResponse) MarshalTo ¶
func (m *QueryIndexBalancesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryIndexBalancesResponse) MarshalToSizedBuffer ¶
func (m *QueryIndexBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryIndexBalancesResponse) ProtoMessage ¶
func (*QueryIndexBalancesResponse) ProtoMessage()
func (*QueryIndexBalancesResponse) Reset ¶
func (m *QueryIndexBalancesResponse) Reset()
func (*QueryIndexBalancesResponse) Size ¶
func (m *QueryIndexBalancesResponse) Size() (n int)
func (*QueryIndexBalancesResponse) String ¶
func (m *QueryIndexBalancesResponse) String() string
func (*QueryIndexBalancesResponse) Unmarshal ¶
func (m *QueryIndexBalancesResponse) Unmarshal(dAtA []byte) error
func (*QueryIndexBalancesResponse) XXX_DiscardUnknown ¶
func (m *QueryIndexBalancesResponse) XXX_DiscardUnknown()
func (*QueryIndexBalancesResponse) XXX_Marshal ¶
func (m *QueryIndexBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryIndexBalancesResponse) XXX_Merge ¶
func (m *QueryIndexBalancesResponse) XXX_Merge(src proto.Message)
func (*QueryIndexBalancesResponse) XXX_Size ¶
func (m *QueryIndexBalancesResponse) XXX_Size() int
func (*QueryIndexBalancesResponse) XXX_Unmarshal ¶
func (m *QueryIndexBalancesResponse) XXX_Unmarshal(b []byte) error
type QueryIndexPrices ¶
type QueryIndexPrices struct {
MetokenDenom string `protobuf:"bytes,1,opt,name=metoken_denom,json=metokenDenom,proto3" json:"metoken_denom,omitempty"`
}
QueryIndexPrices defines the request structure for the IndexPrice gRPC service handler. metoken_denom param is optional, if it is not informed the query will return all the Index's prices.
func (*QueryIndexPrices) Descriptor ¶
func (*QueryIndexPrices) Descriptor() ([]byte, []int)
func (*QueryIndexPrices) Marshal ¶
func (m *QueryIndexPrices) Marshal() (dAtA []byte, err error)
func (*QueryIndexPrices) MarshalToSizedBuffer ¶
func (m *QueryIndexPrices) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryIndexPrices) ProtoMessage ¶
func (*QueryIndexPrices) ProtoMessage()
func (*QueryIndexPrices) Reset ¶
func (m *QueryIndexPrices) Reset()
func (*QueryIndexPrices) Size ¶
func (m *QueryIndexPrices) Size() (n int)
func (*QueryIndexPrices) String ¶
func (m *QueryIndexPrices) String() string
func (*QueryIndexPrices) Unmarshal ¶
func (m *QueryIndexPrices) Unmarshal(dAtA []byte) error
func (*QueryIndexPrices) XXX_DiscardUnknown ¶
func (m *QueryIndexPrices) XXX_DiscardUnknown()
func (*QueryIndexPrices) XXX_Marshal ¶
func (m *QueryIndexPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryIndexPrices) XXX_Merge ¶
func (m *QueryIndexPrices) XXX_Merge(src proto.Message)
func (*QueryIndexPrices) XXX_Size ¶
func (m *QueryIndexPrices) XXX_Size() int
func (*QueryIndexPrices) XXX_Unmarshal ¶
func (m *QueryIndexPrices) XXX_Unmarshal(b []byte) error
type QueryIndexPricesResponse ¶
type QueryIndexPricesResponse struct {
Prices []IndexPrices `protobuf:"bytes,1,rep,name=prices,proto3" json:"prices"`
}
QueryIndexPriceResponses defines the response structure for the IndexPrice gRPC service handler.
func (*QueryIndexPricesResponse) Descriptor ¶
func (*QueryIndexPricesResponse) Descriptor() ([]byte, []int)
func (*QueryIndexPricesResponse) Marshal ¶
func (m *QueryIndexPricesResponse) Marshal() (dAtA []byte, err error)
func (*QueryIndexPricesResponse) MarshalTo ¶
func (m *QueryIndexPricesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryIndexPricesResponse) MarshalToSizedBuffer ¶
func (m *QueryIndexPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryIndexPricesResponse) ProtoMessage ¶
func (*QueryIndexPricesResponse) ProtoMessage()
func (*QueryIndexPricesResponse) Reset ¶
func (m *QueryIndexPricesResponse) Reset()
func (*QueryIndexPricesResponse) Size ¶
func (m *QueryIndexPricesResponse) Size() (n int)
func (*QueryIndexPricesResponse) String ¶
func (m *QueryIndexPricesResponse) String() string
func (*QueryIndexPricesResponse) Unmarshal ¶
func (m *QueryIndexPricesResponse) Unmarshal(dAtA []byte) error
func (*QueryIndexPricesResponse) XXX_DiscardUnknown ¶
func (m *QueryIndexPricesResponse) XXX_DiscardUnknown()
func (*QueryIndexPricesResponse) XXX_Marshal ¶
func (m *QueryIndexPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryIndexPricesResponse) XXX_Merge ¶
func (m *QueryIndexPricesResponse) XXX_Merge(src proto.Message)
func (*QueryIndexPricesResponse) XXX_Size ¶
func (m *QueryIndexPricesResponse) XXX_Size() int
func (*QueryIndexPricesResponse) XXX_Unmarshal ¶
func (m *QueryIndexPricesResponse) XXX_Unmarshal(b []byte) error
type QueryIndexes ¶
type QueryIndexes struct {
MetokenDenom string `protobuf:"bytes,1,opt,name=metoken_denom,json=metokenDenom,proto3" json:"metoken_denom,omitempty"`
}
QueryIndexes defines the request structure for the Indexes gRPC service handler. metoken_denom param is optional, if it is not informed the query will return all the Indexes.
func (*QueryIndexes) Descriptor ¶
func (*QueryIndexes) Descriptor() ([]byte, []int)
func (*QueryIndexes) Marshal ¶
func (m *QueryIndexes) Marshal() (dAtA []byte, err error)
func (*QueryIndexes) MarshalToSizedBuffer ¶
func (m *QueryIndexes) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryIndexes) ProtoMessage ¶
func (*QueryIndexes) ProtoMessage()
func (*QueryIndexes) Reset ¶
func (m *QueryIndexes) Reset()
func (*QueryIndexes) Size ¶
func (m *QueryIndexes) Size() (n int)
func (*QueryIndexes) String ¶
func (m *QueryIndexes) String() string
func (*QueryIndexes) Unmarshal ¶
func (m *QueryIndexes) Unmarshal(dAtA []byte) error
func (*QueryIndexes) XXX_DiscardUnknown ¶
func (m *QueryIndexes) XXX_DiscardUnknown()
func (*QueryIndexes) XXX_Marshal ¶
func (m *QueryIndexes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryIndexes) XXX_Merge ¶
func (m *QueryIndexes) XXX_Merge(src proto.Message)
func (*QueryIndexes) XXX_Size ¶
func (m *QueryIndexes) XXX_Size() int
func (*QueryIndexes) XXX_Unmarshal ¶
func (m *QueryIndexes) XXX_Unmarshal(b []byte) error
type QueryIndexesResponse ¶
type QueryIndexesResponse struct {
Registry []Index `protobuf:"bytes,1,rep,name=registry,proto3" json:"registry"`
}
QueryIndexesResponse defines the response structure for the Indexes gRPC service handler.
func (*QueryIndexesResponse) Descriptor ¶
func (*QueryIndexesResponse) Descriptor() ([]byte, []int)
func (*QueryIndexesResponse) Marshal ¶
func (m *QueryIndexesResponse) Marshal() (dAtA []byte, err error)
func (*QueryIndexesResponse) MarshalTo ¶
func (m *QueryIndexesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryIndexesResponse) MarshalToSizedBuffer ¶
func (m *QueryIndexesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryIndexesResponse) ProtoMessage ¶
func (*QueryIndexesResponse) ProtoMessage()
func (*QueryIndexesResponse) Reset ¶
func (m *QueryIndexesResponse) Reset()
func (*QueryIndexesResponse) Size ¶
func (m *QueryIndexesResponse) Size() (n int)
func (*QueryIndexesResponse) String ¶
func (m *QueryIndexesResponse) String() string
func (*QueryIndexesResponse) Unmarshal ¶
func (m *QueryIndexesResponse) Unmarshal(dAtA []byte) error
func (*QueryIndexesResponse) XXX_DiscardUnknown ¶
func (m *QueryIndexesResponse) XXX_DiscardUnknown()
func (*QueryIndexesResponse) XXX_Marshal ¶
func (m *QueryIndexesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryIndexesResponse) XXX_Merge ¶
func (m *QueryIndexesResponse) XXX_Merge(src proto.Message)
func (*QueryIndexesResponse) XXX_Size ¶
func (m *QueryIndexesResponse) XXX_Size() int
func (*QueryIndexesResponse) XXX_Unmarshal ¶
func (m *QueryIndexesResponse) XXX_Unmarshal(b []byte) error
type QueryParams ¶
type QueryParams struct { }
QueryParams defines the request structure for the Params gRPC service handler.
func (*QueryParams) Descriptor ¶
func (*QueryParams) Descriptor() ([]byte, []int)
func (*QueryParams) Marshal ¶
func (m *QueryParams) Marshal() (dAtA []byte, err error)
func (*QueryParams) MarshalToSizedBuffer ¶
func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParams) ProtoMessage ¶
func (*QueryParams) ProtoMessage()
func (*QueryParams) Reset ¶
func (m *QueryParams) Reset()
func (*QueryParams) Size ¶
func (m *QueryParams) Size() (n int)
func (*QueryParams) String ¶
func (m *QueryParams) String() string
func (*QueryParams) Unmarshal ¶
func (m *QueryParams) Unmarshal(dAtA []byte) error
func (*QueryParams) XXX_DiscardUnknown ¶
func (m *QueryParams) XXX_DiscardUnknown()
func (*QueryParams) XXX_Marshal ¶
func (m *QueryParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParams) XXX_Merge ¶
func (m *QueryParams) XXX_Merge(src proto.Message)
func (*QueryParams) XXX_Size ¶
func (m *QueryParams) XXX_Size() int
func (*QueryParams) XXX_Unmarshal ¶
func (m *QueryParams) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse defines the response structure for the Params gRPC service handler.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
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 QueryRedeemFee ¶
type QueryRedeemFee struct { Metoken string `protobuf:"bytes,1,opt,name=metoken,proto3" json:"metoken,omitempty"` AssetDenom string `protobuf:"bytes,2,opt,name=asset_denom,json=assetDenom,proto3" json:"asset_denom,omitempty"` }
QueryRedeemFee defines the request structure for the RedeemFee gRPC service handler.
func (*QueryRedeemFee) Descriptor ¶
func (*QueryRedeemFee) Descriptor() ([]byte, []int)
func (*QueryRedeemFee) Marshal ¶
func (m *QueryRedeemFee) Marshal() (dAtA []byte, err error)
func (*QueryRedeemFee) MarshalToSizedBuffer ¶
func (m *QueryRedeemFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRedeemFee) ProtoMessage ¶
func (*QueryRedeemFee) ProtoMessage()
func (*QueryRedeemFee) Reset ¶
func (m *QueryRedeemFee) Reset()
func (*QueryRedeemFee) Size ¶
func (m *QueryRedeemFee) Size() (n int)
func (*QueryRedeemFee) String ¶
func (m *QueryRedeemFee) String() string
func (*QueryRedeemFee) Unmarshal ¶
func (m *QueryRedeemFee) Unmarshal(dAtA []byte) error
func (*QueryRedeemFee) XXX_DiscardUnknown ¶
func (m *QueryRedeemFee) XXX_DiscardUnknown()
func (*QueryRedeemFee) XXX_Marshal ¶
func (m *QueryRedeemFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRedeemFee) XXX_Merge ¶
func (m *QueryRedeemFee) XXX_Merge(src proto.Message)
func (*QueryRedeemFee) XXX_Size ¶
func (m *QueryRedeemFee) XXX_Size() int
func (*QueryRedeemFee) XXX_Unmarshal ¶
func (m *QueryRedeemFee) XXX_Unmarshal(b []byte) error
type QueryRedeemFeeResponse ¶
type QueryRedeemFeeResponse struct {
Asset types.Coin `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset"`
}
QueryRedeemFeeResponse defines the response structure for the RedeemFee gRPC service handler.
func (*QueryRedeemFeeResponse) Descriptor ¶
func (*QueryRedeemFeeResponse) Descriptor() ([]byte, []int)
func (*QueryRedeemFeeResponse) Marshal ¶
func (m *QueryRedeemFeeResponse) Marshal() (dAtA []byte, err error)
func (*QueryRedeemFeeResponse) MarshalTo ¶
func (m *QueryRedeemFeeResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryRedeemFeeResponse) MarshalToSizedBuffer ¶
func (m *QueryRedeemFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRedeemFeeResponse) ProtoMessage ¶
func (*QueryRedeemFeeResponse) ProtoMessage()
func (*QueryRedeemFeeResponse) Reset ¶
func (m *QueryRedeemFeeResponse) Reset()
func (*QueryRedeemFeeResponse) Size ¶
func (m *QueryRedeemFeeResponse) Size() (n int)
func (*QueryRedeemFeeResponse) String ¶
func (m *QueryRedeemFeeResponse) String() string
func (*QueryRedeemFeeResponse) Unmarshal ¶
func (m *QueryRedeemFeeResponse) Unmarshal(dAtA []byte) error
func (*QueryRedeemFeeResponse) XXX_DiscardUnknown ¶
func (m *QueryRedeemFeeResponse) XXX_DiscardUnknown()
func (*QueryRedeemFeeResponse) XXX_Marshal ¶
func (m *QueryRedeemFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRedeemFeeResponse) XXX_Merge ¶
func (m *QueryRedeemFeeResponse) XXX_Merge(src proto.Message)
func (*QueryRedeemFeeResponse) XXX_Size ¶
func (m *QueryRedeemFeeResponse) XXX_Size() int
func (*QueryRedeemFeeResponse) XXX_Unmarshal ¶
func (m *QueryRedeemFeeResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries the parameters of the x/metoken module. Params(context.Context, *QueryParams) (*QueryParamsResponse, error) // Indexes queries for a specific or all the registered indexes. Indexes(context.Context, *QueryIndexes) (*QueryIndexesResponse, error) // SwapFee computes fee that would be applied when executing MsgSwap. SwapFee(context.Context, *QuerySwapFee) (*QuerySwapFeeResponse, error) // RedeemFee computes a fee that would be applied when executing MsgRedeem. RedeemFee(context.Context, *QueryRedeemFee) (*QueryRedeemFeeResponse, error) // IndexBalances queries for Index's balances of a specific or all the registered indexes. IndexBalances(context.Context, *QueryIndexBalances) (*QueryIndexBalancesResponse, error) // IndexPrices queries for Index's price of a specific or all the registered indexes. It also includes the // underlying assets prices as well as swap and redeem rates. IndexPrices(context.Context, *QueryIndexPrices) (*QueryIndexPricesResponse, error) }
QueryServer is the server API for Query service.
type QuerySwapFee ¶
type QuerySwapFee struct { Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` MetokenDenom string `protobuf:"bytes,2,opt,name=metoken_denom,json=metokenDenom,proto3" json:"metoken_denom,omitempty"` }
QuerySwapFee defines the request structure for the SwapFee gRPC service handler.
func (*QuerySwapFee) Descriptor ¶
func (*QuerySwapFee) Descriptor() ([]byte, []int)
func (*QuerySwapFee) Marshal ¶
func (m *QuerySwapFee) Marshal() (dAtA []byte, err error)
func (*QuerySwapFee) MarshalToSizedBuffer ¶
func (m *QuerySwapFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySwapFee) ProtoMessage ¶
func (*QuerySwapFee) ProtoMessage()
func (*QuerySwapFee) Reset ¶
func (m *QuerySwapFee) Reset()
func (*QuerySwapFee) Size ¶
func (m *QuerySwapFee) Size() (n int)
func (*QuerySwapFee) String ¶
func (m *QuerySwapFee) String() string
func (*QuerySwapFee) Unmarshal ¶
func (m *QuerySwapFee) Unmarshal(dAtA []byte) error
func (*QuerySwapFee) XXX_DiscardUnknown ¶
func (m *QuerySwapFee) XXX_DiscardUnknown()
func (*QuerySwapFee) XXX_Marshal ¶
func (m *QuerySwapFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySwapFee) XXX_Merge ¶
func (m *QuerySwapFee) XXX_Merge(src proto.Message)
func (*QuerySwapFee) XXX_Size ¶
func (m *QuerySwapFee) XXX_Size() int
func (*QuerySwapFee) XXX_Unmarshal ¶
func (m *QuerySwapFee) XXX_Unmarshal(b []byte) error
type QuerySwapFeeResponse ¶
type QuerySwapFeeResponse struct {
Asset types.Coin `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset"`
}
QuerySwapFeeResponse defines the response structure for the SwapFee gRPC service handler.
func (*QuerySwapFeeResponse) Descriptor ¶
func (*QuerySwapFeeResponse) Descriptor() ([]byte, []int)
func (*QuerySwapFeeResponse) Marshal ¶
func (m *QuerySwapFeeResponse) Marshal() (dAtA []byte, err error)
func (*QuerySwapFeeResponse) MarshalTo ¶
func (m *QuerySwapFeeResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySwapFeeResponse) MarshalToSizedBuffer ¶
func (m *QuerySwapFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySwapFeeResponse) ProtoMessage ¶
func (*QuerySwapFeeResponse) ProtoMessage()
func (*QuerySwapFeeResponse) Reset ¶
func (m *QuerySwapFeeResponse) Reset()
func (*QuerySwapFeeResponse) Size ¶
func (m *QuerySwapFeeResponse) Size() (n int)
func (*QuerySwapFeeResponse) String ¶
func (m *QuerySwapFeeResponse) String() string
func (*QuerySwapFeeResponse) Unmarshal ¶
func (m *QuerySwapFeeResponse) Unmarshal(dAtA []byte) error
func (*QuerySwapFeeResponse) XXX_DiscardUnknown ¶
func (m *QuerySwapFeeResponse) XXX_DiscardUnknown()
func (*QuerySwapFeeResponse) XXX_Marshal ¶
func (m *QuerySwapFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySwapFeeResponse) XXX_Merge ¶
func (m *QuerySwapFeeResponse) XXX_Merge(src proto.Message)
func (*QuerySwapFeeResponse) XXX_Size ¶
func (m *QuerySwapFeeResponse) XXX_Size() int
func (*QuerySwapFeeResponse) XXX_Unmarshal ¶
func (m *QuerySwapFeeResponse) XXX_Unmarshal(b []byte) error
type RebalancingResult ¶
type RebalancingResult struct { MetokenDenom string `protobuf:"bytes,1,opt,name=metoken_denom,json=metokenDenom,proto3" json:"metoken_denom,omitempty"` //Initial balance of an asset in the Index before re-balancing. InitialBalance []types.Coin `protobuf:"bytes,2,rep,name=initial_balance,json=initialBalance,proto3" json:"initial_balance"` // Result balance of an asset in the Index after re-balancing. ResultBalance []types.Coin `protobuf:"bytes,3,rep,name=result_balance,json=resultBalance,proto3" json:"result_balance"` }
RebalancingResult of a specific Index with initial and result balances of underlying assets.
func (*RebalancingResult) Descriptor ¶
func (*RebalancingResult) Descriptor() ([]byte, []int)
func (*RebalancingResult) Marshal ¶
func (m *RebalancingResult) Marshal() (dAtA []byte, err error)
func (*RebalancingResult) MarshalTo ¶
func (m *RebalancingResult) MarshalTo(dAtA []byte) (int, error)
func (*RebalancingResult) MarshalToSizedBuffer ¶
func (m *RebalancingResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RebalancingResult) ProtoMessage ¶
func (*RebalancingResult) ProtoMessage()
func (*RebalancingResult) Reset ¶
func (m *RebalancingResult) Reset()
func (*RebalancingResult) Size ¶
func (m *RebalancingResult) Size() (n int)
func (*RebalancingResult) String ¶
func (m *RebalancingResult) String() string
func (*RebalancingResult) Unmarshal ¶
func (m *RebalancingResult) Unmarshal(dAtA []byte) error
func (*RebalancingResult) XXX_DiscardUnknown ¶
func (m *RebalancingResult) XXX_DiscardUnknown()
func (*RebalancingResult) XXX_Marshal ¶
func (m *RebalancingResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RebalancingResult) XXX_Merge ¶
func (m *RebalancingResult) XXX_Merge(src proto.Message)
func (*RebalancingResult) XXX_Size ¶
func (m *RebalancingResult) XXX_Size() int
func (*RebalancingResult) XXX_Unmarshal ¶
func (m *RebalancingResult) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) GovSetParams ¶
func (*UnimplementedMsgServer) GovSetParams(ctx context.Context, req *MsgGovSetParams) (*MsgGovSetParamsResponse, error)
func (*UnimplementedMsgServer) GovUpdateRegistry ¶
func (*UnimplementedMsgServer) GovUpdateRegistry(ctx context.Context, req *MsgGovUpdateRegistry) (*MsgGovUpdateRegistryResponse, error)
func (*UnimplementedMsgServer) Redeem ¶
func (*UnimplementedMsgServer) Redeem(ctx context.Context, req *MsgRedeem) (*MsgRedeemResponse, error)
func (*UnimplementedMsgServer) Swap ¶
func (*UnimplementedMsgServer) Swap(ctx context.Context, req *MsgSwap) (*MsgSwapResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) IndexBalances ¶
func (*UnimplementedQueryServer) IndexBalances(ctx context.Context, req *QueryIndexBalances) (*QueryIndexBalancesResponse, error)
func (*UnimplementedQueryServer) IndexPrices ¶
func (*UnimplementedQueryServer) IndexPrices(ctx context.Context, req *QueryIndexPrices) (*QueryIndexPricesResponse, error)
func (*UnimplementedQueryServer) Indexes ¶
func (*UnimplementedQueryServer) Indexes(ctx context.Context, req *QueryIndexes) (*QueryIndexesResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) RedeemFee ¶
func (*UnimplementedQueryServer) RedeemFee(ctx context.Context, req *QueryRedeemFee) (*QueryRedeemFeeResponse, error)
func (*UnimplementedQueryServer) SwapFee ¶
func (*UnimplementedQueryServer) SwapFee(ctx context.Context, req *QuerySwapFee) (*QuerySwapFeeResponse, error)