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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.
func RegisterMsgServer ¶ added in v0.16.0
func RegisterQueryHandler ¶ added in v0.16.0
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*AllowedPool) Descriptor() ([]byte, []int)
func (*AllowedPool) GetTokenA ¶ added in v0.16.0
func (m *AllowedPool) GetTokenA() string
func (*AllowedPool) GetTokenB ¶ added in v0.16.0
func (m *AllowedPool) GetTokenB() string
func (*AllowedPool) Marshal ¶ added in v0.16.0
func (m *AllowedPool) Marshal() (dAtA []byte, err error)
func (*AllowedPool) MarshalTo ¶ added in v0.16.0
func (m *AllowedPool) MarshalTo(dAtA []byte) (int, error)
func (*AllowedPool) MarshalToSizedBuffer ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*AllowedPool) ProtoMessage()
func (*AllowedPool) Reset ¶ added in v0.16.0
func (m *AllowedPool) Reset()
func (*AllowedPool) Size ¶ added in v0.16.0
func (m *AllowedPool) Size() (n int)
func (AllowedPool) String ¶
func (p AllowedPool) String() string
String pretty prints the allowedPool
func (*AllowedPool) Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *AllowedPool) XXX_DiscardUnknown()
func (*AllowedPool) XXX_Marshal ¶ added in v0.16.0
func (m *AllowedPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllowedPool) XXX_Merge ¶ added in v0.16.0
func (m *AllowedPool) XXX_Merge(src proto.Message)
func (*AllowedPool) XXX_Size ¶ added in v0.16.0
func (m *AllowedPool) XXX_Size() int
func (*AllowedPool) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*DepositResponse) Descriptor() ([]byte, []int)
func (*DepositResponse) Marshal ¶ added in v0.16.0
func (m *DepositResponse) Marshal() (dAtA []byte, err error)
func (*DepositResponse) MarshalTo ¶ added in v0.16.0
func (m *DepositResponse) MarshalTo(dAtA []byte) (int, error)
func (*DepositResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *DepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DepositResponse) ProtoMessage ¶ added in v0.16.0
func (*DepositResponse) ProtoMessage()
func (*DepositResponse) Reset ¶ added in v0.16.0
func (m *DepositResponse) Reset()
func (*DepositResponse) Size ¶ added in v0.16.0
func (m *DepositResponse) Size() (n int)
func (*DepositResponse) String ¶ added in v0.16.0
func (m *DepositResponse) String() string
func (*DepositResponse) Unmarshal ¶ added in v0.16.0
func (m *DepositResponse) Unmarshal(dAtA []byte) error
func (*DepositResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *DepositResponse) XXX_DiscardUnknown()
func (*DepositResponse) XXX_Marshal ¶ added in v0.16.0
func (m *DepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DepositResponse) XXX_Merge ¶ added in v0.16.0
func (m *DepositResponse) XXX_Merge(src proto.Message)
func (*DepositResponse) XXX_Size ¶ added in v0.16.0
func (m *DepositResponse) XXX_Size() int
func (*DepositResponse) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶ added in v0.16.0
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPoolRecords ¶ added in v0.16.0
func (m *GenesisState) GetPoolRecords() PoolRecords
func (*GenesisState) GetShareRecords ¶ added in v0.16.0
func (m *GenesisState) GetShareRecords() ShareRecords
func (*GenesisState) Marshal ¶ added in v0.16.0
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v0.16.0
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v0.16.0
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v0.16.0
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v0.16.0
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v0.16.0
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v0.16.0
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v0.16.0
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v0.16.0
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v0.16.0
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgDeposit) Marshal() (dAtA []byte, err error)
func (*MsgDeposit) MarshalTo ¶ added in v0.16.0
func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error)
func (*MsgDeposit) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDeposit) ProtoMessage ¶ added in v0.16.0
func (*MsgDeposit) ProtoMessage()
func (*MsgDeposit) Reset ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgDeposit) Size() (n int)
func (*MsgDeposit) String ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgDeposit) XXX_DiscardUnknown()
func (*MsgDeposit) XXX_Marshal ¶ added in v0.16.0
func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDeposit) XXX_Merge ¶ added in v0.16.0
func (m *MsgDeposit) XXX_Merge(src proto.Message)
func (*MsgDeposit) XXX_Size ¶ added in v0.16.0
func (m *MsgDeposit) XXX_Size() int
func (*MsgDeposit) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgDeposit) XXX_Unmarshal(b []byte) error
type MsgDepositResponse ¶ added in v0.16.0
type MsgDepositResponse struct { }
MsgDepositResponse defines the Msg/Deposit response type.
func (*MsgDepositResponse) Descriptor ¶ added in v0.16.0
func (*MsgDepositResponse) Descriptor() ([]byte, []int)
func (*MsgDepositResponse) Marshal ¶ added in v0.16.0
func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)
func (*MsgDepositResponse) MarshalTo ¶ added in v0.16.0
func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDepositResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDepositResponse) ProtoMessage ¶ added in v0.16.0
func (*MsgDepositResponse) ProtoMessage()
func (*MsgDepositResponse) Reset ¶ added in v0.16.0
func (m *MsgDepositResponse) Reset()
func (*MsgDepositResponse) Size ¶ added in v0.16.0
func (m *MsgDepositResponse) Size() (n int)
func (*MsgDepositResponse) String ¶ added in v0.16.0
func (m *MsgDepositResponse) String() string
func (*MsgDepositResponse) Unmarshal ¶ added in v0.16.0
func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error
func (*MsgDepositResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *MsgDepositResponse) XXX_DiscardUnknown()
func (*MsgDepositResponse) XXX_Marshal ¶ added in v0.16.0
func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDepositResponse) XXX_Merge ¶ added in v0.16.0
func (m *MsgDepositResponse) XXX_Merge(src proto.Message)
func (*MsgDepositResponse) XXX_Size ¶ added in v0.16.0
func (m *MsgDepositResponse) XXX_Size() int
func (*MsgDepositResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactForTokens) MarshalTo ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactForTokens) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactForTokens) ProtoMessage ¶ added in v0.16.0
func (*MsgSwapExactForTokens) ProtoMessage()
func (*MsgSwapExactForTokens) Reset ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) Size() (n int)
func (*MsgSwapExactForTokens) String ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) XXX_DiscardUnknown()
func (*MsgSwapExactForTokens) XXX_Marshal ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactForTokens) XXX_Merge ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) XXX_Merge(src proto.Message)
func (*MsgSwapExactForTokens) XXX_Size ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) XXX_Size() int
func (*MsgSwapExactForTokens) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgSwapExactForTokens) XXX_Unmarshal(b []byte) error
type MsgSwapExactForTokensResponse ¶ added in v0.16.0
type MsgSwapExactForTokensResponse struct { }
MsgSwapExactForTokensResponse defines the Msg/SwapExactForTokens response type.
func (*MsgSwapExactForTokensResponse) Descriptor ¶ added in v0.16.0
func (*MsgSwapExactForTokensResponse) Descriptor() ([]byte, []int)
func (*MsgSwapExactForTokensResponse) Marshal ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactForTokensResponse) MarshalTo ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactForTokensResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactForTokensResponse) ProtoMessage ¶ added in v0.16.0
func (*MsgSwapExactForTokensResponse) ProtoMessage()
func (*MsgSwapExactForTokensResponse) Reset ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) Reset()
func (*MsgSwapExactForTokensResponse) Size ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) Size() (n int)
func (*MsgSwapExactForTokensResponse) String ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) String() string
func (*MsgSwapExactForTokensResponse) Unmarshal ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapExactForTokensResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) XXX_DiscardUnknown()
func (*MsgSwapExactForTokensResponse) XXX_Marshal ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactForTokensResponse) XXX_Merge ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) XXX_Merge(src proto.Message)
func (*MsgSwapExactForTokensResponse) XXX_Size ¶ added in v0.16.0
func (m *MsgSwapExactForTokensResponse) XXX_Size() int
func (*MsgSwapExactForTokensResponse) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) Marshal() (dAtA []byte, err error)
func (*MsgSwapForExactTokens) MarshalTo ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapForExactTokens) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapForExactTokens) ProtoMessage ¶ added in v0.16.0
func (*MsgSwapForExactTokens) ProtoMessage()
func (*MsgSwapForExactTokens) Reset ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) Size() (n int)
func (*MsgSwapForExactTokens) String ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) XXX_DiscardUnknown()
func (*MsgSwapForExactTokens) XXX_Marshal ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapForExactTokens) XXX_Merge ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) XXX_Merge(src proto.Message)
func (*MsgSwapForExactTokens) XXX_Size ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) XXX_Size() int
func (*MsgSwapForExactTokens) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgSwapForExactTokens) XXX_Unmarshal(b []byte) error
type MsgSwapForExactTokensResponse ¶ added in v0.16.0
type MsgSwapForExactTokensResponse struct { }
MsgSwapForExactTokensResponse defines the Msg/SwapForExactTokensResponse response type.
func (*MsgSwapForExactTokensResponse) Descriptor ¶ added in v0.16.0
func (*MsgSwapForExactTokensResponse) Descriptor() ([]byte, []int)
func (*MsgSwapForExactTokensResponse) Marshal ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapForExactTokensResponse) MarshalTo ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapForExactTokensResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapForExactTokensResponse) ProtoMessage ¶ added in v0.16.0
func (*MsgSwapForExactTokensResponse) ProtoMessage()
func (*MsgSwapForExactTokensResponse) Reset ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) Reset()
func (*MsgSwapForExactTokensResponse) Size ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) Size() (n int)
func (*MsgSwapForExactTokensResponse) String ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) String() string
func (*MsgSwapForExactTokensResponse) Unmarshal ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapForExactTokensResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) XXX_DiscardUnknown()
func (*MsgSwapForExactTokensResponse) XXX_Marshal ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapForExactTokensResponse) XXX_Merge ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) XXX_Merge(src proto.Message)
func (*MsgSwapForExactTokensResponse) XXX_Size ¶ added in v0.16.0
func (m *MsgSwapForExactTokensResponse) XXX_Size() int
func (*MsgSwapForExactTokensResponse) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgWithdraw) Marshal() (dAtA []byte, err error)
func (*MsgWithdraw) MarshalTo ¶ added in v0.16.0
func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error)
func (*MsgWithdraw) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdraw) ProtoMessage ¶ added in v0.16.0
func (*MsgWithdraw) ProtoMessage()
func (*MsgWithdraw) Reset ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgWithdraw) Size() (n int)
func (*MsgWithdraw) String ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *MsgWithdraw) XXX_DiscardUnknown()
func (*MsgWithdraw) XXX_Marshal ¶ added in v0.16.0
func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdraw) XXX_Merge ¶ added in v0.16.0
func (m *MsgWithdraw) XXX_Merge(src proto.Message)
func (*MsgWithdraw) XXX_Size ¶ added in v0.16.0
func (m *MsgWithdraw) XXX_Size() int
func (*MsgWithdraw) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error
type MsgWithdrawResponse ¶ added in v0.16.0
type MsgWithdrawResponse struct { }
MsgWithdrawResponse defines the Msg/Withdraw response type.
func (*MsgWithdrawResponse) Descriptor ¶ added in v0.16.0
func (*MsgWithdrawResponse) Descriptor() ([]byte, []int)
func (*MsgWithdrawResponse) Marshal ¶ added in v0.16.0
func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error)
func (*MsgWithdrawResponse) MarshalTo ¶ added in v0.16.0
func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgWithdrawResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdrawResponse) ProtoMessage ¶ added in v0.16.0
func (*MsgWithdrawResponse) ProtoMessage()
func (*MsgWithdrawResponse) Reset ¶ added in v0.16.0
func (m *MsgWithdrawResponse) Reset()
func (*MsgWithdrawResponse) Size ¶ added in v0.16.0
func (m *MsgWithdrawResponse) Size() (n int)
func (*MsgWithdrawResponse) String ¶ added in v0.16.0
func (m *MsgWithdrawResponse) String() string
func (*MsgWithdrawResponse) Unmarshal ¶ added in v0.16.0
func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error
func (*MsgWithdrawResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *MsgWithdrawResponse) XXX_DiscardUnknown()
func (*MsgWithdrawResponse) XXX_Marshal ¶ added in v0.16.0
func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdrawResponse) XXX_Merge ¶ added in v0.16.0
func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message)
func (*MsgWithdrawResponse) XXX_Size ¶ added in v0.16.0
func (m *MsgWithdrawResponse) XXX_Size() int
func (*MsgWithdrawResponse) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*Params) GetAllowedPools ¶ added in v0.16.0
func (m *Params) GetAllowedPools() AllowedPools
func (*Params) MarshalToSizedBuffer ¶ added in v0.16.0
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs implements params.ParamSet
func (*Params) ProtoMessage ¶ added in v0.16.0
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶ added in v0.16.0
func (*Params) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*PoolRecord) Descriptor() ([]byte, []int)
func (*PoolRecord) GetPoolID ¶ added in v0.16.0
func (m *PoolRecord) GetPoolID() string
func (*PoolRecord) GetReservesA ¶ added in v0.16.0
func (m *PoolRecord) GetReservesA() types.Coin
func (*PoolRecord) GetReservesB ¶ added in v0.16.0
func (m *PoolRecord) GetReservesB() types.Coin
func (*PoolRecord) Marshal ¶ added in v0.16.0
func (m *PoolRecord) Marshal() (dAtA []byte, err error)
func (*PoolRecord) MarshalTo ¶ added in v0.16.0
func (m *PoolRecord) MarshalTo(dAtA []byte) (int, error)
func (*PoolRecord) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *PoolRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PoolRecord) ProtoMessage ¶ added in v0.16.0
func (*PoolRecord) ProtoMessage()
func (PoolRecord) Reserves ¶
func (p PoolRecord) Reserves() sdk.Coins
Reserves returns the total reserves for a pool
func (*PoolRecord) Reset ¶ added in v0.16.0
func (m *PoolRecord) Reset()
func (*PoolRecord) Size ¶ added in v0.16.0
func (m *PoolRecord) Size() (n int)
func (*PoolRecord) String ¶ added in v0.16.0
func (m *PoolRecord) String() string
func (*PoolRecord) Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *PoolRecord) XXX_DiscardUnknown()
func (*PoolRecord) XXX_Marshal ¶ added in v0.16.0
func (m *PoolRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PoolRecord) XXX_Merge ¶ added in v0.16.0
func (m *PoolRecord) XXX_Merge(src proto.Message)
func (*PoolRecord) XXX_Size ¶ added in v0.16.0
func (m *PoolRecord) XXX_Size() int
func (*PoolRecord) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*PoolResponse) Descriptor() ([]byte, []int)
func (*PoolResponse) Marshal ¶ added in v0.16.0
func (m *PoolResponse) Marshal() (dAtA []byte, err error)
func (*PoolResponse) MarshalTo ¶ added in v0.16.0
func (m *PoolResponse) MarshalTo(dAtA []byte) (int, error)
func (*PoolResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *PoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PoolResponse) ProtoMessage ¶ added in v0.16.0
func (*PoolResponse) ProtoMessage()
func (*PoolResponse) Reset ¶ added in v0.16.0
func (m *PoolResponse) Reset()
func (*PoolResponse) Size ¶ added in v0.16.0
func (m *PoolResponse) Size() (n int)
func (*PoolResponse) String ¶ added in v0.16.0
func (m *PoolResponse) String() string
func (*PoolResponse) Unmarshal ¶ added in v0.16.0
func (m *PoolResponse) Unmarshal(dAtA []byte) error
func (*PoolResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *PoolResponse) XXX_DiscardUnknown()
func (*PoolResponse) XXX_Marshal ¶ added in v0.16.0
func (m *PoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PoolResponse) XXX_Merge ¶ added in v0.16.0
func (m *PoolResponse) XXX_Merge(src proto.Message)
func (*PoolResponse) XXX_Size ¶ added in v0.16.0
func (m *PoolResponse) XXX_Size() int
func (*PoolResponse) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*QueryDepositsRequest) Descriptor() ([]byte, []int)
func (*QueryDepositsRequest) Marshal ¶ added in v0.16.0
func (m *QueryDepositsRequest) Marshal() (dAtA []byte, err error)
func (*QueryDepositsRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryDepositsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryDepositsRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryDepositsRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryDepositsRequest) ProtoMessage()
func (*QueryDepositsRequest) Reset ¶ added in v0.16.0
func (m *QueryDepositsRequest) Reset()
func (*QueryDepositsRequest) Size ¶ added in v0.16.0
func (m *QueryDepositsRequest) Size() (n int)
func (*QueryDepositsRequest) String ¶ added in v0.16.0
func (m *QueryDepositsRequest) String() string
func (*QueryDepositsRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error
func (*QueryDepositsRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryDepositsRequest) XXX_DiscardUnknown()
func (*QueryDepositsRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryDepositsRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryDepositsRequest) XXX_Merge(src proto.Message)
func (*QueryDepositsRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryDepositsRequest) XXX_Size() int
func (*QueryDepositsRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error
type QueryDepositsResponse ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*QueryDepositsResponse) Descriptor() ([]byte, []int)
func (*QueryDepositsResponse) Marshal ¶ added in v0.16.0
func (m *QueryDepositsResponse) Marshal() (dAtA []byte, err error)
func (*QueryDepositsResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryDepositsResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryDepositsResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryDepositsResponse) ProtoMessage()
func (*QueryDepositsResponse) Reset ¶ added in v0.16.0
func (m *QueryDepositsResponse) Reset()
func (*QueryDepositsResponse) Size ¶ added in v0.16.0
func (m *QueryDepositsResponse) Size() (n int)
func (*QueryDepositsResponse) String ¶ added in v0.16.0
func (m *QueryDepositsResponse) String() string
func (*QueryDepositsResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error
func (*QueryDepositsResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryDepositsResponse) XXX_DiscardUnknown()
func (*QueryDepositsResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryDepositsResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryDepositsResponse) XXX_Merge(src proto.Message)
func (*QueryDepositsResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryDepositsResponse) XXX_Size() int
func (*QueryDepositsResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶ added in v0.16.0
type QueryParamsRequest struct { }
QueryParamsRequest defines the request type for querying x/swap parameters.
func (*QueryParamsRequest) Descriptor ¶ added in v0.16.0
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶ added in v0.16.0
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶ added in v0.16.0
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶ added in v0.16.0
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶ added in v0.16.0
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) Marshal ¶ added in v0.16.0
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶ added in v0.16.0
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶ added in v0.16.0
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶ added in v0.16.0
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*QueryPoolsRequest) Descriptor() ([]byte, []int)
func (*QueryPoolsRequest) GetPagination ¶ added in v0.16.0
func (m *QueryPoolsRequest) GetPagination() *query.PageRequest
func (*QueryPoolsRequest) GetPoolId ¶ added in v0.16.0
func (m *QueryPoolsRequest) GetPoolId() string
func (*QueryPoolsRequest) Marshal ¶ added in v0.16.0
func (m *QueryPoolsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPoolsRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryPoolsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryPoolsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryPoolsRequest) ProtoMessage()
func (*QueryPoolsRequest) Reset ¶ added in v0.16.0
func (m *QueryPoolsRequest) Reset()
func (*QueryPoolsRequest) Size ¶ added in v0.16.0
func (m *QueryPoolsRequest) Size() (n int)
func (*QueryPoolsRequest) String ¶ added in v0.16.0
func (m *QueryPoolsRequest) String() string
func (*QueryPoolsRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryPoolsRequest) Unmarshal(dAtA []byte) error
func (*QueryPoolsRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryPoolsRequest) XXX_DiscardUnknown()
func (*QueryPoolsRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryPoolsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryPoolsRequest) XXX_Merge(src proto.Message)
func (*QueryPoolsRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryPoolsRequest) XXX_Size() int
func (*QueryPoolsRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error
type QueryPoolsResponse ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*QueryPoolsResponse) Descriptor() ([]byte, []int)
func (*QueryPoolsResponse) GetPagination ¶ added in v0.16.0
func (m *QueryPoolsResponse) GetPagination() *query.PageResponse
func (*QueryPoolsResponse) GetPools ¶ added in v0.16.0
func (m *QueryPoolsResponse) GetPools() []PoolResponse
func (*QueryPoolsResponse) Marshal ¶ added in v0.16.0
func (m *QueryPoolsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPoolsResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryPoolsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPoolsResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryPoolsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPoolsResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryPoolsResponse) ProtoMessage()
func (*QueryPoolsResponse) Reset ¶ added in v0.16.0
func (m *QueryPoolsResponse) Reset()
func (*QueryPoolsResponse) Size ¶ added in v0.16.0
func (m *QueryPoolsResponse) Size() (n int)
func (*QueryPoolsResponse) String ¶ added in v0.16.0
func (m *QueryPoolsResponse) String() string
func (*QueryPoolsResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryPoolsResponse) Unmarshal(dAtA []byte) error
func (*QueryPoolsResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryPoolsResponse) XXX_DiscardUnknown()
func (*QueryPoolsResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryPoolsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPoolsResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryPoolsResponse) XXX_Merge(src proto.Message)
func (*QueryPoolsResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryPoolsResponse) XXX_Size() int
func (*QueryPoolsResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (*ShareRecord) Descriptor() ([]byte, []int)
func (*ShareRecord) GetDepositor ¶ added in v0.16.0
func (m *ShareRecord) GetDepositor() github_com_cosmos_cosmos_sdk_types.AccAddress
func (*ShareRecord) GetPoolID ¶ added in v0.16.0
func (m *ShareRecord) GetPoolID() string
func (*ShareRecord) Marshal ¶ added in v0.16.0
func (m *ShareRecord) Marshal() (dAtA []byte, err error)
func (*ShareRecord) MarshalTo ¶ added in v0.16.0
func (m *ShareRecord) MarshalTo(dAtA []byte) (int, error)
func (*ShareRecord) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *ShareRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ShareRecord) ProtoMessage ¶ added in v0.16.0
func (*ShareRecord) ProtoMessage()
func (*ShareRecord) Reset ¶ added in v0.16.0
func (m *ShareRecord) Reset()
func (*ShareRecord) Size ¶ added in v0.16.0
func (m *ShareRecord) Size() (n int)
func (*ShareRecord) String ¶ added in v0.16.0
func (m *ShareRecord) String() string
func (*ShareRecord) Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
func (m *ShareRecord) XXX_DiscardUnknown()
func (*ShareRecord) XXX_Marshal ¶ added in v0.16.0
func (m *ShareRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShareRecord) XXX_Merge ¶ added in v0.16.0
func (m *ShareRecord) XXX_Merge(src proto.Message)
func (*ShareRecord) XXX_Size ¶ added in v0.16.0
func (m *ShareRecord) XXX_Size() int
func (*ShareRecord) XXX_Unmarshal ¶ added in v0.16.0
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 ¶ added in v0.16.0
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Deposit ¶ added in v0.16.0
func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error)
func (*UnimplementedMsgServer) SwapExactForTokens ¶ added in v0.16.0
func (*UnimplementedMsgServer) SwapExactForTokens(ctx context.Context, req *MsgSwapExactForTokens) (*MsgSwapExactForTokensResponse, error)
func (*UnimplementedMsgServer) SwapForExactTokens ¶ added in v0.16.0
func (*UnimplementedMsgServer) SwapForExactTokens(ctx context.Context, req *MsgSwapForExactTokens) (*MsgSwapForExactTokensResponse, error)
func (*UnimplementedMsgServer) Withdraw ¶ added in v0.16.0
func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error)
type UnimplementedQueryServer ¶ added in v0.16.0
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Deposits ¶ added in v0.16.0
func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDepositsRequest) (*QueryDepositsResponse, error)
func (*UnimplementedQueryServer) Params ¶ added in v0.16.0
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Pools ¶ added in v0.16.0
func (*UnimplementedQueryServer) Pools(ctx context.Context, req *QueryPoolsRequest) (*QueryPoolsResponse, error)