types

package
v15.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AttributeValueCategory       = ModuleName
	TypeEvtPoolCreated           = "pool_created"
	TypeEvtSplitRouteSwapExactIn = "split_route_swap_exact_in"
	AttributeKeyTokensIn         = "tokens_in"
	AttributeKeyTokensOut        = "tokens_out"
	AttributeKeyPoolId           = "pool_id"
)
View Source
const (
	ModuleName = "poolmanager"

	StoreKey = ModuleName

	RouterKey = ModuleName
)
View Source
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

View Source
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")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// 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}
)
View Source
var (
	ErrInvalidLengthModuleRoute        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModuleRoute          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModuleRoute = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSwapRoute        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSwapRoute          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSwapRoute = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyPoolCreationFee = []byte("PoolCreationFee")
)

Parameter store keys.

View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var PoolType_name = map[int32]string{
	0: "Balancer",
	1: "Stableswap",
	2: "Concentrated",
	3: "CosmWasm",
}
View Source
var PoolType_value = map[string]int32{
	"Balancer":     0,
	"Stableswap":   1,
	"Concentrated": 2,
	"CosmWasm":     3,
}

Functions

func FormatModuleRouteKey

func FormatModuleRouteKey(poolId uint64) []byte

ModuleRouteToBytes serializes moduleRoute to bytes.

func NewPoolAddress added in v15.3.0

func NewPoolAddress(poolId uint64) sdk.AccAddress

NewPoolAddress returns an address for a pool from a given id.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamTable for gamm module.

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 RegisterMsgServer(s grpc1.Server, srv MsgServer)

func ValidateSwapAmountInSplitRoute added in v15.5.0

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 added in v15.5.0

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 added in v15.5.0

type FinalAmountIsNotPositiveError struct {
	IsAmountOut bool
	Amount      sdk.Int
}

func (FinalAmountIsNotPositiveError) Error added in v15.5.0

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

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type InactivePoolError added in v15.8.0

type InactivePoolError struct {
	PoolId uint64
}

func (InactivePoolError) Error added in v15.8.0

func (e InactivePoolError) Error() string

type IncorrectPoolAddressError added in v15.5.0

type IncorrectPoolAddressError struct {
	ExpectedPoolAddress string
	ActualPoolAddress   string
}

func (IncorrectPoolAddressError) Error added in v15.5.0

type IncorrectPoolIdError added in v15.5.0

type IncorrectPoolIdError struct {
	ExpectedPoolId uint64
	ActualPoolId   uint64
}

func (IncorrectPoolIdError) Error added in v15.5.0

func (e IncorrectPoolIdError) Error() string

type InvalidFinalTokenOutError added in v15.5.0

type InvalidFinalTokenOutError struct {
	TokenOutGivenA string
	TokenOutGivenB string
}

func (InvalidFinalTokenOutError) Error added in v15.5.0

type InvalidPoolCreatorError added in v15.5.0

type InvalidPoolCreatorError struct {
	CreatorAddresss string
}

func (InvalidPoolCreatorError) Error added in v15.5.0

func (e InvalidPoolCreatorError) Error() string

type InvalidPoolTypeError added in v15.5.0

type InvalidPoolTypeError struct {
	PoolType PoolType
}

func (InvalidPoolTypeError) Error added in v15.5.0

func (e InvalidPoolTypeError) Error() string

type InvalidSenderError added in v15.5.0

type InvalidSenderError struct {
	Sender string
}

func (InvalidSenderError) Error added in v15.5.0

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

func (m *ModuleRoute) MarshalTo(dAtA []byte) (int, 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

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

MsgServer is the server API for Msg service.

type MsgSplitRouteSwapExactAmountIn added in v15.5.0

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 added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) GetRoutes added in v15.5.0

func (*MsgSplitRouteSwapExactAmountIn) GetSender added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountIn) GetSender() string

func (MsgSplitRouteSwapExactAmountIn) GetSignBytes added in v15.5.0

func (msg MsgSplitRouteSwapExactAmountIn) GetSignBytes() []byte

func (MsgSplitRouteSwapExactAmountIn) GetSigners added in v15.5.0

func (msg MsgSplitRouteSwapExactAmountIn) GetSigners() []sdk.AccAddress

func (*MsgSplitRouteSwapExactAmountIn) GetTokenInDenom added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountIn) GetTokenInDenom() string

func (*MsgSplitRouteSwapExactAmountIn) Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) MarshalTo added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) MarshalToSizedBuffer added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) ProtoMessage added in v15.5.0

func (*MsgSplitRouteSwapExactAmountIn) ProtoMessage()

func (*MsgSplitRouteSwapExactAmountIn) Reset added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountIn) Reset()

func (MsgSplitRouteSwapExactAmountIn) Route added in v15.5.0

func (*MsgSplitRouteSwapExactAmountIn) Size added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) String added in v15.5.0

func (MsgSplitRouteSwapExactAmountIn) Type added in v15.5.0

func (*MsgSplitRouteSwapExactAmountIn) Unmarshal added in v15.5.0

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

func (MsgSplitRouteSwapExactAmountIn) ValidateBasic added in v15.5.0

func (msg MsgSplitRouteSwapExactAmountIn) ValidateBasic() error

func (*MsgSplitRouteSwapExactAmountIn) XXX_DiscardUnknown added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountIn) XXX_DiscardUnknown()

func (*MsgSplitRouteSwapExactAmountIn) XXX_Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) XXX_Merge added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountIn) XXX_Size added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountIn) XXX_Size() int

func (*MsgSplitRouteSwapExactAmountIn) XXX_Unmarshal added in v15.5.0

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

type MsgSplitRouteSwapExactAmountInResponse added in v15.5.0

type MsgSplitRouteSwapExactAmountInResponse struct {
	TokenOutAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */
}

func (*MsgSplitRouteSwapExactAmountInResponse) Descriptor added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountInResponse) Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountInResponse) MarshalTo added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountInResponse) MarshalToSizedBuffer added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountInResponse) ProtoMessage added in v15.5.0

func (*MsgSplitRouteSwapExactAmountInResponse) Reset added in v15.5.0

func (*MsgSplitRouteSwapExactAmountInResponse) Size added in v15.5.0

func (*MsgSplitRouteSwapExactAmountInResponse) String added in v15.5.0

func (*MsgSplitRouteSwapExactAmountInResponse) Unmarshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountInResponse) XXX_DiscardUnknown added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountInResponse) XXX_DiscardUnknown()

func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Merge added in v15.5.0

func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Size added in v15.5.0

func (*MsgSplitRouteSwapExactAmountInResponse) XXX_Unmarshal added in v15.5.0

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

type MsgSplitRouteSwapExactAmountOut added in v15.5.0

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 added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) GetRoutes added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOut) GetSender added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountOut) GetSender() string

func (MsgSplitRouteSwapExactAmountOut) GetSignBytes added in v15.5.0

func (msg MsgSplitRouteSwapExactAmountOut) GetSignBytes() []byte

func (MsgSplitRouteSwapExactAmountOut) GetSigners added in v15.5.0

func (msg MsgSplitRouteSwapExactAmountOut) GetSigners() []sdk.AccAddress

func (*MsgSplitRouteSwapExactAmountOut) GetTokenOutDenom added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountOut) GetTokenOutDenom() string

func (*MsgSplitRouteSwapExactAmountOut) Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) MarshalTo added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) MarshalToSizedBuffer added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) ProtoMessage added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOut) ProtoMessage()

func (*MsgSplitRouteSwapExactAmountOut) Reset added in v15.5.0

func (MsgSplitRouteSwapExactAmountOut) Route added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOut) Size added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) String added in v15.5.0

func (MsgSplitRouteSwapExactAmountOut) Type added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOut) Unmarshal added in v15.5.0

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

func (MsgSplitRouteSwapExactAmountOut) ValidateBasic added in v15.5.0

func (msg MsgSplitRouteSwapExactAmountOut) ValidateBasic() error

func (*MsgSplitRouteSwapExactAmountOut) XXX_DiscardUnknown added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountOut) XXX_DiscardUnknown()

func (*MsgSplitRouteSwapExactAmountOut) XXX_Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) XXX_Merge added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOut) XXX_Size added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountOut) XXX_Size() int

func (*MsgSplitRouteSwapExactAmountOut) XXX_Unmarshal added in v15.5.0

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

type MsgSplitRouteSwapExactAmountOutResponse added in v15.5.0

type MsgSplitRouteSwapExactAmountOutResponse struct {
	TokenInAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
}

func (*MsgSplitRouteSwapExactAmountOutResponse) Descriptor added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOutResponse) Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOutResponse) MarshalTo added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOutResponse) MarshalToSizedBuffer added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOutResponse) ProtoMessage added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOutResponse) Reset added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOutResponse) Size added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOutResponse) String added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOutResponse) Unmarshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_DiscardUnknown added in v15.5.0

func (m *MsgSplitRouteSwapExactAmountOutResponse) XXX_DiscardUnknown()

func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Marshal added in v15.5.0

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

func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Merge added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Size added in v15.5.0

func (*MsgSplitRouteSwapExactAmountOutResponse) XXX_Unmarshal added in v15.5.0

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 (*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 (*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 MultihopRoute interface {
	Length() int
	PoolIds() []uint64
	IntermediateDenoms() []string
}

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 NewParams

func NewParams(poolCreationFee sdk.Coins) Params

func (*Params) Descriptor

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

func (*Params) GetPoolCreationFee

func (m *Params) GetPoolCreationFee() github_com_cosmos_cosmos_sdk_types.Coins

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

Implements params.ParamSet.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

validate params.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type 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
}

PoolI defines an interface for pools that hold tokens.

type PoolIncentivesKeeperI

type PoolIncentivesKeeperI interface {
	IsPoolIncentivized(ctx sdk.Context, poolId uint64) bool
}

type PoolModuleI added in v15.3.0

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
}

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

func (PoolType) EnumDescriptor() ([]byte, []int)

func (PoolType) String

func (x PoolType) String() string

type PriceImpactProtectionExactInError added in v15.5.0

type PriceImpactProtectionExactInError struct {
	Actual    sdk.Int
	MinAmount sdk.Int
}

func (PriceImpactProtectionExactInError) Error added in v15.5.0

type PriceImpactProtectionExactOutError added in v15.5.0

type PriceImpactProtectionExactOutError struct {
	Actual    sdk.Int
	MaxAmount sdk.Int
}

func (PriceImpactProtectionExactOutError) Error added in v15.5.0

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 added in v15.5.0

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 added in v15.5.0

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

func (*SwapAmountInSplitRoute) GetPools added in v15.5.0

func (m *SwapAmountInSplitRoute) GetPools() []SwapAmountInRoute

func (*SwapAmountInSplitRoute) Marshal added in v15.5.0

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

func (*SwapAmountInSplitRoute) MarshalTo added in v15.5.0

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

func (*SwapAmountInSplitRoute) MarshalToSizedBuffer added in v15.5.0

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

func (*SwapAmountInSplitRoute) ProtoMessage added in v15.5.0

func (*SwapAmountInSplitRoute) ProtoMessage()

func (*SwapAmountInSplitRoute) Reset added in v15.5.0

func (m *SwapAmountInSplitRoute) Reset()

func (*SwapAmountInSplitRoute) Size added in v15.5.0

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

func (*SwapAmountInSplitRoute) String added in v15.5.0

func (m *SwapAmountInSplitRoute) String() string

func (*SwapAmountInSplitRoute) Unmarshal added in v15.5.0

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

func (*SwapAmountInSplitRoute) XXX_DiscardUnknown added in v15.5.0

func (m *SwapAmountInSplitRoute) XXX_DiscardUnknown()

func (*SwapAmountInSplitRoute) XXX_Marshal added in v15.5.0

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

func (*SwapAmountInSplitRoute) XXX_Merge added in v15.5.0

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

func (*SwapAmountInSplitRoute) XXX_Size added in v15.5.0

func (m *SwapAmountInSplitRoute) XXX_Size() int

func (*SwapAmountInSplitRoute) XXX_Unmarshal added in v15.5.0

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 added in v15.5.0

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 added in v15.5.0

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

func (*SwapAmountOutSplitRoute) GetPools added in v15.5.0

func (*SwapAmountOutSplitRoute) Marshal added in v15.5.0

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

func (*SwapAmountOutSplitRoute) MarshalTo added in v15.5.0

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

func (*SwapAmountOutSplitRoute) MarshalToSizedBuffer added in v15.5.0

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

func (*SwapAmountOutSplitRoute) ProtoMessage added in v15.5.0

func (*SwapAmountOutSplitRoute) ProtoMessage()

func (*SwapAmountOutSplitRoute) Reset added in v15.5.0

func (m *SwapAmountOutSplitRoute) Reset()

func (*SwapAmountOutSplitRoute) Size added in v15.5.0

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

func (*SwapAmountOutSplitRoute) String added in v15.5.0

func (m *SwapAmountOutSplitRoute) String() string

func (*SwapAmountOutSplitRoute) Unmarshal added in v15.5.0

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

func (*SwapAmountOutSplitRoute) XXX_DiscardUnknown added in v15.5.0

func (m *SwapAmountOutSplitRoute) XXX_DiscardUnknown()

func (*SwapAmountOutSplitRoute) XXX_Marshal added in v15.5.0

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

func (*SwapAmountOutSplitRoute) XXX_Merge added in v15.5.0

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

func (*SwapAmountOutSplitRoute) XXX_Size added in v15.5.0

func (m *SwapAmountOutSplitRoute) XXX_Size() int

func (*SwapAmountOutSplitRoute) XXX_Unmarshal added in v15.5.0

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

type UndefinedRouteError

type UndefinedRouteError struct {
	PoolType PoolType
	PoolId   uint64
}

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 added in v15.8.0

func (*UnimplementedMsgServer) SplitRouteSwapExactAmountOut added in v15.8.0

func (*UnimplementedMsgServer) SwapExactAmountIn

func (*UnimplementedMsgServer) SwapExactAmountOut

Jump to

Keyboard shortcuts

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