Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func DepositorPoolSharesKey(depositor sdk.AccAddress, poolID string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func PoolID(denomA string, denomB string) string
- func PoolIDFromCoins(coins sdk.Coins) string
- func PoolKey(poolID string) []byte
- func RegisterInterfaces(registry types.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 AccountKeeper
- type AllowedPool
- func (*AllowedPool) Descriptor() ([]byte, []int)
- func (m *AllowedPool) GetTokenA() string
- func (m *AllowedPool) GetTokenB() string
- func (m *AllowedPool) Marshal() (dAtA []byte, err error)
- func (m *AllowedPool) MarshalTo(dAtA []byte) (int, error)
- func (m *AllowedPool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p AllowedPool) Name() string
- func (*AllowedPool) ProtoMessage()
- func (m *AllowedPool) Reset()
- func (m *AllowedPool) Size() (n int)
- func (p AllowedPool) String() string
- func (m *AllowedPool) Unmarshal(dAtA []byte) error
- func (p AllowedPool) Validate() error
- func (m *AllowedPool) XXX_DiscardUnknown()
- func (m *AllowedPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllowedPool) XXX_Merge(src proto.Message)
- func (m *AllowedPool) XXX_Size() int
- func (m *AllowedPool) XXX_Unmarshal(b []byte) error
- type AllowedPools
- type BankKeeper
- type BasePool
- func (p *BasePool) AddLiquidity(desiredA sdkmath.Int, desiredB sdkmath.Int) (sdkmath.Int, sdkmath.Int, sdkmath.Int)
- func (p *BasePool) IsEmpty() bool
- func (p *BasePool) RemoveLiquidity(shares sdkmath.Int) (sdkmath.Int, sdkmath.Int)
- func (p *BasePool) ReservesA() sdkmath.Int
- func (p *BasePool) ReservesB() sdkmath.Int
- func (p *BasePool) ShareValue(shares sdkmath.Int) (sdkmath.Int, sdkmath.Int)
- func (p *BasePool) SwapAForExactB(b sdkmath.Int, fee sdk.Dec) (sdkmath.Int, sdkmath.Int)
- func (p *BasePool) SwapBForExactA(a sdkmath.Int, fee sdk.Dec) (sdkmath.Int, sdkmath.Int)
- func (p *BasePool) SwapExactAForB(a sdkmath.Int, fee sdk.Dec) (sdkmath.Int, sdkmath.Int)
- func (p *BasePool) SwapExactBForA(b sdkmath.Int, fee sdk.Dec) (sdkmath.Int, sdkmath.Int)
- func (p *BasePool) TotalShares() sdkmath.Int
- type DenominatedPool
- func (p *DenominatedPool) AddLiquidity(deposit sdk.Coins) (sdk.Coins, sdkmath.Int)
- func (p *DenominatedPool) IsEmpty() bool
- func (p *DenominatedPool) RemoveLiquidity(shares sdkmath.Int) sdk.Coins
- func (p *DenominatedPool) Reserves() sdk.Coins
- func (p *DenominatedPool) ShareValue(shares sdkmath.Int) sdk.Coins
- func (p *DenominatedPool) SwapWithExactInput(swapInput sdk.Coin, fee sdk.Dec) (sdk.Coin, sdk.Coin)
- func (p *DenominatedPool) SwapWithExactOutput(swapOutput sdk.Coin, fee sdk.Dec) (sdk.Coin, sdk.Coin)
- func (p *DenominatedPool) TotalShares() sdkmath.Int
- type DepositResponse
- func (*DepositResponse) Descriptor() ([]byte, []int)
- func (m *DepositResponse) Marshal() (dAtA []byte, err error)
- func (m *DepositResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *DepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DepositResponse) ProtoMessage()
- func (m *DepositResponse) Reset()
- func (m *DepositResponse) Size() (n int)
- func (m *DepositResponse) String() string
- func (m *DepositResponse) Unmarshal(dAtA []byte) error
- func (m *DepositResponse) XXX_DiscardUnknown()
- func (m *DepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DepositResponse) XXX_Merge(src proto.Message)
- func (m *DepositResponse) XXX_Size() int
- func (m *DepositResponse) XXX_Unmarshal(b []byte) error
- type DepositsQueryResult
- type DepositsQueryResults
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPoolRecords() PoolRecords
- func (m *GenesisState) GetShareRecords() ShareRecords
- 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 MsgClient
- type MsgDeposit
- func (msg MsgDeposit) DeadlineExceeded(blockTime time.Time) bool
- func (*MsgDeposit) Descriptor() ([]byte, []int)
- func (msg MsgDeposit) GetDeadline() time.Time
- func (msg MsgDeposit) GetSignBytes() []byte
- func (msg MsgDeposit) GetSigners() []sdk.AccAddress
- func (m *MsgDeposit) Marshal() (dAtA []byte, err error)
- func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDeposit) ProtoMessage()
- func (m *MsgDeposit) Reset()
- func (msg MsgDeposit) Route() string
- func (m *MsgDeposit) Size() (n int)
- func (m *MsgDeposit) String() string
- func (msg MsgDeposit) Type() string
- func (m *MsgDeposit) Unmarshal(dAtA []byte) error
- func (msg MsgDeposit) ValidateBasic() error
- func (m *MsgDeposit) XXX_DiscardUnknown()
- func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDeposit) XXX_Merge(src proto.Message)
- func (m *MsgDeposit) XXX_Size() int
- func (m *MsgDeposit) XXX_Unmarshal(b []byte) error
- type MsgDepositResponse
- func (*MsgDepositResponse) Descriptor() ([]byte, []int)
- func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDepositResponse) ProtoMessage()
- func (m *MsgDepositResponse) Reset()
- func (m *MsgDepositResponse) Size() (n int)
- func (m *MsgDepositResponse) String() string
- func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDepositResponse) XXX_DiscardUnknown()
- func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDepositResponse) XXX_Merge(src proto.Message)
- func (m *MsgDepositResponse) XXX_Size() int
- func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgSwapExactForTokens
- func (msg MsgSwapExactForTokens) DeadlineExceeded(blockTime time.Time) bool
- func (*MsgSwapExactForTokens) Descriptor() ([]byte, []int)
- func (msg MsgSwapExactForTokens) GetDeadline() time.Time
- func (msg MsgSwapExactForTokens) GetSignBytes() []byte
- func (msg MsgSwapExactForTokens) GetSigners() []sdk.AccAddress
- func (m *MsgSwapExactForTokens) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapExactForTokens) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapExactForTokens) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapExactForTokens) ProtoMessage()
- func (m *MsgSwapExactForTokens) Reset()
- func (msg MsgSwapExactForTokens) Route() string
- func (m *MsgSwapExactForTokens) Size() (n int)
- func (m *MsgSwapExactForTokens) String() string
- func (msg MsgSwapExactForTokens) Type() string
- func (m *MsgSwapExactForTokens) Unmarshal(dAtA []byte) error
- func (msg MsgSwapExactForTokens) ValidateBasic() error
- func (m *MsgSwapExactForTokens) XXX_DiscardUnknown()
- func (m *MsgSwapExactForTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapExactForTokens) XXX_Merge(src proto.Message)
- func (m *MsgSwapExactForTokens) XXX_Size() int
- func (m *MsgSwapExactForTokens) XXX_Unmarshal(b []byte) error
- type MsgSwapExactForTokensResponse
- func (*MsgSwapExactForTokensResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapExactForTokensResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapExactForTokensResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapExactForTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapExactForTokensResponse) ProtoMessage()
- func (m *MsgSwapExactForTokensResponse) Reset()
- func (m *MsgSwapExactForTokensResponse) Size() (n int)
- func (m *MsgSwapExactForTokensResponse) String() string
- func (m *MsgSwapExactForTokensResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapExactForTokensResponse) XXX_DiscardUnknown()
- func (m *MsgSwapExactForTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapExactForTokensResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapExactForTokensResponse) XXX_Size() int
- func (m *MsgSwapExactForTokensResponse) XXX_Unmarshal(b []byte) error
- type MsgSwapForExactTokens
- func (msg MsgSwapForExactTokens) DeadlineExceeded(blockTime time.Time) bool
- func (*MsgSwapForExactTokens) Descriptor() ([]byte, []int)
- func (msg MsgSwapForExactTokens) GetDeadline() time.Time
- func (msg MsgSwapForExactTokens) GetSignBytes() []byte
- func (msg MsgSwapForExactTokens) GetSigners() []sdk.AccAddress
- func (m *MsgSwapForExactTokens) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapForExactTokens) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapForExactTokens) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapForExactTokens) ProtoMessage()
- func (m *MsgSwapForExactTokens) Reset()
- func (msg MsgSwapForExactTokens) Route() string
- func (m *MsgSwapForExactTokens) Size() (n int)
- func (m *MsgSwapForExactTokens) String() string
- func (msg MsgSwapForExactTokens) Type() string
- func (m *MsgSwapForExactTokens) Unmarshal(dAtA []byte) error
- func (msg MsgSwapForExactTokens) ValidateBasic() error
- func (m *MsgSwapForExactTokens) XXX_DiscardUnknown()
- func (m *MsgSwapForExactTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapForExactTokens) XXX_Merge(src proto.Message)
- func (m *MsgSwapForExactTokens) XXX_Size() int
- func (m *MsgSwapForExactTokens) XXX_Unmarshal(b []byte) error
- type MsgSwapForExactTokensResponse
- func (*MsgSwapForExactTokensResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapForExactTokensResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapForExactTokensResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapForExactTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapForExactTokensResponse) ProtoMessage()
- func (m *MsgSwapForExactTokensResponse) Reset()
- func (m *MsgSwapForExactTokensResponse) Size() (n int)
- func (m *MsgSwapForExactTokensResponse) String() string
- func (m *MsgSwapForExactTokensResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapForExactTokensResponse) XXX_DiscardUnknown()
- func (m *MsgSwapForExactTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapForExactTokensResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapForExactTokensResponse) XXX_Size() int
- func (m *MsgSwapForExactTokensResponse) XXX_Unmarshal(b []byte) error
- type MsgWithDeadline
- type MsgWithdraw
- func (msg MsgWithdraw) DeadlineExceeded(blockTime time.Time) bool
- func (*MsgWithdraw) Descriptor() ([]byte, []int)
- func (msg MsgWithdraw) GetDeadline() time.Time
- func (msg MsgWithdraw) GetSignBytes() []byte
- func (msg MsgWithdraw) GetSigners() []sdk.AccAddress
- func (m *MsgWithdraw) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdraw) ProtoMessage()
- func (m *MsgWithdraw) Reset()
- func (msg MsgWithdraw) Route() string
- func (m *MsgWithdraw) Size() (n int)
- func (m *MsgWithdraw) String() string
- func (msg MsgWithdraw) Type() string
- func (m *MsgWithdraw) Unmarshal(dAtA []byte) error
- func (msg MsgWithdraw) ValidateBasic() error
- func (m *MsgWithdraw) XXX_DiscardUnknown()
- func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdraw) XXX_Merge(src proto.Message)
- func (m *MsgWithdraw) XXX_Size() int
- func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error
- type MsgWithdrawResponse
- func (*MsgWithdrawResponse) Descriptor() ([]byte, []int)
- func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdrawResponse) ProtoMessage()
- func (m *MsgWithdrawResponse) Reset()
- func (m *MsgWithdrawResponse) Size() (n int)
- func (m *MsgWithdrawResponse) String() string
- func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error
- func (m *MsgWithdrawResponse) XXX_DiscardUnknown()
- func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message)
- func (m *MsgWithdrawResponse) XXX_Size() int
- func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetAllowedPools() AllowedPools
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PoolRecord
- func (*PoolRecord) Descriptor() ([]byte, []int)
- func (m *PoolRecord) GetPoolID() string
- func (m *PoolRecord) GetReservesA() types.Coin
- func (m *PoolRecord) GetReservesB() types.Coin
- func (m *PoolRecord) Marshal() (dAtA []byte, err error)
- func (m *PoolRecord) MarshalTo(dAtA []byte) (int, error)
- func (m *PoolRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PoolRecord) ProtoMessage()
- func (p PoolRecord) Reserves() sdk.Coins
- func (m *PoolRecord) Reset()
- func (m *PoolRecord) Size() (n int)
- func (m *PoolRecord) String() string
- func (m *PoolRecord) Unmarshal(dAtA []byte) error
- func (p PoolRecord) Validate() error
- func (m *PoolRecord) XXX_DiscardUnknown()
- func (m *PoolRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PoolRecord) XXX_Merge(src proto.Message)
- func (m *PoolRecord) XXX_Size() int
- func (m *PoolRecord) XXX_Unmarshal(b []byte) error
- type PoolRecords
- type PoolResponse
- func (*PoolResponse) Descriptor() ([]byte, []int)
- func (m *PoolResponse) Marshal() (dAtA []byte, err error)
- func (m *PoolResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *PoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PoolResponse) ProtoMessage()
- func (m *PoolResponse) Reset()
- func (m *PoolResponse) Size() (n int)
- func (m *PoolResponse) String() string
- func (m *PoolResponse) Unmarshal(dAtA []byte) error
- func (m *PoolResponse) XXX_DiscardUnknown()
- func (m *PoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PoolResponse) XXX_Merge(src proto.Message)
- func (m *PoolResponse) XXX_Size() int
- func (m *PoolResponse) XXX_Unmarshal(b []byte) error
- type PoolStatsQueryResult
- type PoolStatsQueryResults
- type QueryClient
- type QueryDepositsParams
- type QueryDepositsRequest
- func (*QueryDepositsRequest) Descriptor() ([]byte, []int)
- func (m *QueryDepositsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryDepositsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryDepositsRequest) ProtoMessage()
- func (m *QueryDepositsRequest) Reset()
- func (m *QueryDepositsRequest) Size() (n int)
- func (m *QueryDepositsRequest) String() string
- func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryDepositsRequest) XXX_DiscardUnknown()
- func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryDepositsRequest) XXX_Merge(src proto.Message)
- func (m *QueryDepositsRequest) XXX_Size() int
- func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error
- type QueryDepositsResponse
- func (*QueryDepositsResponse) Descriptor() ([]byte, []int)
- func (m *QueryDepositsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryDepositsResponse) ProtoMessage()
- func (m *QueryDepositsResponse) Reset()
- func (m *QueryDepositsResponse) Size() (n int)
- func (m *QueryDepositsResponse) String() string
- func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryDepositsResponse) XXX_DiscardUnknown()
- func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryDepositsResponse) XXX_Merge(src proto.Message)
- func (m *QueryDepositsResponse) XXX_Size() int
- func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) 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 QueryPoolParams
- type QueryPoolsRequest
- func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
- func (m *QueryPoolsRequest) GetPagination() *query.PageRequest
- func (m *QueryPoolsRequest) GetPoolId() string
- func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolsRequest) ProtoMessage()
- func (m *QueryPoolsRequest) Reset()
- func (m *QueryPoolsRequest) Size() (n int)
- func (m *QueryPoolsRequest) String() string
- func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPoolsRequest) XXX_DiscardUnknown()
- func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
- func (m *QueryPoolsRequest) XXX_Size() int
- func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
- type QueryPoolsResponse
- func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
- func (m *QueryPoolsResponse) GetPagination() *query.PageResponse
- func (m *QueryPoolsResponse) GetPools() []PoolResponse
- func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPoolsResponse) ProtoMessage()
- func (m *QueryPoolsResponse) Reset()
- func (m *QueryPoolsResponse) Size() (n int)
- func (m *QueryPoolsResponse) String() string
- func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPoolsResponse) XXX_DiscardUnknown()
- func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
- func (m *QueryPoolsResponse) XXX_Size() int
- func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type ShareRecord
- func (*ShareRecord) Descriptor() ([]byte, []int)
- func (m *ShareRecord) GetDepositor() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (m *ShareRecord) GetPoolID() string
- func (m *ShareRecord) Marshal() (dAtA []byte, err error)
- func (m *ShareRecord) MarshalTo(dAtA []byte) (int, error)
- func (m *ShareRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ShareRecord) ProtoMessage()
- func (m *ShareRecord) Reset()
- func (m *ShareRecord) Size() (n int)
- func (m *ShareRecord) String() string
- func (m *ShareRecord) Unmarshal(dAtA []byte) error
- func (sr ShareRecord) Validate() error
- func (m *ShareRecord) XXX_DiscardUnknown()
- func (m *ShareRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShareRecord) XXX_Merge(src proto.Message)
- func (m *ShareRecord) XXX_Size() int
- func (m *ShareRecord) XXX_Unmarshal(b []byte) error
- type ShareRecords
- type SwapHooks
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error)
- func (*UnimplementedMsgServer) SwapExactForTokens(ctx context.Context, req *MsgSwapExactForTokens) (*MsgSwapExactForTokensResponse, error)
- func (*UnimplementedMsgServer) SwapForExactTokens(ctx context.Context, req *MsgSwapForExactTokens) (*MsgSwapForExactTokensResponse, error)
- func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDepositsRequest) (*QueryDepositsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)
Constants ¶
const ( AttributeValueCategory = ModuleName EventTypeSwapDeposit = "swap_deposit" EventTypeSwapWithdraw = "swap_withdraw" EventTypeSwapTrade = "swap_trade" AttributeKeyPoolID = "pool_id" AttributeKeyDepositor = "depositor" AttributeKeyOwner = "owner" AttributeKeyRequester = "requester" AttributeKeySwapInput = "input" AttributeKeySwapOutput = "output" AttributeKeyFeePaid = "fee" AttributeKeyExactDirection = "exact" )
Event types for swap module
const ( // ModuleName name that will be used throughout the module ModuleName = "swap" // ModuleAccountName name of module account used to hold liquidity ModuleAccountName = "swap" // StoreKey Top level store key where all module items will be stored StoreKey = ModuleName // RouterKey Top level router key RouterKey = ModuleName // QuerierRoute Top level query string QuerierRoute = ModuleName // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName )
const ( // TypeMsgDeposit represents the type string for MsgDeposit TypeMsgDeposit = "swap_deposit" // TypeMsgWithdraw represents the type string for MsgWithdraw TypeMsgWithdraw = "swap_withdraw" // TypeSwapExactForTokens represents the type string for MsgSwapExactForTokens TypeSwapExactForTokens = "swap_exact_for_tokens" // TypeSwapForExactTokens represents the type string for MsgSwapForExactTokens TypeSwapForExactTokens = "swap_for_exact_tokens" )
const ( QueryGetParams = "params" QueryGetDeposits = "deposits" QueryGetPool = "pool" QueryGetPools = "pools" )
Querier routes for the swap module
const PoolIDSep = ":"
PoolIDSep represents the separator used in pool ids to separate two denominations
Variables ¶
var ( ErrNotAllowed = errorsmod.Register(ModuleName, 2, "not allowed") ErrInvalidDeadline = errorsmod.Register(ModuleName, 3, "invalid deadline") ErrDeadlineExceeded = errorsmod.Register(ModuleName, 4, "deadline exceeded") ErrSlippageExceeded = errorsmod.Register(ModuleName, 5, "slippage exceeded") ErrInvalidPool = errorsmod.Register(ModuleName, 6, "invalid pool") ErrInvalidSlippage = errorsmod.Register(ModuleName, 7, "invalid slippage") ErrInsufficientLiquidity = errorsmod.Register(ModuleName, 8, "insufficient liquidity") ErrDepositNotFound = errorsmod.Register(ModuleName, 10, "deposit not found") ErrInvalidCoin = errorsmod.Register(ModuleName, 11, "invalid coin") ErrNotImplemented = errorsmod.Register(ModuleName, 12, "not implemented") )
swap module errors
var ( // DefaultPoolRecords is used to set default records in default genesis state DefaultPoolRecords = PoolRecords{} DefaultShareRecords = ShareRecords{} )
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 ( PoolKeyPrefix = []byte{0x01} )
key prefixes for store
var ( KeyAllowedPools = []byte("AllowedPools") KeySwapFee = []byte("SwapFee") DefaultAllowedPools = AllowedPools{} DefaultSwapFee = sdk.ZeroDec() MaxSwapFee = sdk.OneDec() )
Parameter keys and default values
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 ( ErrInvalidLengthSwap = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSwap = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSwap = 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 represents the legacy amino codec for the module ModuleCdc = codec.NewAminoCodec(amino) )
Functions ¶
func DepositorPoolSharesKey ¶
func DepositorPoolSharesKey(depositor sdk.AccAddress, poolID string) []byte
DepositorPoolSharesKey returns a key from a depositor and poolID
func PoolID ¶
PoolID returns an alphabetically sorted pool name from two denoms. The name is commutative for any all pairs A,B: f(A,B) == f(B,A).
func PoolIDFromCoins ¶
PoolIDFromCoins returns a poolID from a coins object
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers proto messages under their interfaces for unmarshalling, in addition to registerting the msg service for handling tx msgs
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.
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 AccountKeeper ¶
type AccountKeeper interface { GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI SetModuleAccount(sdk.Context, types.ModuleAccountI) // moved in from supply GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI }
AccountKeeper defines the expected account keeper (noalias)
type AllowedPool ¶
type AllowedPool struct { // token_a represents the a token allowed TokenA string `protobuf:"bytes,1,opt,name=token_a,json=tokenA,proto3" json:"token_a,omitempty"` // token_b represents the b token allowed TokenB string `protobuf:"bytes,2,opt,name=token_b,json=tokenB,proto3" json:"token_b,omitempty"` }
AllowedPool defines a pool that is allowed to be created
func NewAllowedPool ¶
func NewAllowedPool(tokenA, tokenB string) AllowedPool
NewAllowedPool returns a new AllowedPool object
func (*AllowedPool) Descriptor ¶
func (*AllowedPool) Descriptor() ([]byte, []int)
func (*AllowedPool) GetTokenA ¶
func (m *AllowedPool) GetTokenA() string
func (*AllowedPool) GetTokenB ¶
func (m *AllowedPool) GetTokenB() string
func (*AllowedPool) Marshal ¶
func (m *AllowedPool) Marshal() (dAtA []byte, err error)
func (*AllowedPool) MarshalToSizedBuffer ¶
func (m *AllowedPool) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (AllowedPool) Name ¶
func (p AllowedPool) Name() string
Name returns the name for the allowed pool
func (*AllowedPool) ProtoMessage ¶
func (*AllowedPool) ProtoMessage()
func (*AllowedPool) Reset ¶
func (m *AllowedPool) Reset()
func (*AllowedPool) Size ¶
func (m *AllowedPool) Size() (n int)
func (AllowedPool) String ¶
func (p AllowedPool) String() string
String pretty prints the allowedPool
func (*AllowedPool) Unmarshal ¶
func (m *AllowedPool) Unmarshal(dAtA []byte) error
func (AllowedPool) Validate ¶
func (p AllowedPool) Validate() error
Validate validates allowedPool attributes and returns an error if invalid
func (*AllowedPool) XXX_DiscardUnknown ¶
func (m *AllowedPool) XXX_DiscardUnknown()
func (*AllowedPool) XXX_Marshal ¶
func (m *AllowedPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllowedPool) XXX_Merge ¶
func (m *AllowedPool) XXX_Merge(src proto.Message)
func (*AllowedPool) XXX_Size ¶
func (m *AllowedPool) XXX_Size() int
func (*AllowedPool) XXX_Unmarshal ¶
func (m *AllowedPool) XXX_Unmarshal(b []byte) error
type AllowedPools ¶
type AllowedPools []AllowedPool
AllowedPools is a slice of AllowedPool
func NewAllowedPools ¶
func NewAllowedPools(allowedPools ...AllowedPool) AllowedPools
NewAllowedPools returns AllowedPools from the provided values
func (AllowedPools) Validate ¶
func (p AllowedPools) Validate() error
Validate validates each allowedPool and returns an error if there are any duplicates
type BankKeeper ¶
type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt 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 interface needed to retrieve account balances.
type BasePool ¶
type BasePool struct {
// contains filtered or unexported fields
}
BasePool implements a unitless constant-product liquidity pool.
The pool is symmetric. For all A,B,s, any operation F on a pool (A,B,s) and pool (B,A,s) will result in equal state values of A', B', s': F(A,B,s) => (A',B',s'), F(B,A,s) => (B',A',s')
In addition, the pool is protected from overflow in intermediate calculations, and will only overflow when A, B, or s become larger than the max sdkmath.Int.
Pool operations with non-positive values are invalid, and all functions on a pool will panic when given zero or negative values.
func NewBasePool ¶
NewBasePool returns a pointer to a base pool with reserves and total shares initialized
func NewBasePoolWithExistingShares ¶
func NewBasePoolWithExistingShares(reservesA, reservesB, totalShares sdkmath.Int) (*BasePool, error)
NewBasePoolWithExistingShares returns a pointer to a base pool with existing shares
func (*BasePool) AddLiquidity ¶
func (p *BasePool) AddLiquidity(desiredA sdkmath.Int, desiredB sdkmath.Int) (sdkmath.Int, sdkmath.Int, sdkmath.Int)
AddLiquidity adds liquidity to the pool returns the actual reservesA, reservesB deposits in addition to the number of shares created. The deposits are always less than or equal to the provided and desired values.
func (*BasePool) IsEmpty ¶
IsEmpty returns true if all reserves are zero and returns false if reserveA or reserveB is not empty
func (*BasePool) RemoveLiquidity ¶
RemoveLiquidity removes liquidity from the pool and panics if the shares provided are greater than the total shares of the pool or the shares are not positive. In addition, also panics if reserves go negative, which should not happen. If panic occurs, it is a bug.
func (*BasePool) ShareValue ¶
ShareValue returns the value of the provided shares and panics if the shares are greater than the total shares of the pool or if the shares are not positive.
func (*BasePool) SwapAForExactB ¶
SwapAForExactB trades a for an exact b. Returns the positive amount a that is added to the pool, and the portion of a that is used to pay the fee.
func (*BasePool) SwapBForExactA ¶
SwapBForExactA trades b for an exact a. Returns the positive amount b that is added to the pool, and the portion of b that is used to pay the fee.
func (*BasePool) SwapExactAForB ¶
SwapExactAForB trades an exact value of a for b. Returns the positive amount b that is removed from the pool and the portion of a that is used for paying the fee.
func (*BasePool) SwapExactBForA ¶
SwapExactBForA trades an exact value of b for a. Returns the positive amount a that is removed from the pool and the portion of b that is used for paying the fee.
func (*BasePool) TotalShares ¶
TotalShares returns the total number of shares in the pool
type DenominatedPool ¶
type DenominatedPool struct {
// contains filtered or unexported fields
}
DenominatedPool implements a denominated constant-product liquidity pool
func NewDenominatedPool ¶
func NewDenominatedPool(reserves sdk.Coins) (*DenominatedPool, error)
NewDenominatedPool creates a new denominated pool from reserve coins
func NewDenominatedPoolWithExistingShares ¶
func NewDenominatedPoolWithExistingShares(reserves sdk.Coins, totalShares sdkmath.Int) (*DenominatedPool, error)
NewDenominatedPoolWithExistingShares creates a new denominated pool from reserve coins
func (*DenominatedPool) AddLiquidity ¶
AddLiquidity adds liquidity to the reserves and returns the added amount and shares created
func (*DenominatedPool) IsEmpty ¶
func (p *DenominatedPool) IsEmpty() bool
IsEmpty returns true if the pool is empty
func (*DenominatedPool) RemoveLiquidity ¶
func (p *DenominatedPool) RemoveLiquidity(shares sdkmath.Int) sdk.Coins
RemoveLiquidity removes liquidity from the pool
func (*DenominatedPool) Reserves ¶
func (p *DenominatedPool) Reserves() sdk.Coins
Reserves returns the reserves held in the pool
func (*DenominatedPool) ShareValue ¶
func (p *DenominatedPool) ShareValue(shares sdkmath.Int) sdk.Coins
ShareValue returns the value of the provided shares
func (*DenominatedPool) SwapWithExactInput ¶
SwapWithExactInput trades an exact input coin for the other. Returns the positive other coin amount that is removed from the pool and the portion of the input coin that is used for the fee. It panics if the input denom does not match the pool reserves.
func (*DenominatedPool) SwapWithExactOutput ¶
func (p *DenominatedPool) SwapWithExactOutput(swapOutput sdk.Coin, fee sdk.Dec) (sdk.Coin, sdk.Coin)
SwapWithExactOutput trades a coin for an exact output coin b. Returns the positive input coin that is added to the pool, and the portion of that input that is used to pay the fee. Panics if the output denom does not match the pool reserves.
func (*DenominatedPool) TotalShares ¶
func (p *DenominatedPool) TotalShares() sdkmath.Int
TotalShares returns the total shares for the pool
type DepositResponse ¶
type DepositResponse struct { // depositor represents the owner of the deposit Depositor string `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"` // pool_id represents the pool the deposit is for PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` SharesOwned github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */ SharesValue github_com_cosmos_cosmos_sdk_types.Coins `` /* 138-byte string literal not displayed */ }
DepositResponse defines a single deposit query response type.
func (*DepositResponse) Descriptor ¶
func (*DepositResponse) Descriptor() ([]byte, []int)
func (*DepositResponse) Marshal ¶
func (m *DepositResponse) Marshal() (dAtA []byte, err error)
func (*DepositResponse) MarshalToSizedBuffer ¶
func (m *DepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DepositResponse) ProtoMessage ¶
func (*DepositResponse) ProtoMessage()
func (*DepositResponse) Reset ¶
func (m *DepositResponse) Reset()
func (*DepositResponse) Size ¶
func (m *DepositResponse) Size() (n int)
func (*DepositResponse) String ¶
func (m *DepositResponse) String() string
func (*DepositResponse) Unmarshal ¶
func (m *DepositResponse) Unmarshal(dAtA []byte) error
func (*DepositResponse) XXX_DiscardUnknown ¶
func (m *DepositResponse) XXX_DiscardUnknown()
func (*DepositResponse) XXX_Marshal ¶
func (m *DepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DepositResponse) XXX_Merge ¶
func (m *DepositResponse) XXX_Merge(src proto.Message)
func (*DepositResponse) XXX_Size ¶
func (m *DepositResponse) XXX_Size() int
func (*DepositResponse) XXX_Unmarshal ¶
func (m *DepositResponse) XXX_Unmarshal(b []byte) error
type DepositsQueryResult ¶
type DepositsQueryResult struct { Depositor sdk.AccAddress `json:"depositor" yaml:"depositor"` PoolID string `json:"pool_id" yaml:"pool_id"` }
DepositsQueryResult contains the result of a deposits query
func NewDepositsQueryResult ¶
func NewDepositsQueryResult(shareRecord ShareRecord, sharesValue sdk.Coins) DepositsQueryResult
NewDepositsQueryResult creates a new DepositsQueryResult
type DepositsQueryResults ¶
type DepositsQueryResults []DepositsQueryResult
DepositsQueryResults is a slice of DepositsQueryResult
type GenesisState ¶
type GenesisState struct { // params defines all the paramaters related to swap Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // pool_records defines the available pools PoolRecords PoolRecords `protobuf:"bytes,2,rep,name=pool_records,json=poolRecords,proto3,castrepeated=PoolRecords" json:"pool_records"` ShareRecords ShareRecords `protobuf:"bytes,3,rep,name=share_records,json=shareRecords,proto3,castrepeated=ShareRecords" json:"share_records"` }
GenesisState defines the swap module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns a default genesis state
func NewGenesisState ¶
func NewGenesisState(params Params, poolRecords PoolRecords, shareRecords ShareRecords) GenesisState
NewGenesisState creates a new genesis state.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPoolRecords ¶
func (m *GenesisState) GetPoolRecords() PoolRecords
func (*GenesisState) GetShareRecords ¶
func (m *GenesisState) GetShareRecords() ShareRecords
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 validates the module's genesis state
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // Deposit defines a method for depositing liquidity into a pool Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) // Withdraw defines a method for withdrawing liquidity into a pool Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) // SwapExactForTokens represents a message for trading exact coinA for coinB SwapExactForTokens(ctx context.Context, in *MsgSwapExactForTokens, opts ...grpc.CallOption) (*MsgSwapExactForTokensResponse, error) // SwapForExactTokens represents a message for trading coinA for an exact coinB SwapForExactTokens(ctx context.Context, in *MsgSwapForExactTokens, opts ...grpc.CallOption) (*MsgSwapForExactTokensResponse, 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 MsgDeposit ¶
type MsgDeposit struct { // depositor represents the address to deposit funds from Depositor string `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"` // token_a represents one token of deposit pair TokenA types.Coin `protobuf:"bytes,2,opt,name=token_a,json=tokenA,proto3" json:"token_a"` // token_b represents one token of deposit pair TokenB types.Coin `protobuf:"bytes,3,opt,name=token_b,json=tokenB,proto3" json:"token_b"` // slippage represents the max decimal percentage price change Slippage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=slippage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slippage"` // deadline represents the unix timestamp to complete the deposit by Deadline int64 `protobuf:"varint,5,opt,name=deadline,proto3" json:"deadline,omitempty"` }
MsgDeposit represents a message for depositing liquidity into a pool
func NewMsgDeposit ¶
func NewMsgDeposit(depositor string, tokenA sdk.Coin, tokenB sdk.Coin, slippage sdk.Dec, deadline int64) *MsgDeposit
NewMsgDeposit returns a new MsgDeposit
func (MsgDeposit) DeadlineExceeded ¶
func (msg MsgDeposit) DeadlineExceeded(blockTime time.Time) bool
DeadlineExceeded returns if the msg has exceeded it's deadline
func (*MsgDeposit) Descriptor ¶
func (*MsgDeposit) Descriptor() ([]byte, []int)
func (MsgDeposit) GetDeadline ¶
func (msg MsgDeposit) GetDeadline() time.Time
GetDeadline returns the time at which the msg is considered invalid
func (MsgDeposit) GetSignBytes ¶
func (msg MsgDeposit) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgDeposit) GetSigners ¶
func (msg MsgDeposit) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgDeposit) Marshal ¶
func (m *MsgDeposit) Marshal() (dAtA []byte, err error)
func (*MsgDeposit) MarshalToSizedBuffer ¶
func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDeposit) ProtoMessage ¶
func (*MsgDeposit) ProtoMessage()
func (*MsgDeposit) Reset ¶
func (m *MsgDeposit) Reset()
func (MsgDeposit) Route ¶
func (msg MsgDeposit) Route() string
Route return the message type used for routing the message.
func (*MsgDeposit) Size ¶
func (m *MsgDeposit) Size() (n int)
func (*MsgDeposit) String ¶
func (m *MsgDeposit) String() string
func (MsgDeposit) Type ¶
func (msg MsgDeposit) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgDeposit) Unmarshal ¶
func (m *MsgDeposit) Unmarshal(dAtA []byte) error
func (MsgDeposit) ValidateBasic ¶
func (msg MsgDeposit) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgDeposit) XXX_DiscardUnknown ¶
func (m *MsgDeposit) XXX_DiscardUnknown()
func (*MsgDeposit) XXX_Marshal ¶
func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDeposit) XXX_Merge ¶
func (m *MsgDeposit) XXX_Merge(src proto.Message)
func (*MsgDeposit) XXX_Size ¶
func (m *MsgDeposit) XXX_Size() int
func (*MsgDeposit) XXX_Unmarshal ¶
func (m *MsgDeposit) XXX_Unmarshal(b []byte) error
type MsgDepositResponse ¶
type MsgDepositResponse struct { }
MsgDepositResponse defines the Msg/Deposit response type.
func (*MsgDepositResponse) Descriptor ¶
func (*MsgDepositResponse) Descriptor() ([]byte, []int)
func (*MsgDepositResponse) Marshal ¶
func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)
func (*MsgDepositResponse) MarshalTo ¶
func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDepositResponse) MarshalToSizedBuffer ¶
func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDepositResponse) ProtoMessage ¶
func (*MsgDepositResponse) ProtoMessage()
func (*MsgDepositResponse) Reset ¶
func (m *MsgDepositResponse) Reset()
func (*MsgDepositResponse) Size ¶
func (m *MsgDepositResponse) Size() (n int)
func (*MsgDepositResponse) String ¶
func (m *MsgDepositResponse) String() string
func (*MsgDepositResponse) Unmarshal ¶
func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error
func (*MsgDepositResponse) XXX_DiscardUnknown ¶
func (m *MsgDepositResponse) XXX_DiscardUnknown()
func (*MsgDepositResponse) XXX_Marshal ¶
func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDepositResponse) XXX_Merge ¶
func (m *MsgDepositResponse) XXX_Merge(src proto.Message)
func (*MsgDepositResponse) XXX_Size ¶
func (m *MsgDepositResponse) XXX_Size() int
func (*MsgDepositResponse) XXX_Unmarshal ¶
func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Deposit defines a method for depositing liquidity into a pool Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) // Withdraw defines a method for withdrawing liquidity into a pool Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) // SwapExactForTokens represents a message for trading exact coinA for coinB SwapExactForTokens(context.Context, *MsgSwapExactForTokens) (*MsgSwapExactForTokensResponse, error) // SwapForExactTokens represents a message for trading coinA for an exact coinB SwapForExactTokens(context.Context, *MsgSwapForExactTokens) (*MsgSwapForExactTokensResponse, error) }
MsgServer is the server API for Msg service.
type MsgSwapExactForTokens ¶
type MsgSwapExactForTokens struct { // represents the address swaping the tokens Requester string `protobuf:"bytes,1,opt,name=requester,proto3" json:"requester,omitempty"` // exact_token_a represents the exact amount to swap for token_b ExactTokenA types.Coin `protobuf:"bytes,2,opt,name=exact_token_a,json=exactTokenA,proto3" json:"exact_token_a"` // token_b represents the desired token_b to swap for TokenB types.Coin `protobuf:"bytes,3,opt,name=token_b,json=tokenB,proto3" json:"token_b"` // slippage represents the maximum change in token_b allowed Slippage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=slippage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slippage"` // deadline represents the unix timestamp to complete the swap by Deadline int64 `protobuf:"varint,5,opt,name=deadline,proto3" json:"deadline,omitempty"` }
MsgSwapExactForTokens represents a message for trading exact coinA for coinB
func NewMsgSwapExactForTokens ¶
func NewMsgSwapExactForTokens(requester string, exactTokenA sdk.Coin, tokenB sdk.Coin, slippage sdk.Dec, deadline int64) *MsgSwapExactForTokens
NewMsgSwapExactForTokens returns a new MsgSwapExactForTokens
func (MsgSwapExactForTokens) DeadlineExceeded ¶
func (msg MsgSwapExactForTokens) DeadlineExceeded(blockTime time.Time) bool
DeadlineExceeded returns if the msg has exceeded it's deadline
func (*MsgSwapExactForTokens) Descriptor ¶
func (*MsgSwapExactForTokens) Descriptor() ([]byte, []int)
func (MsgSwapExactForTokens) GetDeadline ¶
func (msg MsgSwapExactForTokens) GetDeadline() time.Time
GetDeadline returns the time at which the msg is considered invalid
func (MsgSwapExactForTokens) GetSignBytes ¶
func (msg MsgSwapExactForTokens) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgSwapExactForTokens) GetSigners ¶
func (msg MsgSwapExactForTokens) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgSwapExactForTokens) Marshal ¶
func (m *MsgSwapExactForTokens) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactForTokens) MarshalTo ¶
func (m *MsgSwapExactForTokens) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactForTokens) MarshalToSizedBuffer ¶
func (m *MsgSwapExactForTokens) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactForTokens) ProtoMessage ¶
func (*MsgSwapExactForTokens) ProtoMessage()
func (*MsgSwapExactForTokens) Reset ¶
func (m *MsgSwapExactForTokens) Reset()
func (MsgSwapExactForTokens) Route ¶
func (msg MsgSwapExactForTokens) Route() string
Route return the message type used for routing the message.
func (*MsgSwapExactForTokens) Size ¶
func (m *MsgSwapExactForTokens) Size() (n int)
func (*MsgSwapExactForTokens) String ¶
func (m *MsgSwapExactForTokens) String() string
func (MsgSwapExactForTokens) Type ¶
func (msg MsgSwapExactForTokens) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgSwapExactForTokens) Unmarshal ¶
func (m *MsgSwapExactForTokens) Unmarshal(dAtA []byte) error
func (MsgSwapExactForTokens) ValidateBasic ¶
func (msg MsgSwapExactForTokens) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgSwapExactForTokens) XXX_DiscardUnknown ¶
func (m *MsgSwapExactForTokens) XXX_DiscardUnknown()
func (*MsgSwapExactForTokens) XXX_Marshal ¶
func (m *MsgSwapExactForTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactForTokens) XXX_Merge ¶
func (m *MsgSwapExactForTokens) XXX_Merge(src proto.Message)
func (*MsgSwapExactForTokens) XXX_Size ¶
func (m *MsgSwapExactForTokens) XXX_Size() int
func (*MsgSwapExactForTokens) XXX_Unmarshal ¶
func (m *MsgSwapExactForTokens) XXX_Unmarshal(b []byte) error
type MsgSwapExactForTokensResponse ¶
type MsgSwapExactForTokensResponse struct { }
MsgSwapExactForTokensResponse defines the Msg/SwapExactForTokens response type.
func (*MsgSwapExactForTokensResponse) Descriptor ¶
func (*MsgSwapExactForTokensResponse) Descriptor() ([]byte, []int)
func (*MsgSwapExactForTokensResponse) Marshal ¶
func (m *MsgSwapExactForTokensResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactForTokensResponse) MarshalTo ¶
func (m *MsgSwapExactForTokensResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactForTokensResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapExactForTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactForTokensResponse) ProtoMessage ¶
func (*MsgSwapExactForTokensResponse) ProtoMessage()
func (*MsgSwapExactForTokensResponse) Reset ¶
func (m *MsgSwapExactForTokensResponse) Reset()
func (*MsgSwapExactForTokensResponse) Size ¶
func (m *MsgSwapExactForTokensResponse) Size() (n int)
func (*MsgSwapExactForTokensResponse) String ¶
func (m *MsgSwapExactForTokensResponse) String() string
func (*MsgSwapExactForTokensResponse) Unmarshal ¶
func (m *MsgSwapExactForTokensResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapExactForTokensResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapExactForTokensResponse) XXX_DiscardUnknown()
func (*MsgSwapExactForTokensResponse) XXX_Marshal ¶
func (m *MsgSwapExactForTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactForTokensResponse) XXX_Merge ¶
func (m *MsgSwapExactForTokensResponse) XXX_Merge(src proto.Message)
func (*MsgSwapExactForTokensResponse) XXX_Size ¶
func (m *MsgSwapExactForTokensResponse) XXX_Size() int
func (*MsgSwapExactForTokensResponse) XXX_Unmarshal ¶
func (m *MsgSwapExactForTokensResponse) XXX_Unmarshal(b []byte) error
type MsgSwapForExactTokens ¶
type MsgSwapForExactTokens struct { // represents the address swaping the tokens Requester string `protobuf:"bytes,1,opt,name=requester,proto3" json:"requester,omitempty"` // token_a represents the desired token_a to swap for TokenA types.Coin `protobuf:"bytes,2,opt,name=token_a,json=tokenA,proto3" json:"token_a"` // exact_token_b represents the exact token b amount to swap for token a ExactTokenB types.Coin `protobuf:"bytes,3,opt,name=exact_token_b,json=exactTokenB,proto3" json:"exact_token_b"` // slippage represents the maximum change in token_a allowed Slippage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=slippage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slippage"` // deadline represents the unix timestamp to complete the swap by Deadline int64 `protobuf:"varint,5,opt,name=deadline,proto3" json:"deadline,omitempty"` }
MsgSwapForExactTokens represents a message for trading coinA for an exact coinB
func NewMsgSwapForExactTokens ¶
func NewMsgSwapForExactTokens(requester string, tokenA sdk.Coin, exactTokenB sdk.Coin, slippage sdk.Dec, deadline int64) *MsgSwapForExactTokens
NewMsgSwapForExactTokens returns a new MsgSwapForExactTokens
func (MsgSwapForExactTokens) DeadlineExceeded ¶
func (msg MsgSwapForExactTokens) DeadlineExceeded(blockTime time.Time) bool
DeadlineExceeded returns if the msg has exceeded it's deadline
func (*MsgSwapForExactTokens) Descriptor ¶
func (*MsgSwapForExactTokens) Descriptor() ([]byte, []int)
func (MsgSwapForExactTokens) GetDeadline ¶
func (msg MsgSwapForExactTokens) GetDeadline() time.Time
GetDeadline returns the time at which the msg is considered invalid
func (MsgSwapForExactTokens) GetSignBytes ¶
func (msg MsgSwapForExactTokens) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgSwapForExactTokens) GetSigners ¶
func (msg MsgSwapForExactTokens) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgSwapForExactTokens) Marshal ¶
func (m *MsgSwapForExactTokens) Marshal() (dAtA []byte, err error)
func (*MsgSwapForExactTokens) MarshalTo ¶
func (m *MsgSwapForExactTokens) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapForExactTokens) MarshalToSizedBuffer ¶
func (m *MsgSwapForExactTokens) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapForExactTokens) ProtoMessage ¶
func (*MsgSwapForExactTokens) ProtoMessage()
func (*MsgSwapForExactTokens) Reset ¶
func (m *MsgSwapForExactTokens) Reset()
func (MsgSwapForExactTokens) Route ¶
func (msg MsgSwapForExactTokens) Route() string
Route return the message type used for routing the message.
func (*MsgSwapForExactTokens) Size ¶
func (m *MsgSwapForExactTokens) Size() (n int)
func (*MsgSwapForExactTokens) String ¶
func (m *MsgSwapForExactTokens) String() string
func (MsgSwapForExactTokens) Type ¶
func (msg MsgSwapForExactTokens) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgSwapForExactTokens) Unmarshal ¶
func (m *MsgSwapForExactTokens) Unmarshal(dAtA []byte) error
func (MsgSwapForExactTokens) ValidateBasic ¶
func (msg MsgSwapForExactTokens) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgSwapForExactTokens) XXX_DiscardUnknown ¶
func (m *MsgSwapForExactTokens) XXX_DiscardUnknown()
func (*MsgSwapForExactTokens) XXX_Marshal ¶
func (m *MsgSwapForExactTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapForExactTokens) XXX_Merge ¶
func (m *MsgSwapForExactTokens) XXX_Merge(src proto.Message)
func (*MsgSwapForExactTokens) XXX_Size ¶
func (m *MsgSwapForExactTokens) XXX_Size() int
func (*MsgSwapForExactTokens) XXX_Unmarshal ¶
func (m *MsgSwapForExactTokens) XXX_Unmarshal(b []byte) error
type MsgSwapForExactTokensResponse ¶
type MsgSwapForExactTokensResponse struct { }
MsgSwapForExactTokensResponse defines the Msg/SwapForExactTokensResponse response type.
func (*MsgSwapForExactTokensResponse) Descriptor ¶
func (*MsgSwapForExactTokensResponse) Descriptor() ([]byte, []int)
func (*MsgSwapForExactTokensResponse) Marshal ¶
func (m *MsgSwapForExactTokensResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapForExactTokensResponse) MarshalTo ¶
func (m *MsgSwapForExactTokensResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapForExactTokensResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapForExactTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapForExactTokensResponse) ProtoMessage ¶
func (*MsgSwapForExactTokensResponse) ProtoMessage()
func (*MsgSwapForExactTokensResponse) Reset ¶
func (m *MsgSwapForExactTokensResponse) Reset()
func (*MsgSwapForExactTokensResponse) Size ¶
func (m *MsgSwapForExactTokensResponse) Size() (n int)
func (*MsgSwapForExactTokensResponse) String ¶
func (m *MsgSwapForExactTokensResponse) String() string
func (*MsgSwapForExactTokensResponse) Unmarshal ¶
func (m *MsgSwapForExactTokensResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapForExactTokensResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapForExactTokensResponse) XXX_DiscardUnknown()
func (*MsgSwapForExactTokensResponse) XXX_Marshal ¶
func (m *MsgSwapForExactTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapForExactTokensResponse) XXX_Merge ¶
func (m *MsgSwapForExactTokensResponse) XXX_Merge(src proto.Message)
func (*MsgSwapForExactTokensResponse) XXX_Size ¶
func (m *MsgSwapForExactTokensResponse) XXX_Size() int
func (*MsgSwapForExactTokensResponse) XXX_Unmarshal ¶
func (m *MsgSwapForExactTokensResponse) XXX_Unmarshal(b []byte) error
type MsgWithDeadline ¶
type MsgWithDeadline interface { GetDeadline() time.Time DeadlineExceeded(blockTime time.Time) bool }
MsgWithDeadline allows messages to define a deadline of when they are considered invalid
type MsgWithdraw ¶
type MsgWithdraw struct { // from represents the address we are withdrawing for From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` Shares github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares"` // min_token_a represents the minimum a token to withdraw MinTokenA types.Coin `protobuf:"bytes,3,opt,name=min_token_a,json=minTokenA,proto3" json:"min_token_a"` // min_token_a represents the minimum a token to withdraw MinTokenB types.Coin `protobuf:"bytes,4,opt,name=min_token_b,json=minTokenB,proto3" json:"min_token_b"` // deadline represents the unix timestamp to complete the withdraw by Deadline int64 `protobuf:"varint,5,opt,name=deadline,proto3" json:"deadline,omitempty"` }
MsgWithdraw represents a message for withdrawing liquidity from a pool
func NewMsgWithdraw ¶
func NewMsgWithdraw(from string, shares sdkmath.Int, minTokenA, minTokenB sdk.Coin, deadline int64) *MsgWithdraw
NewMsgWithdraw returns a new MsgWithdraw
func (MsgWithdraw) DeadlineExceeded ¶
func (msg MsgWithdraw) DeadlineExceeded(blockTime time.Time) bool
DeadlineExceeded returns if the msg has exceeded it's deadline
func (*MsgWithdraw) Descriptor ¶
func (*MsgWithdraw) Descriptor() ([]byte, []int)
func (MsgWithdraw) GetDeadline ¶
func (msg MsgWithdraw) GetDeadline() time.Time
GetDeadline returns the time at which the msg is considered invalid
func (MsgWithdraw) GetSignBytes ¶
func (msg MsgWithdraw) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgWithdraw) GetSigners ¶
func (msg MsgWithdraw) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgWithdraw) Marshal ¶
func (m *MsgWithdraw) Marshal() (dAtA []byte, err error)
func (*MsgWithdraw) MarshalToSizedBuffer ¶
func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdraw) ProtoMessage ¶
func (*MsgWithdraw) ProtoMessage()
func (*MsgWithdraw) Reset ¶
func (m *MsgWithdraw) Reset()
func (MsgWithdraw) Route ¶
func (msg MsgWithdraw) Route() string
Route return the message type used for routing the message.
func (*MsgWithdraw) Size ¶
func (m *MsgWithdraw) Size() (n int)
func (*MsgWithdraw) String ¶
func (m *MsgWithdraw) String() string
func (MsgWithdraw) Type ¶
func (msg MsgWithdraw) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgWithdraw) Unmarshal ¶
func (m *MsgWithdraw) Unmarshal(dAtA []byte) error
func (MsgWithdraw) ValidateBasic ¶
func (msg MsgWithdraw) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgWithdraw) XXX_DiscardUnknown ¶
func (m *MsgWithdraw) XXX_DiscardUnknown()
func (*MsgWithdraw) XXX_Marshal ¶
func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdraw) XXX_Merge ¶
func (m *MsgWithdraw) XXX_Merge(src proto.Message)
func (*MsgWithdraw) XXX_Size ¶
func (m *MsgWithdraw) XXX_Size() int
func (*MsgWithdraw) XXX_Unmarshal ¶
func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error
type MsgWithdrawResponse ¶
type MsgWithdrawResponse struct { }
MsgWithdrawResponse defines the Msg/Withdraw response type.
func (*MsgWithdrawResponse) Descriptor ¶
func (*MsgWithdrawResponse) Descriptor() ([]byte, []int)
func (*MsgWithdrawResponse) Marshal ¶
func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error)
func (*MsgWithdrawResponse) MarshalTo ¶
func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgWithdrawResponse) MarshalToSizedBuffer ¶
func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdrawResponse) ProtoMessage ¶
func (*MsgWithdrawResponse) ProtoMessage()
func (*MsgWithdrawResponse) Reset ¶
func (m *MsgWithdrawResponse) Reset()
func (*MsgWithdrawResponse) Size ¶
func (m *MsgWithdrawResponse) Size() (n int)
func (*MsgWithdrawResponse) String ¶
func (m *MsgWithdrawResponse) String() string
func (*MsgWithdrawResponse) Unmarshal ¶
func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error
func (*MsgWithdrawResponse) XXX_DiscardUnknown ¶
func (m *MsgWithdrawResponse) XXX_DiscardUnknown()
func (*MsgWithdrawResponse) XXX_Marshal ¶
func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdrawResponse) XXX_Merge ¶
func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message)
func (*MsgWithdrawResponse) XXX_Size ¶
func (m *MsgWithdrawResponse) XXX_Size() int
func (*MsgWithdrawResponse) XXX_Unmarshal ¶
func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { // allowed_pools defines that pools that are allowed to be created AllowedPools AllowedPools `protobuf:"bytes,1,rep,name=allowed_pools,json=allowedPools,proto3,castrepeated=AllowedPools" json:"allowed_pools"` // swap_fee defines the swap fee for all pools SwapFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=swap_fee,json=swapFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_fee"` }
Params defines the parameters for the swap module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns default params for swap module
func NewParams ¶
func NewParams(pairs AllowedPools, swapFee sdk.Dec) Params
NewParams returns a new params object
func (*Params) Descriptor ¶
func (*Params) GetAllowedPools ¶
func (m *Params) GetAllowedPools() AllowedPools
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs implements params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PoolRecord ¶
type PoolRecord struct { // pool_id represents the unique id of the pool PoolID string `protobuf:"bytes,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // reserves_a is the a token coin reserves ReservesA types.Coin `protobuf:"bytes,2,opt,name=reserves_a,json=reservesA,proto3" json:"reserves_a"` // reserves_b is the a token coin reserves ReservesB types.Coin `protobuf:"bytes,3,opt,name=reserves_b,json=reservesB,proto3" json:"reserves_b"` TotalShares github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */ }
PoolRecord represents the state of a liquidity pool and is used to store the state of a denominated pool
func NewPoolRecord ¶
func NewPoolRecord(reserves sdk.Coins, totalShares sdkmath.Int) PoolRecord
NewPoolRecord takes reserve coins and total shares, returning a new pool record with a id
func NewPoolRecordFromPool ¶
func NewPoolRecordFromPool(pool *DenominatedPool) PoolRecord
NewPoolRecordFromPool takes a pointer to a denominated pool and returns a pool record for storage in state.
func (*PoolRecord) Descriptor ¶
func (*PoolRecord) Descriptor() ([]byte, []int)
func (*PoolRecord) GetPoolID ¶
func (m *PoolRecord) GetPoolID() string
func (*PoolRecord) GetReservesA ¶
func (m *PoolRecord) GetReservesA() types.Coin
func (*PoolRecord) GetReservesB ¶
func (m *PoolRecord) GetReservesB() types.Coin
func (*PoolRecord) Marshal ¶
func (m *PoolRecord) Marshal() (dAtA []byte, err error)
func (*PoolRecord) MarshalToSizedBuffer ¶
func (m *PoolRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PoolRecord) ProtoMessage ¶
func (*PoolRecord) ProtoMessage()
func (PoolRecord) Reserves ¶
func (p PoolRecord) Reserves() sdk.Coins
Reserves returns the total reserves for a pool
func (*PoolRecord) Reset ¶
func (m *PoolRecord) Reset()
func (*PoolRecord) Size ¶
func (m *PoolRecord) Size() (n int)
func (*PoolRecord) String ¶
func (m *PoolRecord) String() string
func (*PoolRecord) Unmarshal ¶
func (m *PoolRecord) Unmarshal(dAtA []byte) error
func (PoolRecord) Validate ¶
func (p PoolRecord) Validate() error
Validate performs basic validation checks of the record data
func (*PoolRecord) XXX_DiscardUnknown ¶
func (m *PoolRecord) XXX_DiscardUnknown()
func (*PoolRecord) XXX_Marshal ¶
func (m *PoolRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PoolRecord) XXX_Merge ¶
func (m *PoolRecord) XXX_Merge(src proto.Message)
func (*PoolRecord) XXX_Size ¶
func (m *PoolRecord) XXX_Size() int
func (*PoolRecord) XXX_Unmarshal ¶
func (m *PoolRecord) XXX_Unmarshal(b []byte) error
type PoolRecords ¶
type PoolRecords []PoolRecord
PoolRecords is a slice of PoolRecord
func (PoolRecords) Validate ¶
func (prs PoolRecords) Validate() error
Validate performs basic validation checks on all records in the slice
type PoolResponse ¶
type PoolResponse struct { // name represents the name of the pool Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // coins represents the total reserves of the pool Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` TotalShares github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */ }
Pool represents the state of a single pool
func (*PoolResponse) Descriptor ¶
func (*PoolResponse) Descriptor() ([]byte, []int)
func (*PoolResponse) Marshal ¶
func (m *PoolResponse) Marshal() (dAtA []byte, err error)
func (*PoolResponse) MarshalToSizedBuffer ¶
func (m *PoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PoolResponse) ProtoMessage ¶
func (*PoolResponse) ProtoMessage()
func (*PoolResponse) Reset ¶
func (m *PoolResponse) Reset()
func (*PoolResponse) Size ¶
func (m *PoolResponse) Size() (n int)
func (*PoolResponse) String ¶
func (m *PoolResponse) String() string
func (*PoolResponse) Unmarshal ¶
func (m *PoolResponse) Unmarshal(dAtA []byte) error
func (*PoolResponse) XXX_DiscardUnknown ¶
func (m *PoolResponse) XXX_DiscardUnknown()
func (*PoolResponse) XXX_Marshal ¶
func (m *PoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PoolResponse) XXX_Merge ¶
func (m *PoolResponse) XXX_Merge(src proto.Message)
func (*PoolResponse) XXX_Size ¶
func (m *PoolResponse) XXX_Size() int
func (*PoolResponse) XXX_Unmarshal ¶
func (m *PoolResponse) XXX_Unmarshal(b []byte) error
type PoolStatsQueryResult ¶
type PoolStatsQueryResult struct { Name string `json:"name" yaml:"name"` Coins sdk.Coins `json:"coins" yaml:"coins"` }
PoolStatsQueryResult contains the result of a pool query
func NewPoolStatsQueryResult ¶
func NewPoolStatsQueryResult(name string, coins sdk.Coins, totalShares sdkmath.Int) PoolStatsQueryResult
NewPoolStatsQueryResult creates a new PoolStatsQueryResult
type PoolStatsQueryResults ¶
type PoolStatsQueryResults []PoolStatsQueryResult
PoolStatsQueryResults is a slice of PoolStatsQueryResult
type QueryClient ¶
type QueryClient interface { // Params queries all parameters of the swap module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Pools queries pools based on pool ID Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error) // Deposits queries deposit details based on owner address and pool Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, 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 QueryDepositsParams ¶
type QueryDepositsParams struct { Page int `json:"page" yaml:"page"` Limit int `json:"limit" yaml:"limit"` Owner sdk.AccAddress `json:"owner" yaml:"owner"` Pool string `json:"pool" yaml:"pool"` }
QueryDepositsParams is the params for a filtered deposits query
func NewQueryDepositsParams ¶
func NewQueryDepositsParams(page, limit int, owner sdk.AccAddress, pool string) QueryDepositsParams
NewQueryDepositsParams creates a new QueryDepositsParams
type QueryDepositsRequest ¶
type QueryDepositsRequest struct { // owner optionally filters deposits by owner Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` // pool_id optionally fitlers deposits by pool id PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryDepositsRequest is the request type for the Query/Deposits RPC method.
func (*QueryDepositsRequest) Descriptor ¶
func (*QueryDepositsRequest) Descriptor() ([]byte, []int)
func (*QueryDepositsRequest) Marshal ¶
func (m *QueryDepositsRequest) Marshal() (dAtA []byte, err error)
func (*QueryDepositsRequest) MarshalTo ¶
func (m *QueryDepositsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryDepositsRequest) MarshalToSizedBuffer ¶
func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryDepositsRequest) ProtoMessage ¶
func (*QueryDepositsRequest) ProtoMessage()
func (*QueryDepositsRequest) Reset ¶
func (m *QueryDepositsRequest) Reset()
func (*QueryDepositsRequest) Size ¶
func (m *QueryDepositsRequest) Size() (n int)
func (*QueryDepositsRequest) String ¶
func (m *QueryDepositsRequest) String() string
func (*QueryDepositsRequest) Unmarshal ¶
func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error
func (*QueryDepositsRequest) XXX_DiscardUnknown ¶
func (m *QueryDepositsRequest) XXX_DiscardUnknown()
func (*QueryDepositsRequest) XXX_Marshal ¶
func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryDepositsRequest) XXX_Merge ¶
func (m *QueryDepositsRequest) XXX_Merge(src proto.Message)
func (*QueryDepositsRequest) XXX_Size ¶
func (m *QueryDepositsRequest) XXX_Size() int
func (*QueryDepositsRequest) XXX_Unmarshal ¶
func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error
type QueryDepositsResponse ¶
type QueryDepositsResponse struct { // deposits returns the deposits matching the requested parameters Deposits []DepositResponse `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` // pagination defines the pagination in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryDepositsResponse is the response type for the Query/Deposits RPC method.
func (*QueryDepositsResponse) Descriptor ¶
func (*QueryDepositsResponse) Descriptor() ([]byte, []int)
func (*QueryDepositsResponse) Marshal ¶
func (m *QueryDepositsResponse) Marshal() (dAtA []byte, err error)
func (*QueryDepositsResponse) MarshalTo ¶
func (m *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryDepositsResponse) MarshalToSizedBuffer ¶
func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryDepositsResponse) ProtoMessage ¶
func (*QueryDepositsResponse) ProtoMessage()
func (*QueryDepositsResponse) Reset ¶
func (m *QueryDepositsResponse) Reset()
func (*QueryDepositsResponse) Size ¶
func (m *QueryDepositsResponse) Size() (n int)
func (*QueryDepositsResponse) String ¶
func (m *QueryDepositsResponse) String() string
func (*QueryDepositsResponse) Unmarshal ¶
func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error
func (*QueryDepositsResponse) XXX_DiscardUnknown ¶
func (m *QueryDepositsResponse) XXX_DiscardUnknown()
func (*QueryDepositsResponse) XXX_Marshal ¶
func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryDepositsResponse) XXX_Merge ¶
func (m *QueryDepositsResponse) XXX_Merge(src proto.Message)
func (*QueryDepositsResponse) XXX_Size ¶
func (m *QueryDepositsResponse) XXX_Size() int
func (*QueryDepositsResponse) XXX_Unmarshal ¶
func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest defines the request type for querying x/swap parameters.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct { // params represents the swap module parameters Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse defines the response type for querying x/swap parameters.
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 QueryPoolParams ¶
type QueryPoolParams struct {
Pool string `json:"pool" yaml:"pool"`
}
QueryPoolParams is the params for a pool query
func NewQueryPoolParams ¶
func NewQueryPoolParams(pool string) QueryPoolParams
NewQueryPoolParams creates a new QueryPoolParams
type QueryPoolsRequest ¶
type QueryPoolsRequest struct { // pool_id filters pools by id PoolId string `protobuf:"bytes,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryPoolsRequest is the request type for the Query/Pools RPC method.
func (*QueryPoolsRequest) Descriptor ¶
func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
func (*QueryPoolsRequest) GetPagination ¶
func (m *QueryPoolsRequest) GetPagination() *query.PageRequest
func (*QueryPoolsRequest) GetPoolId ¶
func (m *QueryPoolsRequest) GetPoolId() string
func (*QueryPoolsRequest) Marshal ¶
func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPoolsRequest) MarshalTo ¶
func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsRequest) MarshalToSizedBuffer ¶
func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsRequest) ProtoMessage ¶
func (*QueryPoolsRequest) ProtoMessage()
func (*QueryPoolsRequest) Reset ¶
func (m *QueryPoolsRequest) Reset()
func (*QueryPoolsRequest) Size ¶
func (m *QueryPoolsRequest) Size() (n int)
func (*QueryPoolsRequest) String ¶
func (m *QueryPoolsRequest) String() string
func (*QueryPoolsRequest) Unmarshal ¶
func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
func (*QueryPoolsRequest) XXX_DiscardUnknown ¶
func (m *QueryPoolsRequest) XXX_DiscardUnknown()
func (*QueryPoolsRequest) XXX_Marshal ¶
func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsRequest) XXX_Merge ¶
func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
func (*QueryPoolsRequest) XXX_Size ¶
func (m *QueryPoolsRequest) XXX_Size() int
func (*QueryPoolsRequest) XXX_Unmarshal ¶
func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
type QueryPoolsResponse ¶
type QueryPoolsResponse struct { // pools represents returned pools Pools []PoolResponse `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"` // pagination defines the pagination in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryPoolsResponse is the response type for the Query/Pools RPC method.
func (*QueryPoolsResponse) Descriptor ¶
func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
func (*QueryPoolsResponse) GetPagination ¶
func (m *QueryPoolsResponse) GetPagination() *query.PageResponse
func (*QueryPoolsResponse) GetPools ¶
func (m *QueryPoolsResponse) GetPools() []PoolResponse
func (*QueryPoolsResponse) Marshal ¶
func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPoolsResponse) MarshalTo ¶
func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsResponse) MarshalToSizedBuffer ¶
func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsResponse) ProtoMessage ¶
func (*QueryPoolsResponse) ProtoMessage()
func (*QueryPoolsResponse) Reset ¶
func (m *QueryPoolsResponse) Reset()
func (*QueryPoolsResponse) Size ¶
func (m *QueryPoolsResponse) Size() (n int)
func (*QueryPoolsResponse) String ¶
func (m *QueryPoolsResponse) String() string
func (*QueryPoolsResponse) Unmarshal ¶
func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
func (*QueryPoolsResponse) XXX_DiscardUnknown ¶
func (m *QueryPoolsResponse) XXX_DiscardUnknown()
func (*QueryPoolsResponse) XXX_Marshal ¶
func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsResponse) XXX_Merge ¶
func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
func (*QueryPoolsResponse) XXX_Size ¶
func (m *QueryPoolsResponse) XXX_Size() int
func (*QueryPoolsResponse) XXX_Unmarshal ¶
func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries all parameters of the swap module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Pools queries pools based on pool ID Pools(context.Context, *QueryPoolsRequest) (*QueryPoolsResponse, error) // Deposits queries deposit details based on owner address and pool Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) }
QueryServer is the server API for Query service.
type ShareRecord ¶
type ShareRecord struct { github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 126-byte string literal not displayed */ PoolID string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` SharesOwned github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */ }Depositor
ShareRecord stores the shares owned for a depositor and pool
func NewShareRecord ¶
func NewShareRecord(depositor sdk.AccAddress, poolID string, sharesOwned sdkmath.Int) ShareRecord
NewShareRecord takes a depositor, poolID, and shares and returns a new share record for storage in state.
func (*ShareRecord) Descriptor ¶
func (*ShareRecord) Descriptor() ([]byte, []int)
func (*ShareRecord) GetDepositor ¶
func (m *ShareRecord) GetDepositor() github_com_cosmos_cosmos_sdk_types.AccAddress
func (*ShareRecord) GetPoolID ¶
func (m *ShareRecord) GetPoolID() string
func (*ShareRecord) Marshal ¶
func (m *ShareRecord) Marshal() (dAtA []byte, err error)
func (*ShareRecord) MarshalToSizedBuffer ¶
func (m *ShareRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ShareRecord) ProtoMessage ¶
func (*ShareRecord) ProtoMessage()
func (*ShareRecord) Reset ¶
func (m *ShareRecord) Reset()
func (*ShareRecord) Size ¶
func (m *ShareRecord) Size() (n int)
func (*ShareRecord) String ¶
func (m *ShareRecord) String() string
func (*ShareRecord) Unmarshal ¶
func (m *ShareRecord) Unmarshal(dAtA []byte) error
func (ShareRecord) Validate ¶
func (sr ShareRecord) Validate() error
Validate performs basic validation checks of the record data
func (*ShareRecord) XXX_DiscardUnknown ¶
func (m *ShareRecord) XXX_DiscardUnknown()
func (*ShareRecord) XXX_Marshal ¶
func (m *ShareRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShareRecord) XXX_Merge ¶
func (m *ShareRecord) XXX_Merge(src proto.Message)
func (*ShareRecord) XXX_Size ¶
func (m *ShareRecord) XXX_Size() int
func (*ShareRecord) XXX_Unmarshal ¶
func (m *ShareRecord) XXX_Unmarshal(b []byte) error
type ShareRecords ¶
type ShareRecords []ShareRecord
ShareRecords is a slice of ShareRecord
func (ShareRecords) Validate ¶
func (srs ShareRecords) Validate() error
Validate performs basic validation checks on all records in the slice
type SwapHooks ¶
type SwapHooks interface { AfterPoolDepositCreated(ctx sdk.Context, poolID string, depositor sdk.AccAddress, sharedOwned sdkmath.Int) BeforePoolDepositModified(ctx sdk.Context, poolID string, depositor sdk.AccAddress, sharedOwned sdkmath.Int) }
SwapHooks are event hooks called when a user's deposit to a swap pool changes.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Deposit ¶
func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error)
func (*UnimplementedMsgServer) SwapExactForTokens ¶
func (*UnimplementedMsgServer) SwapExactForTokens(ctx context.Context, req *MsgSwapExactForTokens) (*MsgSwapExactForTokensResponse, error)
func (*UnimplementedMsgServer) SwapForExactTokens ¶
func (*UnimplementedMsgServer) SwapForExactTokens(ctx context.Context, req *MsgSwapForExactTokens) (*MsgSwapForExactTokensResponse, error)
func (*UnimplementedMsgServer) Withdraw ¶
func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Deposits ¶
func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDepositsRequest) (*QueryDepositsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Pools ¶
func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)