Documentation ¶
Index ¶
- Constants
- Variables
- func FormatModuleRouteKey(poolId uint64) []byte
- func NewPoolAddress(poolId uint64) sdk.AccAddress
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func ValidateSwapAmountInSplitRoute(splitRoutes []SwapAmountInSplitRoute) error
- func ValidateSwapAmountOutSplitRoute(splitRoutes []SwapAmountOutSplitRoute) error
- type AccountI
- type BankI
- type CommunityPoolI
- type CreatePoolMsg
- type FailedToFindRouteError
- type FinalAmountIsNotPositiveError
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetNextPoolId() uint64
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPoolRoutes() []ModuleRoute
- 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 InactivePoolError
- type IncorrectPoolAddressError
- type IncorrectPoolIdError
- type InvalidFinalTokenOutError
- type InvalidPoolCreatorError
- type InvalidPoolTypeError
- type InvalidSenderError
- type ModuleRoute
- func (*ModuleRoute) Descriptor() ([]byte, []int)
- func (m *ModuleRoute) GetPoolId() uint64
- func (m *ModuleRoute) GetPoolType() PoolType
- func (m *ModuleRoute) Marshal() (dAtA []byte, err error)
- func (m *ModuleRoute) MarshalTo(dAtA []byte) (int, error)
- func (m *ModuleRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModuleRoute) ProtoMessage()
- func (m *ModuleRoute) Reset()
- func (m *ModuleRoute) Size() (n int)
- func (m *ModuleRoute) String() string
- func (m *ModuleRoute) Unmarshal(dAtA []byte) error
- func (m *ModuleRoute) XXX_DiscardUnknown()
- func (m *ModuleRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModuleRoute) XXX_Merge(src proto.Message)
- func (m *ModuleRoute) XXX_Size() int
- func (m *ModuleRoute) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgSplitRouteSwapExactAmountIn
- func (*MsgSplitRouteSwapExactAmountIn) Descriptor() ([]byte, []int)
- func (m *MsgSplitRouteSwapExactAmountIn) GetRoutes() []SwapAmountInSplitRoute
- func (m *MsgSplitRouteSwapExactAmountIn) GetSender() string
- func (msg MsgSplitRouteSwapExactAmountIn) GetSignBytes() []byte
- func (msg MsgSplitRouteSwapExactAmountIn) GetSigners() []sdk.AccAddress
- func (m *MsgSplitRouteSwapExactAmountIn) GetTokenInDenom() string
- func (m *MsgSplitRouteSwapExactAmountIn) Marshal() (dAtA []byte, err error)
- func (m *MsgSplitRouteSwapExactAmountIn) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSplitRouteSwapExactAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSplitRouteSwapExactAmountIn) ProtoMessage()
- func (m *MsgSplitRouteSwapExactAmountIn) Reset()
- func (msg MsgSplitRouteSwapExactAmountIn) Route() string
- func (m *MsgSplitRouteSwapExactAmountIn) Size() (n int)
- func (m *MsgSplitRouteSwapExactAmountIn) String() string
- func (msg MsgSplitRouteSwapExactAmountIn) Type() string
- func (m *MsgSplitRouteSwapExactAmountIn) Unmarshal(dAtA []byte) error
- func (msg MsgSplitRouteSwapExactAmountIn) ValidateBasic() error
- func (m *MsgSplitRouteSwapExactAmountIn) XXX_DiscardUnknown()
- func (m *MsgSplitRouteSwapExactAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSplitRouteSwapExactAmountIn) XXX_Merge(src proto.Message)
- func (m *MsgSplitRouteSwapExactAmountIn) XXX_Size() int
- func (m *MsgSplitRouteSwapExactAmountIn) XXX_Unmarshal(b []byte) error
- type MsgSplitRouteSwapExactAmountInResponse
- func (*MsgSplitRouteSwapExactAmountInResponse) Descriptor() ([]byte, []int)
- func (m *MsgSplitRouteSwapExactAmountInResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSplitRouteSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSplitRouteSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSplitRouteSwapExactAmountInResponse) ProtoMessage()
- func (m *MsgSplitRouteSwapExactAmountInResponse) Reset()
- func (m *MsgSplitRouteSwapExactAmountInResponse) Size() (n int)
- func (m *MsgSplitRouteSwapExactAmountInResponse) String() string
- func (m *MsgSplitRouteSwapExactAmountInResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_DiscardUnknown()
- func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Merge(src proto.Message)
- func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Size() int
- func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error
- type MsgSplitRouteSwapExactAmountOut
- func (*MsgSplitRouteSwapExactAmountOut) Descriptor() ([]byte, []int)
- func (m *MsgSplitRouteSwapExactAmountOut) GetRoutes() []SwapAmountOutSplitRoute
- func (m *MsgSplitRouteSwapExactAmountOut) GetSender() string
- func (msg MsgSplitRouteSwapExactAmountOut) GetSignBytes() []byte
- func (msg MsgSplitRouteSwapExactAmountOut) GetSigners() []sdk.AccAddress
- func (m *MsgSplitRouteSwapExactAmountOut) GetTokenOutDenom() string
- func (m *MsgSplitRouteSwapExactAmountOut) Marshal() (dAtA []byte, err error)
- func (m *MsgSplitRouteSwapExactAmountOut) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSplitRouteSwapExactAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSplitRouteSwapExactAmountOut) ProtoMessage()
- func (m *MsgSplitRouteSwapExactAmountOut) Reset()
- func (msg MsgSplitRouteSwapExactAmountOut) Route() string
- func (m *MsgSplitRouteSwapExactAmountOut) Size() (n int)
- func (m *MsgSplitRouteSwapExactAmountOut) String() string
- func (msg MsgSplitRouteSwapExactAmountOut) Type() string
- func (m *MsgSplitRouteSwapExactAmountOut) Unmarshal(dAtA []byte) error
- func (msg MsgSplitRouteSwapExactAmountOut) ValidateBasic() error
- func (m *MsgSplitRouteSwapExactAmountOut) XXX_DiscardUnknown()
- func (m *MsgSplitRouteSwapExactAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSplitRouteSwapExactAmountOut) XXX_Merge(src proto.Message)
- func (m *MsgSplitRouteSwapExactAmountOut) XXX_Size() int
- func (m *MsgSplitRouteSwapExactAmountOut) XXX_Unmarshal(b []byte) error
- type MsgSplitRouteSwapExactAmountOutResponse
- func (*MsgSplitRouteSwapExactAmountOutResponse) Descriptor() ([]byte, []int)
- func (m *MsgSplitRouteSwapExactAmountOutResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSplitRouteSwapExactAmountOutResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSplitRouteSwapExactAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSplitRouteSwapExactAmountOutResponse) ProtoMessage()
- func (m *MsgSplitRouteSwapExactAmountOutResponse) Reset()
- func (m *MsgSplitRouteSwapExactAmountOutResponse) Size() (n int)
- func (m *MsgSplitRouteSwapExactAmountOutResponse) String() string
- func (m *MsgSplitRouteSwapExactAmountOutResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_DiscardUnknown()
- func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Merge(src proto.Message)
- func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Size() int
- func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error
- type MsgSwapExactAmountIn
- func (*MsgSwapExactAmountIn) Descriptor() ([]byte, []int)
- func (m *MsgSwapExactAmountIn) GetRoutes() []SwapAmountInRoute
- func (m *MsgSwapExactAmountIn) GetSender() string
- func (msg MsgSwapExactAmountIn) GetSignBytes() []byte
- func (msg MsgSwapExactAmountIn) GetSigners() []sdk.AccAddress
- func (m *MsgSwapExactAmountIn) GetTokenIn() types.Coin
- func (m *MsgSwapExactAmountIn) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapExactAmountIn) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapExactAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapExactAmountIn) ProtoMessage()
- func (m *MsgSwapExactAmountIn) Reset()
- func (msg MsgSwapExactAmountIn) Route() string
- func (m *MsgSwapExactAmountIn) Size() (n int)
- func (m *MsgSwapExactAmountIn) String() string
- func (msg MsgSwapExactAmountIn) Type() string
- func (m *MsgSwapExactAmountIn) Unmarshal(dAtA []byte) error
- func (msg MsgSwapExactAmountIn) ValidateBasic() error
- func (m *MsgSwapExactAmountIn) XXX_DiscardUnknown()
- func (m *MsgSwapExactAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapExactAmountIn) XXX_Merge(src proto.Message)
- func (m *MsgSwapExactAmountIn) XXX_Size() int
- func (m *MsgSwapExactAmountIn) XXX_Unmarshal(b []byte) error
- type MsgSwapExactAmountInResponse
- func (*MsgSwapExactAmountInResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapExactAmountInResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapExactAmountInResponse) ProtoMessage()
- func (m *MsgSwapExactAmountInResponse) Reset()
- func (m *MsgSwapExactAmountInResponse) Size() (n int)
- func (m *MsgSwapExactAmountInResponse) String() string
- func (m *MsgSwapExactAmountInResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapExactAmountInResponse) XXX_DiscardUnknown()
- func (m *MsgSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapExactAmountInResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapExactAmountInResponse) XXX_Size() int
- func (m *MsgSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error
- type MsgSwapExactAmountOut
- func (*MsgSwapExactAmountOut) Descriptor() ([]byte, []int)
- func (m *MsgSwapExactAmountOut) GetRoutes() []SwapAmountOutRoute
- func (m *MsgSwapExactAmountOut) GetSender() string
- func (msg MsgSwapExactAmountOut) GetSignBytes() []byte
- func (msg MsgSwapExactAmountOut) GetSigners() []sdk.AccAddress
- func (m *MsgSwapExactAmountOut) GetTokenOut() types.Coin
- func (m *MsgSwapExactAmountOut) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapExactAmountOut) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapExactAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapExactAmountOut) ProtoMessage()
- func (m *MsgSwapExactAmountOut) Reset()
- func (msg MsgSwapExactAmountOut) Route() string
- func (m *MsgSwapExactAmountOut) Size() (n int)
- func (m *MsgSwapExactAmountOut) String() string
- func (msg MsgSwapExactAmountOut) Type() string
- func (m *MsgSwapExactAmountOut) Unmarshal(dAtA []byte) error
- func (msg MsgSwapExactAmountOut) ValidateBasic() error
- func (m *MsgSwapExactAmountOut) XXX_DiscardUnknown()
- func (m *MsgSwapExactAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapExactAmountOut) XXX_Merge(src proto.Message)
- func (m *MsgSwapExactAmountOut) XXX_Size() int
- func (m *MsgSwapExactAmountOut) XXX_Unmarshal(b []byte) error
- type MsgSwapExactAmountOutResponse
- func (*MsgSwapExactAmountOutResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapExactAmountOutResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapExactAmountOutResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapExactAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapExactAmountOutResponse) ProtoMessage()
- func (m *MsgSwapExactAmountOutResponse) Reset()
- func (m *MsgSwapExactAmountOutResponse) Size() (n int)
- func (m *MsgSwapExactAmountOutResponse) String() string
- func (m *MsgSwapExactAmountOutResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapExactAmountOutResponse) XXX_DiscardUnknown()
- func (m *MsgSwapExactAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapExactAmountOutResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapExactAmountOutResponse) XXX_Size() int
- func (m *MsgSwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error
- type MultihopRoute
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetPoolCreationFee() github_com_cosmos_cosmos_sdk_types.Coins
- 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 (m *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 PoolI
- type PoolIncentivesKeeperI
- type PoolModuleI
- type PoolType
- type PriceImpactProtectionExactInError
- type PriceImpactProtectionExactOutError
- type SwapAmountInRoute
- func (*SwapAmountInRoute) Descriptor() ([]byte, []int)
- func (m *SwapAmountInRoute) GetPoolId() uint64
- func (m *SwapAmountInRoute) GetTokenOutDenom() string
- func (m *SwapAmountInRoute) Marshal() (dAtA []byte, err error)
- func (m *SwapAmountInRoute) MarshalTo(dAtA []byte) (int, error)
- func (m *SwapAmountInRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SwapAmountInRoute) ProtoMessage()
- func (m *SwapAmountInRoute) Reset()
- func (m *SwapAmountInRoute) Size() (n int)
- func (m *SwapAmountInRoute) String() string
- func (m *SwapAmountInRoute) Unmarshal(dAtA []byte) error
- func (m *SwapAmountInRoute) XXX_DiscardUnknown()
- func (m *SwapAmountInRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SwapAmountInRoute) XXX_Merge(src proto.Message)
- func (m *SwapAmountInRoute) XXX_Size() int
- func (m *SwapAmountInRoute) XXX_Unmarshal(b []byte) error
- type SwapAmountInRoutes
- type SwapAmountInSplitRoute
- func (*SwapAmountInSplitRoute) Descriptor() ([]byte, []int)
- func (m *SwapAmountInSplitRoute) GetPools() []SwapAmountInRoute
- func (m *SwapAmountInSplitRoute) Marshal() (dAtA []byte, err error)
- func (m *SwapAmountInSplitRoute) MarshalTo(dAtA []byte) (int, error)
- func (m *SwapAmountInSplitRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SwapAmountInSplitRoute) ProtoMessage()
- func (m *SwapAmountInSplitRoute) Reset()
- func (m *SwapAmountInSplitRoute) Size() (n int)
- func (m *SwapAmountInSplitRoute) String() string
- func (m *SwapAmountInSplitRoute) Unmarshal(dAtA []byte) error
- func (m *SwapAmountInSplitRoute) XXX_DiscardUnknown()
- func (m *SwapAmountInSplitRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SwapAmountInSplitRoute) XXX_Merge(src proto.Message)
- func (m *SwapAmountInSplitRoute) XXX_Size() int
- func (m *SwapAmountInSplitRoute) XXX_Unmarshal(b []byte) error
- type SwapAmountOutRoute
- func (*SwapAmountOutRoute) Descriptor() ([]byte, []int)
- func (m *SwapAmountOutRoute) GetPoolId() uint64
- func (m *SwapAmountOutRoute) GetTokenInDenom() string
- func (m *SwapAmountOutRoute) Marshal() (dAtA []byte, err error)
- func (m *SwapAmountOutRoute) MarshalTo(dAtA []byte) (int, error)
- func (m *SwapAmountOutRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SwapAmountOutRoute) ProtoMessage()
- func (m *SwapAmountOutRoute) Reset()
- func (m *SwapAmountOutRoute) Size() (n int)
- func (m *SwapAmountOutRoute) String() string
- func (m *SwapAmountOutRoute) Unmarshal(dAtA []byte) error
- func (m *SwapAmountOutRoute) XXX_DiscardUnknown()
- func (m *SwapAmountOutRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SwapAmountOutRoute) XXX_Merge(src proto.Message)
- func (m *SwapAmountOutRoute) XXX_Size() int
- func (m *SwapAmountOutRoute) XXX_Unmarshal(b []byte) error
- type SwapAmountOutRoutes
- type SwapAmountOutSplitRoute
- func (*SwapAmountOutSplitRoute) Descriptor() ([]byte, []int)
- func (m *SwapAmountOutSplitRoute) GetPools() []SwapAmountOutRoute
- func (m *SwapAmountOutSplitRoute) Marshal() (dAtA []byte, err error)
- func (m *SwapAmountOutSplitRoute) MarshalTo(dAtA []byte) (int, error)
- func (m *SwapAmountOutSplitRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SwapAmountOutSplitRoute) ProtoMessage()
- func (m *SwapAmountOutSplitRoute) Reset()
- func (m *SwapAmountOutSplitRoute) Size() (n int)
- func (m *SwapAmountOutSplitRoute) String() string
- func (m *SwapAmountOutSplitRoute) Unmarshal(dAtA []byte) error
- func (m *SwapAmountOutSplitRoute) XXX_DiscardUnknown()
- func (m *SwapAmountOutSplitRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SwapAmountOutSplitRoute) XXX_Merge(src proto.Message)
- func (m *SwapAmountOutSplitRoute) XXX_Size() int
- func (m *SwapAmountOutSplitRoute) XXX_Unmarshal(b []byte) error
- type UndefinedRouteError
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) SplitRouteSwapExactAmountIn(ctx context.Context, req *MsgSplitRouteSwapExactAmountIn) (*MsgSplitRouteSwapExactAmountInResponse, error)
- func (*UnimplementedMsgServer) SplitRouteSwapExactAmountOut(ctx context.Context, req *MsgSplitRouteSwapExactAmountOut) (*MsgSplitRouteSwapExactAmountOutResponse, error)
- func (*UnimplementedMsgServer) SwapExactAmountIn(ctx context.Context, req *MsgSwapExactAmountIn) (*MsgSwapExactAmountInResponse, error)
- func (*UnimplementedMsgServer) SwapExactAmountOut(ctx context.Context, req *MsgSwapExactAmountOut) (*MsgSwapExactAmountOutResponse, error)
Constants ¶
const ( AttributeValueCategory = ModuleName TypeEvtPoolCreated = "pool_created" TypeEvtSplitRouteSwapExactIn = "split_route_swap_exact_in" AttributeKeyTokensIn = "tokens_in" AttributeKeyTokensOut = "tokens_out" AttributeKeyPoolId = "pool_id" )
const ( ModuleName = "poolmanager" StoreKey = ModuleName RouterKey = ModuleName )
const ( TypeMsgSwapExactAmountIn = "swap_exact_amount_in" TypeMsgSwapExactAmountOut = "swap_exact_amount_out" TypeMsgSplitRouteSwapExactAmountIn = "split_route_swap_exact_amount_in" TypeMsgSplitRouteSwapExactAmountOut = "split_route_swap_exact_amount_out" )
constants.
Variables ¶
var ( ErrEmptyRoutes = errors.New("provided empty routes") ErrTooFewPoolAssets = errors.New("pool should have at least 2 assets, as they must be swapping between at least two assets") ErrTooManyPoolAssets = errors.New("pool has too many assets (currently capped at 8 assets per pool)") ErrDuplicateRoutesNotAllowed = errors.New("duplicate multihop routes are not allowed") )
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 ( // KeyNextGlobalPoolId defines key to store the next Pool ID to be used. KeyNextGlobalPoolId = []byte{0x01} // SwapModuleRouterPrefix defines prefix to store pool id to swap module mappings. SwapModuleRouterPrefix = []byte{0x02} )
var ( ErrInvalidLengthModuleRoute = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowModuleRoute = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupModuleRoute = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSwapRoute = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSwapRoute = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSwapRoute = 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 (
KeyPoolCreationFee = []byte("PoolCreationFee")
)
Parameter store keys.
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
var PoolType_name = map[int32]string{
0: "Balancer",
1: "Stableswap",
2: "Concentrated",
3: "CosmWasm",
}
var PoolType_value = map[string]int32{
"Balancer": 0,
"Stableswap": 1,
"Concentrated": 2,
"CosmWasm": 3,
}
Functions ¶
func FormatModuleRouteKey ¶
ModuleRouteToBytes serializes moduleRoute to bytes.
func NewPoolAddress ¶
func NewPoolAddress(poolId uint64) sdk.AccAddress
NewPoolAddress returns an address for a pool from a given id.
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/gamm interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterMsgServer ¶
func ValidateSwapAmountInSplitRoute ¶
func ValidateSwapAmountInSplitRoute(splitRoutes []SwapAmountInSplitRoute) error
ValidateSwapAmountInSplitRoute validates a slice of SwapAmountInSplitRoute.
returns an error if any of the following are true: - the slice is empty - any SwapAmountInRoute in the slice is invalid - the last TokenOutDenom of any SwapAmountInRoute in the slice does not match the TokenOutDenom of the previous SwapAmountInRoute in the slice - there are duplicate SwapAmountInRoutes in the slice
func ValidateSwapAmountOutSplitRoute ¶
func ValidateSwapAmountOutSplitRoute(splitRoutes []SwapAmountOutSplitRoute) error
ValidateSwapAmountOutSplitRoute validates a slice of SwapAmountOutSplitRoute and returns an error if any of the following are true: - the slice is empty - any SwapAmountOutRoute in the slice is invalid - the first TokenInDenom of any SwapAmountOutRoute in the slice does not match the TokenInDenom of the previous SwapAmountOutRoute in the slice - there are duplicate SwapAmountOutRoutes in the slice
Types ¶
type AccountI ¶
type AccountI interface { GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI SetAccount(ctx sdk.Context, acc authtypes.AccountI) }
AccountI defines the account contract that must be fulfilled when creating a x/gamm keeper.
type BankI ¶
type BankI interface { SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata) }
BankI defines the banking contract that must be fulfilled when creating a x/gamm keeper.
type CommunityPoolI ¶
type CommunityPoolI interface {
FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}
CommunityPoolI defines the contract needed to be fulfilled for distribution keeper.
type CreatePoolMsg ¶
type CreatePoolMsg interface { // GetPoolType returns the type of the pool to create. GetPoolType() PoolType // The creator of the pool, who pays the PoolCreationFee, provides initial liquidity, // and gets the initial LP shares. PoolCreator() sdk.AccAddress // A stateful validation function. Validate(ctx sdk.Context) error // Initial Liquidity for the pool that the sender is required to send to the pool account InitialLiquidity() sdk.Coins // CreatePool creates a pool implementing PoolI, using data from the message. CreatePool(ctx sdk.Context, poolID uint64) (PoolI, error) }
CreatePoolMsg defines an interface that every CreatePool transaction should implement. The gamm logic will use this to create a pool.
type FailedToFindRouteError ¶
type FailedToFindRouteError struct {
PoolId uint64
}
func (FailedToFindRouteError) Error ¶
func (e FailedToFindRouteError) Error() string
type FinalAmountIsNotPositiveError ¶
func (FinalAmountIsNotPositiveError) Error ¶
func (e FinalAmountIsNotPositiveError) Error() string
type GenesisState ¶
type GenesisState struct { // the next_pool_id NextPoolId uint64 `protobuf:"varint,1,opt,name=next_pool_id,json=nextPoolId,proto3" json:"next_pool_id,omitempty"` // params is the container of poolmanager parameters. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` // pool_routes is the container of the mappings from pool id to pool type. PoolRoutes []ModuleRoute `protobuf:"bytes,3,rep,name=pool_routes,json=poolRoutes,proto3" json:"pool_routes"` }
GenesisState defines the poolmanager module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default poolmanager genesis state.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetNextPoolId ¶
func (m *GenesisState) GetNextPoolId() uint64
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPoolRoutes ¶
func (m *GenesisState) GetPoolRoutes() []ModuleRoute
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type InactivePoolError ¶
type InactivePoolError struct {
PoolId uint64
}
func (InactivePoolError) Error ¶
func (e InactivePoolError) Error() string
type IncorrectPoolAddressError ¶
func (IncorrectPoolAddressError) Error ¶
func (e IncorrectPoolAddressError) Error() string
type IncorrectPoolIdError ¶
func (IncorrectPoolIdError) Error ¶
func (e IncorrectPoolIdError) Error() string
type InvalidFinalTokenOutError ¶
func (InvalidFinalTokenOutError) Error ¶
func (e InvalidFinalTokenOutError) Error() string
type InvalidPoolCreatorError ¶
type InvalidPoolCreatorError struct {
CreatorAddresss string
}
func (InvalidPoolCreatorError) Error ¶
func (e InvalidPoolCreatorError) Error() string
type InvalidPoolTypeError ¶
type InvalidPoolTypeError struct {
PoolType PoolType
}
func (InvalidPoolTypeError) Error ¶
func (e InvalidPoolTypeError) Error() string
type InvalidSenderError ¶
type InvalidSenderError struct {
Sender string
}
func (InvalidSenderError) Error ¶
func (e InvalidSenderError) Error() string
type ModuleRoute ¶
type ModuleRoute struct { // pool_type specifies the type of the pool PoolType PoolType `` /* 128-byte string literal not displayed */ PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` }
ModuleRouter defines a route encapsulating pool type. It is used as the value of a mapping from pool id to the pool type, allowing the pool manager to know which module to route swaps to given the pool id.
func ParseModuleRouteFromBz ¶
func ParseModuleRouteFromBz(bz []byte) (ModuleRoute, error)
ParseModuleRouteFromBz parses the raw bytes into ModuleRoute. Returns error if fails to parse or if the bytes are empty.
func (*ModuleRoute) Descriptor ¶
func (*ModuleRoute) Descriptor() ([]byte, []int)
func (*ModuleRoute) GetPoolId ¶
func (m *ModuleRoute) GetPoolId() uint64
func (*ModuleRoute) GetPoolType ¶
func (m *ModuleRoute) GetPoolType() PoolType
func (*ModuleRoute) Marshal ¶
func (m *ModuleRoute) Marshal() (dAtA []byte, err error)
func (*ModuleRoute) MarshalToSizedBuffer ¶
func (m *ModuleRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModuleRoute) ProtoMessage ¶
func (*ModuleRoute) ProtoMessage()
func (*ModuleRoute) Reset ¶
func (m *ModuleRoute) Reset()
func (*ModuleRoute) Size ¶
func (m *ModuleRoute) Size() (n int)
func (*ModuleRoute) String ¶
func (m *ModuleRoute) String() string
func (*ModuleRoute) Unmarshal ¶
func (m *ModuleRoute) Unmarshal(dAtA []byte) error
func (*ModuleRoute) XXX_DiscardUnknown ¶
func (m *ModuleRoute) XXX_DiscardUnknown()
func (*ModuleRoute) XXX_Marshal ¶
func (m *ModuleRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ModuleRoute) XXX_Merge ¶
func (m *ModuleRoute) XXX_Merge(src proto.Message)
func (*ModuleRoute) XXX_Size ¶
func (m *ModuleRoute) XXX_Size() int
func (*ModuleRoute) XXX_Unmarshal ¶
func (m *ModuleRoute) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { SwapExactAmountIn(ctx context.Context, in *MsgSwapExactAmountIn, opts ...grpc.CallOption) (*MsgSwapExactAmountInResponse, error) SwapExactAmountOut(ctx context.Context, in *MsgSwapExactAmountOut, opts ...grpc.CallOption) (*MsgSwapExactAmountOutResponse, error) SplitRouteSwapExactAmountIn(ctx context.Context, in *MsgSplitRouteSwapExactAmountIn, opts ...grpc.CallOption) (*MsgSplitRouteSwapExactAmountInResponse, error) SplitRouteSwapExactAmountOut(ctx context.Context, in *MsgSplitRouteSwapExactAmountOut, opts ...grpc.CallOption) (*MsgSplitRouteSwapExactAmountOutResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface { SwapExactAmountIn(context.Context, *MsgSwapExactAmountIn) (*MsgSwapExactAmountInResponse, error) SwapExactAmountOut(context.Context, *MsgSwapExactAmountOut) (*MsgSwapExactAmountOutResponse, error) SplitRouteSwapExactAmountIn(context.Context, *MsgSplitRouteSwapExactAmountIn) (*MsgSplitRouteSwapExactAmountInResponse, error) SplitRouteSwapExactAmountOut(context.Context, *MsgSplitRouteSwapExactAmountOut) (*MsgSplitRouteSwapExactAmountOutResponse, error) }
MsgServer is the server API for Msg service.
type MsgSplitRouteSwapExactAmountIn ¶
type MsgSplitRouteSwapExactAmountIn struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` Routes []SwapAmountInSplitRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` TokenInDenom string `protobuf:"bytes,3,opt,name=token_in_denom,json=tokenInDenom,proto3" json:"token_in_denom,omitempty" yaml:"token_in_denom"` TokenOutMinAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 184-byte string literal not displayed */ }
===================== MsgSplitRouteSwapExactAmountIn
func (*MsgSplitRouteSwapExactAmountIn) Descriptor ¶
func (*MsgSplitRouteSwapExactAmountIn) Descriptor() ([]byte, []int)
func (*MsgSplitRouteSwapExactAmountIn) GetRoutes ¶
func (m *MsgSplitRouteSwapExactAmountIn) GetRoutes() []SwapAmountInSplitRoute
func (*MsgSplitRouteSwapExactAmountIn) GetSender ¶
func (m *MsgSplitRouteSwapExactAmountIn) GetSender() string
func (MsgSplitRouteSwapExactAmountIn) GetSignBytes ¶
func (msg MsgSplitRouteSwapExactAmountIn) GetSignBytes() []byte
func (MsgSplitRouteSwapExactAmountIn) GetSigners ¶
func (msg MsgSplitRouteSwapExactAmountIn) GetSigners() []sdk.AccAddress
func (*MsgSplitRouteSwapExactAmountIn) GetTokenInDenom ¶
func (m *MsgSplitRouteSwapExactAmountIn) GetTokenInDenom() string
func (*MsgSplitRouteSwapExactAmountIn) Marshal ¶
func (m *MsgSplitRouteSwapExactAmountIn) Marshal() (dAtA []byte, err error)
func (*MsgSplitRouteSwapExactAmountIn) MarshalTo ¶
func (m *MsgSplitRouteSwapExactAmountIn) MarshalTo(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountIn) MarshalToSizedBuffer ¶
func (m *MsgSplitRouteSwapExactAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountIn) ProtoMessage ¶
func (*MsgSplitRouteSwapExactAmountIn) ProtoMessage()
func (*MsgSplitRouteSwapExactAmountIn) Reset ¶
func (m *MsgSplitRouteSwapExactAmountIn) Reset()
func (MsgSplitRouteSwapExactAmountIn) Route ¶
func (msg MsgSplitRouteSwapExactAmountIn) Route() string
func (*MsgSplitRouteSwapExactAmountIn) Size ¶
func (m *MsgSplitRouteSwapExactAmountIn) Size() (n int)
func (*MsgSplitRouteSwapExactAmountIn) String ¶
func (m *MsgSplitRouteSwapExactAmountIn) String() string
func (MsgSplitRouteSwapExactAmountIn) Type ¶
func (msg MsgSplitRouteSwapExactAmountIn) Type() string
func (*MsgSplitRouteSwapExactAmountIn) Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountIn) Unmarshal(dAtA []byte) error
func (MsgSplitRouteSwapExactAmountIn) ValidateBasic ¶
func (msg MsgSplitRouteSwapExactAmountIn) ValidateBasic() error
func (*MsgSplitRouteSwapExactAmountIn) XXX_DiscardUnknown ¶
func (m *MsgSplitRouteSwapExactAmountIn) XXX_DiscardUnknown()
func (*MsgSplitRouteSwapExactAmountIn) XXX_Marshal ¶
func (m *MsgSplitRouteSwapExactAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSplitRouteSwapExactAmountIn) XXX_Merge ¶
func (m *MsgSplitRouteSwapExactAmountIn) XXX_Merge(src proto.Message)
func (*MsgSplitRouteSwapExactAmountIn) XXX_Size ¶
func (m *MsgSplitRouteSwapExactAmountIn) XXX_Size() int
func (*MsgSplitRouteSwapExactAmountIn) XXX_Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountIn) XXX_Unmarshal(b []byte) error
type MsgSplitRouteSwapExactAmountInResponse ¶
type MsgSplitRouteSwapExactAmountInResponse struct {
TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */
}
func (*MsgSplitRouteSwapExactAmountInResponse) Descriptor ¶
func (*MsgSplitRouteSwapExactAmountInResponse) Descriptor() ([]byte, []int)
func (*MsgSplitRouteSwapExactAmountInResponse) Marshal ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) Marshal() (dAtA []byte, err error)
func (*MsgSplitRouteSwapExactAmountInResponse) MarshalTo ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountInResponse) MarshalToSizedBuffer ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountInResponse) ProtoMessage ¶
func (*MsgSplitRouteSwapExactAmountInResponse) ProtoMessage()
func (*MsgSplitRouteSwapExactAmountInResponse) Reset ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) Reset()
func (*MsgSplitRouteSwapExactAmountInResponse) Size ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) Size() (n int)
func (*MsgSplitRouteSwapExactAmountInResponse) String ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) String() string
func (*MsgSplitRouteSwapExactAmountInResponse) Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) Unmarshal(dAtA []byte) error
func (*MsgSplitRouteSwapExactAmountInResponse) XXX_DiscardUnknown ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_DiscardUnknown()
func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Marshal ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Merge ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Merge(src proto.Message)
func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Size ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Size() int
func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error
type MsgSplitRouteSwapExactAmountOut ¶
type MsgSplitRouteSwapExactAmountOut struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` Routes []SwapAmountOutSplitRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` TokenOutDenom string `protobuf:"bytes,3,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty" yaml:"token_out_denom"` TokenInMaxAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 180-byte string literal not displayed */ }
===================== MsgSplitRouteSwapExactAmountOut
func (*MsgSplitRouteSwapExactAmountOut) Descriptor ¶
func (*MsgSplitRouteSwapExactAmountOut) Descriptor() ([]byte, []int)
func (*MsgSplitRouteSwapExactAmountOut) GetRoutes ¶
func (m *MsgSplitRouteSwapExactAmountOut) GetRoutes() []SwapAmountOutSplitRoute
func (*MsgSplitRouteSwapExactAmountOut) GetSender ¶
func (m *MsgSplitRouteSwapExactAmountOut) GetSender() string
func (MsgSplitRouteSwapExactAmountOut) GetSignBytes ¶
func (msg MsgSplitRouteSwapExactAmountOut) GetSignBytes() []byte
func (MsgSplitRouteSwapExactAmountOut) GetSigners ¶
func (msg MsgSplitRouteSwapExactAmountOut) GetSigners() []sdk.AccAddress
func (*MsgSplitRouteSwapExactAmountOut) GetTokenOutDenom ¶
func (m *MsgSplitRouteSwapExactAmountOut) GetTokenOutDenom() string
func (*MsgSplitRouteSwapExactAmountOut) Marshal ¶
func (m *MsgSplitRouteSwapExactAmountOut) Marshal() (dAtA []byte, err error)
func (*MsgSplitRouteSwapExactAmountOut) MarshalTo ¶
func (m *MsgSplitRouteSwapExactAmountOut) MarshalTo(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountOut) MarshalToSizedBuffer ¶
func (m *MsgSplitRouteSwapExactAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountOut) ProtoMessage ¶
func (*MsgSplitRouteSwapExactAmountOut) ProtoMessage()
func (*MsgSplitRouteSwapExactAmountOut) Reset ¶
func (m *MsgSplitRouteSwapExactAmountOut) Reset()
func (MsgSplitRouteSwapExactAmountOut) Route ¶
func (msg MsgSplitRouteSwapExactAmountOut) Route() string
func (*MsgSplitRouteSwapExactAmountOut) Size ¶
func (m *MsgSplitRouteSwapExactAmountOut) Size() (n int)
func (*MsgSplitRouteSwapExactAmountOut) String ¶
func (m *MsgSplitRouteSwapExactAmountOut) String() string
func (MsgSplitRouteSwapExactAmountOut) Type ¶
func (msg MsgSplitRouteSwapExactAmountOut) Type() string
func (*MsgSplitRouteSwapExactAmountOut) Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountOut) Unmarshal(dAtA []byte) error
func (MsgSplitRouteSwapExactAmountOut) ValidateBasic ¶
func (msg MsgSplitRouteSwapExactAmountOut) ValidateBasic() error
func (*MsgSplitRouteSwapExactAmountOut) XXX_DiscardUnknown ¶
func (m *MsgSplitRouteSwapExactAmountOut) XXX_DiscardUnknown()
func (*MsgSplitRouteSwapExactAmountOut) XXX_Marshal ¶
func (m *MsgSplitRouteSwapExactAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSplitRouteSwapExactAmountOut) XXX_Merge ¶
func (m *MsgSplitRouteSwapExactAmountOut) XXX_Merge(src proto.Message)
func (*MsgSplitRouteSwapExactAmountOut) XXX_Size ¶
func (m *MsgSplitRouteSwapExactAmountOut) XXX_Size() int
func (*MsgSplitRouteSwapExactAmountOut) XXX_Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountOut) XXX_Unmarshal(b []byte) error
type MsgSplitRouteSwapExactAmountOutResponse ¶
type MsgSplitRouteSwapExactAmountOutResponse struct {
TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
}
func (*MsgSplitRouteSwapExactAmountOutResponse) Descriptor ¶
func (*MsgSplitRouteSwapExactAmountOutResponse) Descriptor() ([]byte, []int)
func (*MsgSplitRouteSwapExactAmountOutResponse) Marshal ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) Marshal() (dAtA []byte, err error)
func (*MsgSplitRouteSwapExactAmountOutResponse) MarshalTo ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountOutResponse) MarshalToSizedBuffer ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSplitRouteSwapExactAmountOutResponse) ProtoMessage ¶
func (*MsgSplitRouteSwapExactAmountOutResponse) ProtoMessage()
func (*MsgSplitRouteSwapExactAmountOutResponse) Reset ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) Reset()
func (*MsgSplitRouteSwapExactAmountOutResponse) Size ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) Size() (n int)
func (*MsgSplitRouteSwapExactAmountOutResponse) String ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) String() string
func (*MsgSplitRouteSwapExactAmountOutResponse) Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) Unmarshal(dAtA []byte) error
func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_DiscardUnknown ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_DiscardUnknown()
func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Marshal ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Merge ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Merge(src proto.Message)
func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Size ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Size() int
func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Unmarshal ¶
func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error
type MsgSwapExactAmountIn ¶
type MsgSwapExactAmountIn struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` Routes []SwapAmountInRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` TokenIn types.Coin `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in" yaml:"token_in"` TokenOutMinAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 184-byte string literal not displayed */ }
===================== MsgSwapExactAmountIn
func (*MsgSwapExactAmountIn) Descriptor ¶
func (*MsgSwapExactAmountIn) Descriptor() ([]byte, []int)
func (*MsgSwapExactAmountIn) GetRoutes ¶
func (m *MsgSwapExactAmountIn) GetRoutes() []SwapAmountInRoute
func (*MsgSwapExactAmountIn) GetSender ¶
func (m *MsgSwapExactAmountIn) GetSender() string
func (MsgSwapExactAmountIn) GetSignBytes ¶
func (msg MsgSwapExactAmountIn) GetSignBytes() []byte
func (MsgSwapExactAmountIn) GetSigners ¶
func (msg MsgSwapExactAmountIn) GetSigners() []sdk.AccAddress
func (*MsgSwapExactAmountIn) GetTokenIn ¶
func (m *MsgSwapExactAmountIn) GetTokenIn() types.Coin
func (*MsgSwapExactAmountIn) Marshal ¶
func (m *MsgSwapExactAmountIn) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactAmountIn) MarshalTo ¶
func (m *MsgSwapExactAmountIn) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactAmountIn) MarshalToSizedBuffer ¶
func (m *MsgSwapExactAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactAmountIn) ProtoMessage ¶
func (*MsgSwapExactAmountIn) ProtoMessage()
func (*MsgSwapExactAmountIn) Reset ¶
func (m *MsgSwapExactAmountIn) Reset()
func (MsgSwapExactAmountIn) Route ¶
func (msg MsgSwapExactAmountIn) Route() string
func (*MsgSwapExactAmountIn) Size ¶
func (m *MsgSwapExactAmountIn) Size() (n int)
func (*MsgSwapExactAmountIn) String ¶
func (m *MsgSwapExactAmountIn) String() string
func (MsgSwapExactAmountIn) Type ¶
func (msg MsgSwapExactAmountIn) Type() string
func (*MsgSwapExactAmountIn) Unmarshal ¶
func (m *MsgSwapExactAmountIn) Unmarshal(dAtA []byte) error
func (MsgSwapExactAmountIn) ValidateBasic ¶
func (msg MsgSwapExactAmountIn) ValidateBasic() error
func (*MsgSwapExactAmountIn) XXX_DiscardUnknown ¶
func (m *MsgSwapExactAmountIn) XXX_DiscardUnknown()
func (*MsgSwapExactAmountIn) XXX_Marshal ¶
func (m *MsgSwapExactAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactAmountIn) XXX_Merge ¶
func (m *MsgSwapExactAmountIn) XXX_Merge(src proto.Message)
func (*MsgSwapExactAmountIn) XXX_Size ¶
func (m *MsgSwapExactAmountIn) XXX_Size() int
func (*MsgSwapExactAmountIn) XXX_Unmarshal ¶
func (m *MsgSwapExactAmountIn) XXX_Unmarshal(b []byte) error
type MsgSwapExactAmountInResponse ¶
type MsgSwapExactAmountInResponse struct {
TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */
}
func (*MsgSwapExactAmountInResponse) Descriptor ¶
func (*MsgSwapExactAmountInResponse) Descriptor() ([]byte, []int)
func (*MsgSwapExactAmountInResponse) Marshal ¶
func (m *MsgSwapExactAmountInResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactAmountInResponse) MarshalTo ¶
func (m *MsgSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactAmountInResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactAmountInResponse) ProtoMessage ¶
func (*MsgSwapExactAmountInResponse) ProtoMessage()
func (*MsgSwapExactAmountInResponse) Reset ¶
func (m *MsgSwapExactAmountInResponse) Reset()
func (*MsgSwapExactAmountInResponse) Size ¶
func (m *MsgSwapExactAmountInResponse) Size() (n int)
func (*MsgSwapExactAmountInResponse) String ¶
func (m *MsgSwapExactAmountInResponse) String() string
func (*MsgSwapExactAmountInResponse) Unmarshal ¶
func (m *MsgSwapExactAmountInResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapExactAmountInResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapExactAmountInResponse) XXX_DiscardUnknown()
func (*MsgSwapExactAmountInResponse) XXX_Marshal ¶
func (m *MsgSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactAmountInResponse) XXX_Merge ¶
func (m *MsgSwapExactAmountInResponse) XXX_Merge(src proto.Message)
func (*MsgSwapExactAmountInResponse) XXX_Size ¶
func (m *MsgSwapExactAmountInResponse) XXX_Size() int
func (*MsgSwapExactAmountInResponse) XXX_Unmarshal ¶
func (m *MsgSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error
type MsgSwapExactAmountOut ¶
type MsgSwapExactAmountOut struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` Routes []SwapAmountOutRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` TokenInMaxAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 180-byte string literal not displayed */ TokenOut types.Coin `protobuf:"bytes,4,opt,name=token_out,json=tokenOut,proto3" json:"token_out" yaml:"token_out"` }
===================== MsgSwapExactAmountOut
func (*MsgSwapExactAmountOut) Descriptor ¶
func (*MsgSwapExactAmountOut) Descriptor() ([]byte, []int)
func (*MsgSwapExactAmountOut) GetRoutes ¶
func (m *MsgSwapExactAmountOut) GetRoutes() []SwapAmountOutRoute
func (*MsgSwapExactAmountOut) GetSender ¶
func (m *MsgSwapExactAmountOut) GetSender() string
func (MsgSwapExactAmountOut) GetSignBytes ¶
func (msg MsgSwapExactAmountOut) GetSignBytes() []byte
func (MsgSwapExactAmountOut) GetSigners ¶
func (msg MsgSwapExactAmountOut) GetSigners() []sdk.AccAddress
func (*MsgSwapExactAmountOut) GetTokenOut ¶
func (m *MsgSwapExactAmountOut) GetTokenOut() types.Coin
func (*MsgSwapExactAmountOut) Marshal ¶
func (m *MsgSwapExactAmountOut) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactAmountOut) MarshalTo ¶
func (m *MsgSwapExactAmountOut) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactAmountOut) MarshalToSizedBuffer ¶
func (m *MsgSwapExactAmountOut) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactAmountOut) ProtoMessage ¶
func (*MsgSwapExactAmountOut) ProtoMessage()
func (*MsgSwapExactAmountOut) Reset ¶
func (m *MsgSwapExactAmountOut) Reset()
func (MsgSwapExactAmountOut) Route ¶
func (msg MsgSwapExactAmountOut) Route() string
func (*MsgSwapExactAmountOut) Size ¶
func (m *MsgSwapExactAmountOut) Size() (n int)
func (*MsgSwapExactAmountOut) String ¶
func (m *MsgSwapExactAmountOut) String() string
func (MsgSwapExactAmountOut) Type ¶
func (msg MsgSwapExactAmountOut) Type() string
func (*MsgSwapExactAmountOut) Unmarshal ¶
func (m *MsgSwapExactAmountOut) Unmarshal(dAtA []byte) error
func (MsgSwapExactAmountOut) ValidateBasic ¶
func (msg MsgSwapExactAmountOut) ValidateBasic() error
func (*MsgSwapExactAmountOut) XXX_DiscardUnknown ¶
func (m *MsgSwapExactAmountOut) XXX_DiscardUnknown()
func (*MsgSwapExactAmountOut) XXX_Marshal ¶
func (m *MsgSwapExactAmountOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactAmountOut) XXX_Merge ¶
func (m *MsgSwapExactAmountOut) XXX_Merge(src proto.Message)
func (*MsgSwapExactAmountOut) XXX_Size ¶
func (m *MsgSwapExactAmountOut) XXX_Size() int
func (*MsgSwapExactAmountOut) XXX_Unmarshal ¶
func (m *MsgSwapExactAmountOut) XXX_Unmarshal(b []byte) error
type MsgSwapExactAmountOutResponse ¶
type MsgSwapExactAmountOutResponse struct {
TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
}
func (*MsgSwapExactAmountOutResponse) Descriptor ¶
func (*MsgSwapExactAmountOutResponse) Descriptor() ([]byte, []int)
func (*MsgSwapExactAmountOutResponse) Marshal ¶
func (m *MsgSwapExactAmountOutResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapExactAmountOutResponse) MarshalTo ¶
func (m *MsgSwapExactAmountOutResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapExactAmountOutResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapExactAmountOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapExactAmountOutResponse) ProtoMessage ¶
func (*MsgSwapExactAmountOutResponse) ProtoMessage()
func (*MsgSwapExactAmountOutResponse) Reset ¶
func (m *MsgSwapExactAmountOutResponse) Reset()
func (*MsgSwapExactAmountOutResponse) Size ¶
func (m *MsgSwapExactAmountOutResponse) Size() (n int)
func (*MsgSwapExactAmountOutResponse) String ¶
func (m *MsgSwapExactAmountOutResponse) String() string
func (*MsgSwapExactAmountOutResponse) Unmarshal ¶
func (m *MsgSwapExactAmountOutResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapExactAmountOutResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapExactAmountOutResponse) XXX_DiscardUnknown()
func (*MsgSwapExactAmountOutResponse) XXX_Marshal ¶
func (m *MsgSwapExactAmountOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapExactAmountOutResponse) XXX_Merge ¶
func (m *MsgSwapExactAmountOutResponse) XXX_Merge(src proto.Message)
func (*MsgSwapExactAmountOutResponse) XXX_Size ¶
func (m *MsgSwapExactAmountOutResponse) XXX_Size() int
func (*MsgSwapExactAmountOutResponse) XXX_Unmarshal ¶
func (m *MsgSwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error
type MultihopRoute ¶
type Params ¶
type Params struct {
PoolCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 177-byte string literal not displayed */
}
Params holds parameters for the poolmanager module
func DefaultParams ¶
func DefaultParams() Params
DefaultParams are the default poolmanager module parameters.
func (*Params) Descriptor ¶
func (*Params) GetPoolCreationFee ¶
func (m *Params) GetPoolCreationFee() github_com_cosmos_cosmos_sdk_types.Coins
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
Implements params.ParamSet.
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PoolI ¶
type PoolI interface { proto.Message GetAddress() sdk.AccAddress String() string GetId() uint64 // GetSpreadFactor returns the pool's spread factor, based on the current state. // Pools may choose to make their spread factors dependent upon state // (prior TWAPs, network downtime, other pool states, etc.) // hence Context is provided as an argument. GetSpreadFactor(ctx sdk.Context) sdk.Dec // Returns whether the pool has swaps enabled at the moment IsActive(ctx sdk.Context) bool // Returns the spot price of the 'base asset' in terms of the 'quote asset' in the pool, // errors if either baseAssetDenom, or quoteAssetDenom does not exist. // For example, if this was a UniV2 50-50 pool, with 2 ETH, and 8000 UST // pool.SpotPrice(ctx, "eth", "ust") = 4000.00 SpotPrice(ctx sdk.Context, quoteAssetDenom string, baseAssetDenom string) (sdk.Dec, error) // GetType returns the type of the pool (Balancer, Stableswap, Concentrated, etc.) GetType() PoolType // AsSerializablePool returns the pool in a serializable form (useful when a model wraps the proto) AsSerializablePool() PoolI }
PoolI defines an interface for pools that hold tokens.
type PoolIncentivesKeeperI ¶
type PoolModuleI ¶
type PoolModuleI interface { InitializePool(ctx sdk.Context, pool PoolI, creatorAddress sdk.AccAddress) error GetPool(ctx sdk.Context, poolId uint64) (PoolI, error) GetPools(ctx sdk.Context) ([]PoolI, error) GetPoolDenoms(ctx sdk.Context, poolId uint64) (denoms []string, err error) CalculateSpotPrice( ctx sdk.Context, poolId uint64, quoteAssetDenom string, baseAssetDenom string, ) (price sdk.Dec, err error) SwapExactAmountIn( ctx sdk.Context, sender sdk.AccAddress, pool PoolI, tokenIn sdk.Coin, tokenOutDenom string, tokenOutMinAmount sdk.Int, spreadFactor sdk.Dec, ) (sdk.Int, error) // CalcOutAmtGivenIn calculates the amount of tokenOut given tokenIn and the pool's current state. // Returns error if the given pool is not a CFMM pool. Returns error on internal calculations. CalcOutAmtGivenIn( ctx sdk.Context, poolI PoolI, tokenIn sdk.Coin, tokenOutDenom string, spreadFactor sdk.Dec, ) (tokenOut sdk.Coin, err error) SwapExactAmountOut( ctx sdk.Context, sender sdk.AccAddress, pool PoolI, tokenInDenom string, tokenInMaxAmount sdk.Int, tokenOut sdk.Coin, spreadFactor sdk.Dec, ) (tokenInAmount sdk.Int, err error) // CalcInAmtGivenOut calculates the amount of tokenIn given tokenOut and the pool's current state. // Returns error if the given pool is not a CFMM pool. Returns error on internal calculations. CalcInAmtGivenOut( ctx sdk.Context, poolI PoolI, tokenOut sdk.Coin, tokenInDenom string, spreadFactor sdk.Dec, ) (tokenIn sdk.Coin, err error) // GetTotalPoolLiquidity returns the coins in the pool owned by all LPs GetTotalPoolLiquidity(ctx sdk.Context, poolId uint64) (sdk.Coins, error) // ValidatePermissionlessPoolCreationEnabled returns nil if permissionless pool creation in the module is enabled. // Otherwise, returns an error. ValidatePermissionlessPoolCreationEnabled(ctx sdk.Context) error // GetTotalLiquidity returns the total liquidity of all the pools in the module. GetTotalLiquidity(ctx sdk.Context) (sdk.Coins, error) }
PoolModuleI is the interface that must be fulfillled by the module storing and containing the pools.
type PoolType ¶
type PoolType int32
PoolType is an enumeration of all supported pool types.
const ( // Balancer is the standard xy=k curve. Its pool model is defined in x/gamm. Balancer PoolType = 0 // Stableswap is the Solidly cfmm stable swap curve. Its pool model is defined // in x/gamm. Stableswap PoolType = 1 // Concentrated is the pool model specific to concentrated liquidity. It is // defined in x/concentrated-liquidity. Concentrated PoolType = 2 // CosmWasm is the pool model specific to CosmWasm. It is defined in // x/cosmwasmpool. CosmWasm PoolType = 3 )
func (PoolType) EnumDescriptor ¶
type PriceImpactProtectionExactInError ¶
func (PriceImpactProtectionExactInError) Error ¶
func (e PriceImpactProtectionExactInError) Error() string
type PriceImpactProtectionExactOutError ¶
func (PriceImpactProtectionExactOutError) Error ¶
func (e PriceImpactProtectionExactOutError) Error() string
type SwapAmountInRoute ¶
type SwapAmountInRoute struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty" yaml:"token_out_denom"` }
func (*SwapAmountInRoute) Descriptor ¶
func (*SwapAmountInRoute) Descriptor() ([]byte, []int)
func (*SwapAmountInRoute) GetPoolId ¶
func (m *SwapAmountInRoute) GetPoolId() uint64
func (*SwapAmountInRoute) GetTokenOutDenom ¶
func (m *SwapAmountInRoute) GetTokenOutDenom() string
func (*SwapAmountInRoute) Marshal ¶
func (m *SwapAmountInRoute) Marshal() (dAtA []byte, err error)
func (*SwapAmountInRoute) MarshalTo ¶
func (m *SwapAmountInRoute) MarshalTo(dAtA []byte) (int, error)
func (*SwapAmountInRoute) MarshalToSizedBuffer ¶
func (m *SwapAmountInRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SwapAmountInRoute) ProtoMessage ¶
func (*SwapAmountInRoute) ProtoMessage()
func (*SwapAmountInRoute) Reset ¶
func (m *SwapAmountInRoute) Reset()
func (*SwapAmountInRoute) Size ¶
func (m *SwapAmountInRoute) Size() (n int)
func (*SwapAmountInRoute) String ¶
func (m *SwapAmountInRoute) String() string
func (*SwapAmountInRoute) Unmarshal ¶
func (m *SwapAmountInRoute) Unmarshal(dAtA []byte) error
func (*SwapAmountInRoute) XXX_DiscardUnknown ¶
func (m *SwapAmountInRoute) XXX_DiscardUnknown()
func (*SwapAmountInRoute) XXX_Marshal ¶
func (m *SwapAmountInRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SwapAmountInRoute) XXX_Merge ¶
func (m *SwapAmountInRoute) XXX_Merge(src proto.Message)
func (*SwapAmountInRoute) XXX_Size ¶
func (m *SwapAmountInRoute) XXX_Size() int
func (*SwapAmountInRoute) XXX_Unmarshal ¶
func (m *SwapAmountInRoute) XXX_Unmarshal(b []byte) error
type SwapAmountInRoutes ¶
type SwapAmountInRoutes []SwapAmountInRoute
func (SwapAmountInRoutes) IntermediateDenoms ¶
func (routes SwapAmountInRoutes) IntermediateDenoms() []string
func (SwapAmountInRoutes) Length ¶
func (routes SwapAmountInRoutes) Length() int
func (SwapAmountInRoutes) PoolIds ¶
func (routes SwapAmountInRoutes) PoolIds() []uint64
func (SwapAmountInRoutes) Validate ¶
func (routes SwapAmountInRoutes) Validate() error
type SwapAmountInSplitRoute ¶
type SwapAmountInSplitRoute struct { Pools []SwapAmountInRoute `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools" yaml:"pools"` TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */ }
func (*SwapAmountInSplitRoute) Descriptor ¶
func (*SwapAmountInSplitRoute) Descriptor() ([]byte, []int)
func (*SwapAmountInSplitRoute) GetPools ¶
func (m *SwapAmountInSplitRoute) GetPools() []SwapAmountInRoute
func (*SwapAmountInSplitRoute) Marshal ¶
func (m *SwapAmountInSplitRoute) Marshal() (dAtA []byte, err error)
func (*SwapAmountInSplitRoute) MarshalTo ¶
func (m *SwapAmountInSplitRoute) MarshalTo(dAtA []byte) (int, error)
func (*SwapAmountInSplitRoute) MarshalToSizedBuffer ¶
func (m *SwapAmountInSplitRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SwapAmountInSplitRoute) ProtoMessage ¶
func (*SwapAmountInSplitRoute) ProtoMessage()
func (*SwapAmountInSplitRoute) Reset ¶
func (m *SwapAmountInSplitRoute) Reset()
func (*SwapAmountInSplitRoute) Size ¶
func (m *SwapAmountInSplitRoute) Size() (n int)
func (*SwapAmountInSplitRoute) String ¶
func (m *SwapAmountInSplitRoute) String() string
func (*SwapAmountInSplitRoute) Unmarshal ¶
func (m *SwapAmountInSplitRoute) Unmarshal(dAtA []byte) error
func (*SwapAmountInSplitRoute) XXX_DiscardUnknown ¶
func (m *SwapAmountInSplitRoute) XXX_DiscardUnknown()
func (*SwapAmountInSplitRoute) XXX_Marshal ¶
func (m *SwapAmountInSplitRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SwapAmountInSplitRoute) XXX_Merge ¶
func (m *SwapAmountInSplitRoute) XXX_Merge(src proto.Message)
func (*SwapAmountInSplitRoute) XXX_Size ¶
func (m *SwapAmountInSplitRoute) XXX_Size() int
func (*SwapAmountInSplitRoute) XXX_Unmarshal ¶
func (m *SwapAmountInSplitRoute) XXX_Unmarshal(b []byte) error
type SwapAmountOutRoute ¶
type SwapAmountOutRoute struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` TokenInDenom string `protobuf:"bytes,2,opt,name=token_in_denom,json=tokenInDenom,proto3" json:"token_in_denom,omitempty" yaml:"token_in_denom"` }
func (*SwapAmountOutRoute) Descriptor ¶
func (*SwapAmountOutRoute) Descriptor() ([]byte, []int)
func (*SwapAmountOutRoute) GetPoolId ¶
func (m *SwapAmountOutRoute) GetPoolId() uint64
func (*SwapAmountOutRoute) GetTokenInDenom ¶
func (m *SwapAmountOutRoute) GetTokenInDenom() string
func (*SwapAmountOutRoute) Marshal ¶
func (m *SwapAmountOutRoute) Marshal() (dAtA []byte, err error)
func (*SwapAmountOutRoute) MarshalTo ¶
func (m *SwapAmountOutRoute) MarshalTo(dAtA []byte) (int, error)
func (*SwapAmountOutRoute) MarshalToSizedBuffer ¶
func (m *SwapAmountOutRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SwapAmountOutRoute) ProtoMessage ¶
func (*SwapAmountOutRoute) ProtoMessage()
func (*SwapAmountOutRoute) Reset ¶
func (m *SwapAmountOutRoute) Reset()
func (*SwapAmountOutRoute) Size ¶
func (m *SwapAmountOutRoute) Size() (n int)
func (*SwapAmountOutRoute) String ¶
func (m *SwapAmountOutRoute) String() string
func (*SwapAmountOutRoute) Unmarshal ¶
func (m *SwapAmountOutRoute) Unmarshal(dAtA []byte) error
func (*SwapAmountOutRoute) XXX_DiscardUnknown ¶
func (m *SwapAmountOutRoute) XXX_DiscardUnknown()
func (*SwapAmountOutRoute) XXX_Marshal ¶
func (m *SwapAmountOutRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SwapAmountOutRoute) XXX_Merge ¶
func (m *SwapAmountOutRoute) XXX_Merge(src proto.Message)
func (*SwapAmountOutRoute) XXX_Size ¶
func (m *SwapAmountOutRoute) XXX_Size() int
func (*SwapAmountOutRoute) XXX_Unmarshal ¶
func (m *SwapAmountOutRoute) XXX_Unmarshal(b []byte) error
type SwapAmountOutRoutes ¶
type SwapAmountOutRoutes []SwapAmountOutRoute
func (SwapAmountOutRoutes) IntermediateDenoms ¶
func (routes SwapAmountOutRoutes) IntermediateDenoms() []string
func (SwapAmountOutRoutes) Length ¶
func (routes SwapAmountOutRoutes) Length() int
func (SwapAmountOutRoutes) PoolIds ¶
func (routes SwapAmountOutRoutes) PoolIds() []uint64
func (SwapAmountOutRoutes) Validate ¶
func (routes SwapAmountOutRoutes) Validate() error
type SwapAmountOutSplitRoute ¶
type SwapAmountOutSplitRoute struct { Pools []SwapAmountOutRoute `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools" yaml:"pools"` TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */ }
func (*SwapAmountOutSplitRoute) Descriptor ¶
func (*SwapAmountOutSplitRoute) Descriptor() ([]byte, []int)
func (*SwapAmountOutSplitRoute) GetPools ¶
func (m *SwapAmountOutSplitRoute) GetPools() []SwapAmountOutRoute
func (*SwapAmountOutSplitRoute) Marshal ¶
func (m *SwapAmountOutSplitRoute) Marshal() (dAtA []byte, err error)
func (*SwapAmountOutSplitRoute) MarshalTo ¶
func (m *SwapAmountOutSplitRoute) MarshalTo(dAtA []byte) (int, error)
func (*SwapAmountOutSplitRoute) MarshalToSizedBuffer ¶
func (m *SwapAmountOutSplitRoute) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SwapAmountOutSplitRoute) ProtoMessage ¶
func (*SwapAmountOutSplitRoute) ProtoMessage()
func (*SwapAmountOutSplitRoute) Reset ¶
func (m *SwapAmountOutSplitRoute) Reset()
func (*SwapAmountOutSplitRoute) Size ¶
func (m *SwapAmountOutSplitRoute) Size() (n int)
func (*SwapAmountOutSplitRoute) String ¶
func (m *SwapAmountOutSplitRoute) String() string
func (*SwapAmountOutSplitRoute) Unmarshal ¶
func (m *SwapAmountOutSplitRoute) Unmarshal(dAtA []byte) error
func (*SwapAmountOutSplitRoute) XXX_DiscardUnknown ¶
func (m *SwapAmountOutSplitRoute) XXX_DiscardUnknown()
func (*SwapAmountOutSplitRoute) XXX_Marshal ¶
func (m *SwapAmountOutSplitRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SwapAmountOutSplitRoute) XXX_Merge ¶
func (m *SwapAmountOutSplitRoute) XXX_Merge(src proto.Message)
func (*SwapAmountOutSplitRoute) XXX_Size ¶
func (m *SwapAmountOutSplitRoute) XXX_Size() int
func (*SwapAmountOutSplitRoute) XXX_Unmarshal ¶
func (m *SwapAmountOutSplitRoute) XXX_Unmarshal(b []byte) error
type UndefinedRouteError ¶
func (UndefinedRouteError) Error ¶
func (e UndefinedRouteError) Error() string
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) SplitRouteSwapExactAmountIn ¶
func (*UnimplementedMsgServer) SplitRouteSwapExactAmountIn(ctx context.Context, req *MsgSplitRouteSwapExactAmountIn) (*MsgSplitRouteSwapExactAmountInResponse, error)
func (*UnimplementedMsgServer) SplitRouteSwapExactAmountOut ¶
func (*UnimplementedMsgServer) SplitRouteSwapExactAmountOut(ctx context.Context, req *MsgSplitRouteSwapExactAmountOut) (*MsgSplitRouteSwapExactAmountOutResponse, error)
func (*UnimplementedMsgServer) SwapExactAmountIn ¶
func (*UnimplementedMsgServer) SwapExactAmountIn(ctx context.Context, req *MsgSwapExactAmountIn) (*MsgSwapExactAmountInResponse, error)
func (*UnimplementedMsgServer) SwapExactAmountOut ¶
func (*UnimplementedMsgServer) SwapExactAmountOut(ctx context.Context, req *MsgSwapExactAmountOut) (*MsgSwapExactAmountOutResponse, error)