types

package
v0.0.0-...-8470daa Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

nolint

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCreateLiquidityPool              = "create_liquidity_pool"
	EventTypeDepositToLiquidityPoolToBatch    = "deposit_to_liquidity_pool_to_batch"
	EventTypeWithdrawFromLiquidityPoolToBatch = "withdraw_from_liquidity_pool_to_batch"
	EventTypeSwapToBatch                      = "swap_to_batch"
	EventTypeDepositToLiquidityPool           = "deposit_to_liquidity_pool"
	EventTypeWithdrawFromLiquidityPool        = "withdraw_from_liquidity_pool"
	EventTypeSwap                             = "swap"

	AttributeValueLiquidityPoolID        = "liquidity_pool_id"
	AttributeValueLiquidityPoolTypeIndex = "liquidity_pool_type_index"
	AttributeValueLiquidityPoolFeeRate   = "liquidity_pool_fee_rate"
	//AttributeValueSwapPriceFunction      = "swap_price_function"
	AttributeValueReserveCoinDenoms = "reserve_coin_denoms"
	AttributeValueReserveAccount    = "reserve_account"
	AttributeValuePoolCoinDenom     = "pool_coin_denom"
	AttributeValueSwapFeeRate       = "swap_fee_rate"
	AttributeValueBatchSize         = "batch_size"
	AttributeValueBatchID           = "batch_id"
	AttributeValueTxHash            = "tx_hash"

	AttributeValueDepositor            = "depositor"
	AttributeValueAcceptedCoinAmount   = "accepted_coin_amount"
	AttributeValueRefundedCoinAmount   = "refunded_coin_amount"
	AttributeValueSuccess              = "success"
	AttributeValueWithdrawer           = "withdrawer"
	AttributeValuePoolCoin             = "pool_coin"
	AttributeValueWithdrawCoinAmount   = "withdraw_coin_amount"
	AttributeValueSwapRequester        = "swap_requester"
	AttributeValueSwapType             = "swap_type"
	AttributeValueAcceptedOfferCoin    = "accepted_offer_coin"
	AttributeValueRefundedOfferCoin    = "refunded_offer_coin"
	AttributeValueReceivedDemandCoin   = "received_demand_coin"
	AttributeValueSwapPrice            = "swap_price"
	AttributeValuePaidSwapFee          = "paid_swap_fee"
	AttributeValuePaidLiquidityPoolFee = "paid_liquidity_pool_fee"

	AttributeValueCategory = ModuleName
)

liquidity module event types

View Source
const (
	// ModuleName is the name of the module.
	ModuleName = "liquidity"

	// RouterKey is the message route for the liquidity module.
	RouterKey = ModuleName

	// StoreKey is the default store key for the liquidity module.
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the liquidity module.
	QuerierRoute = StoreKey
)
View Source
const (
	TypeMsgCreateLiquidityPool       = "create_liquidity_pool"
	TypeMsgDepositToLiquidityPool    = "deposit_to_liquidity_pool"
	TypeMsgWithdrawFromLiquidityPool = "withdraw_from_liquidity_pool"
	TypeMsgSwap                      = "swap"
)
View Source
const (
	ConstantProductFunctionName       = "constant_product_function"
	OtherSwapPriceFunctionExampleName = "other_swap_price_function_example"
)

SwapPriceFunction list

View Source
const DefaultBatchSize uint32 = 1
View Source
const (
	// QueryLiquidityPool liquidity query endpoint supported by the liquidity querier
	QueryLiquidityPool = "pool"
)

Variables

View Source
var (
	ErrPoolNotExists          = sdkerrors.Register(ModuleName, 1, "pool not exists")
	ErrPoolTypeNotExists      = sdkerrors.Register(ModuleName, 2, "pool type not exists")
	ErrEqualDenom             = sdkerrors.Register(ModuleName, 3, "reserve coin denomination are equal")
	ErrInvalidDenom           = sdkerrors.Register(ModuleName, 4, "invalid denom")
	ErrNumOfReserveCoin       = sdkerrors.Register(ModuleName, 5, "invalid number of reserve coin")
	ErrNumOfPoolCoin          = sdkerrors.Register(ModuleName, 6, "invalid number of pool coin")
	ErrInsufficientPool       = sdkerrors.Register(ModuleName, 7, "insufficient pool")
	ErrInsufficientBalance    = sdkerrors.Register(ModuleName, 8, "insufficient coin balance to escrow")
	ErrLessThanMinInitDeposit = sdkerrors.Register(ModuleName, 9, "deposit coin less than MinInitDepositToPool")
	ErrNotImplementedYet      = sdkerrors.Register(ModuleName, 10, "not implemented yet")
	ErrPoolAlreadyExists      = sdkerrors.Register(ModuleName, 11, "the pool already exists")
	ErrPoolBatchNotExists     = sdkerrors.Register(ModuleName, 12, "pool batch not exists")
	ErrOrderBookInvalidity    = sdkerrors.Register(ModuleName, 13, "orderbook is not validity")
)

liquidity module sentinel errors

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 (

	// param key for global Liquidity Pool IDs
	GlobalLiquidityPoolIDKey = []byte("globalLiquidityPoolID")

	LiquidityPoolKeyPrefix               = []byte{0x11}
	LiquidityPoolByReserveIndexKeyPrefix = []byte{0x12}

	LiquidityPoolBatchIndexKeyPrefix = []byte{0x21} // LastLiquidityPoolBatchIndex
	LiquidityPoolBatchKeyPrefix      = []byte{0x22}

	LiquidityPoolBatchDepositMsgIndexKeyPrefix  = []byte{0x31}
	LiquidityPoolBatchWithdrawMsgIndexKeyPrefix = []byte{0x32}
	LiquidityPoolBatchSwapMsgIndexKeyPrefix     = []byte{0x33}
)
View Source
var (
	ErrInvalidLengthLiquidity        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLiquidity          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLiquidity = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyLiquidityPoolTypes       = []byte("LiquidityPoolTypes")
	KeyMinInitDepositToPool     = []byte("MinInitDepositToPool")
	KeyInitPoolCoinMintAmount   = []byte("InitPoolCoinMintAmount")
	KeySwapFeeRate              = []byte("SwapFeeRate")
	KeyLiquidityPoolFeeRate     = []byte("LiquidityPoolFeeRate")
	KeyLiquidityPoolCreationFee = []byte("LiquidityPoolCreationFee")
	KeyUnitBatchSize            = []byte("UnitBatchSize")

	LiquidityPoolTypeConstantProduct = LiquidityPoolType{
		PoolTypeIndex:     0,
		Name:              "ConstantProductLiquidityPool",
		MinReserveCoinNum: 2,
		MaxReserveCoinNum: 2,
	}
)

Parameter store keys

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = 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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func AlphabeticalDenomPair

func AlphabeticalDenomPair(denom1, denom2 string) (resDenom1, resDenom2 string)

Get denom pair alphabetical ordered

func GetLiquidityPoolBatchDepositMsgIndex

func GetLiquidityPoolBatchDepositMsgIndex(poolID, batchIndex, msgIndex uint64) []byte

func GetLiquidityPoolBatchDepositMsgsPrefix

func GetLiquidityPoolBatchDepositMsgsPrefix(poolID, batchIndex uint64) []byte

func GetLiquidityPoolBatchIndexKey

func GetLiquidityPoolBatchIndexKey(poolID uint64) []byte

func GetLiquidityPoolBatchKey

func GetLiquidityPoolBatchKey(poolID uint64, batchIndex uint64) []byte

func GetLiquidityPoolBatchSwapMsgIndex

func GetLiquidityPoolBatchSwapMsgIndex(poolID, batchIndex, msgIndex uint64) []byte

func GetLiquidityPoolBatchSwapMsgsPrefix

func GetLiquidityPoolBatchSwapMsgsPrefix(poolID, batchIndex uint64) []byte

func GetLiquidityPoolBatchWithdrawMsgIndex

func GetLiquidityPoolBatchWithdrawMsgIndex(poolID, batchIndex, msgIndex uint64) []byte

func GetLiquidityPoolBatchWithdrawMsgsPrefix

func GetLiquidityPoolBatchWithdrawMsgsPrefix(poolID, batchIndex uint64) []byte

func GetLiquidityPoolByReserveAccIndexKey

func GetLiquidityPoolByReserveAccIndexKey(reserveAcc sdk.AccAddress) []byte

func GetLiquidityPoolKey

func GetLiquidityPoolKey(poolID uint64) []byte

func GetPoolCoinDenom

func GetPoolCoinDenom(reserveAcc sdk.AccAddress) string

tmp denom rule, TBD

func GetPoolKey

func GetPoolKey(reserveCoinDenoms []string, poolTypeIndex uint32) string

func GetPoolReserveAcc

func GetPoolReserveAcc(poolKey string) sdk.AccAddress

GetPoolReserveAcc returns the poor account for the provided poolKey (reserve denoms + poolType)

func MustMarshalBatchPoolDepositMsg

func MustMarshalBatchPoolDepositMsg(cdc codec.BinaryMarshaler, msg BatchPoolDepositMsg) []byte

MustMarshalBatchPoolDepositMsg returns the BatchPoolDepositMsg bytes. Panics if fails

func MustMarshalBatchPoolSwapMsg

func MustMarshalBatchPoolSwapMsg(cdc codec.BinaryMarshaler, msg BatchPoolSwapMsg) []byte

MustMarshalBatchPoolSwapMsg returns the BatchPoolSwapMsg bytes. Panics if fails

func MustMarshalBatchPoolWithdrawMsg

func MustMarshalBatchPoolWithdrawMsg(cdc codec.BinaryMarshaler, msg BatchPoolWithdrawMsg) []byte

MustMarshalBatchPoolWithdrawMsg returns the BatchPoolWithdrawMsg bytes. Panics if fails

func MustMarshalLiquidityPool

func MustMarshalLiquidityPool(cdc codec.BinaryMarshaler, liquidityPool LiquidityPool) []byte

MustMarshalLiquidityPool returns the liquidityPool bytes. Panics if fails

func MustMarshalLiquidityPoolBatch

func MustMarshalLiquidityPoolBatch(cdc codec.BinaryMarshaler, liquidityPoolBatch LiquidityPoolBatch) []byte

MustMarshalLiquidityPoolBatch returns the LiquidityPoolBatch bytes. Panics if fails

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamTypeTable returns the TypeTable for liquidity module

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the codec.

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis - placeholder function

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	GetModuleAddress(name string) sdk.AccAddress
}

AccountKeeper defines the expected account keeper

type BankKeeper

type BankKeeper interface {
	InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

	GetSupply(ctx sdk.Context) bankexported.SupplyI
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}

BankKeeper defines the expected bank send keeper

type BatchPoolDepositMessage

type BatchPoolDepositMessage struct {
	TxHash    string // tx hash for the original MsgDepositToLiquidityPool
	MsgHeight uint64 // height where this message is appended to the batch
	Msg       MsgDepositToLiquidityPool
}

type BatchPoolDepositMsg

type BatchPoolDepositMsg struct {
	//    string TxHash = 1 [(gogoproto.moretags) = "yaml:\"tx_hash\""];
	MsgHeight int64                      `protobuf:"varint,1,opt,name=MsgHeight,proto3" json:"MsgHeight,omitempty" yaml:"msg_height"`
	Msg       *MsgDepositToLiquidityPool `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty" yaml:"msg"`
}

func MustUnmarshalBatchPoolDepositMsg

func MustUnmarshalBatchPoolDepositMsg(cdc codec.BinaryMarshaler, value []byte) BatchPoolDepositMsg

MustUnmarshalBatchPoolDepositMsg return the unmarshaled BatchPoolDepositMsg from bytes. Panics if fails.

func UnmarshalBatchPoolDepositMsg

func UnmarshalBatchPoolDepositMsg(cdc codec.BinaryMarshaler, value []byte) (msg BatchPoolDepositMsg, err error)

return the BatchPoolDepositMsg

func (*BatchPoolDepositMsg) Descriptor

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

func (*BatchPoolDepositMsg) Marshal

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

func (*BatchPoolDepositMsg) MarshalTo

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

func (*BatchPoolDepositMsg) MarshalToSizedBuffer

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

func (*BatchPoolDepositMsg) ProtoMessage

func (*BatchPoolDepositMsg) ProtoMessage()

func (*BatchPoolDepositMsg) Reset

func (m *BatchPoolDepositMsg) Reset()

func (*BatchPoolDepositMsg) Size

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

func (*BatchPoolDepositMsg) String

func (m *BatchPoolDepositMsg) String() string

func (*BatchPoolDepositMsg) Unmarshal

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

func (*BatchPoolDepositMsg) XXX_DiscardUnknown

func (m *BatchPoolDepositMsg) XXX_DiscardUnknown()

func (*BatchPoolDepositMsg) XXX_Marshal

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

func (*BatchPoolDepositMsg) XXX_Merge

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

func (*BatchPoolDepositMsg) XXX_Size

func (m *BatchPoolDepositMsg) XXX_Size() int

func (*BatchPoolDepositMsg) XXX_Unmarshal

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

type BatchPoolSwapMsg

type BatchPoolSwapMsg struct {
	//    string TxHash = 1 [(gogoproto.moretags) = "yaml:\"tx_hash\""];
	MsgHeight       int64    `protobuf:"varint,1,opt,name=MsgHeight,proto3" json:"MsgHeight,omitempty" yaml:"msg_height"`
	MsgIndex        uint64   `protobuf:"varint,2,opt,name=MsgIndex,proto3" json:"MsgIndex,omitempty" yaml:"msg_index"`
	FractionalCount uint64   `protobuf:"varint,3,opt,name=FractionalCount,proto3" json:"FractionalCount,omitempty" yaml:"fractional_count"`
	Msg             *MsgSwap `protobuf:"bytes,4,opt,name=Msg,proto3" json:"Msg,omitempty" yaml:"msg"`
}

func MustUnmarshalBatchPoolSwapMsg

func MustUnmarshalBatchPoolSwapMsg(cdc codec.BinaryMarshaler, value []byte) BatchPoolSwapMsg

MustUnmarshalBatchPoolSwapMsg return the unmarshaled BatchPoolSwapMsg from bytes. Panics if fails.

func UnmarshalBatchPoolSwapMsg

func UnmarshalBatchPoolSwapMsg(cdc codec.BinaryMarshaler, value []byte) (msg BatchPoolSwapMsg, err error)

return the UnmarshalBatchPoolSwapMsg

func (*BatchPoolSwapMsg) Descriptor

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

func (*BatchPoolSwapMsg) Marshal

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

func (*BatchPoolSwapMsg) MarshalTo

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

func (*BatchPoolSwapMsg) MarshalToSizedBuffer

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

func (*BatchPoolSwapMsg) ProtoMessage

func (*BatchPoolSwapMsg) ProtoMessage()

func (*BatchPoolSwapMsg) Reset

func (m *BatchPoolSwapMsg) Reset()

func (*BatchPoolSwapMsg) Size

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

func (*BatchPoolSwapMsg) String

func (m *BatchPoolSwapMsg) String() string

func (*BatchPoolSwapMsg) Unmarshal

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

func (*BatchPoolSwapMsg) XXX_DiscardUnknown

func (m *BatchPoolSwapMsg) XXX_DiscardUnknown()

func (*BatchPoolSwapMsg) XXX_Marshal

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

func (*BatchPoolSwapMsg) XXX_Merge

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

func (*BatchPoolSwapMsg) XXX_Size

func (m *BatchPoolSwapMsg) XXX_Size() int

func (*BatchPoolSwapMsg) XXX_Unmarshal

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

type BatchPoolWithdrawMessage

type BatchPoolWithdrawMessage struct {
	TxHash    string // tx hash for the original MsgWithdrawFromLiquidityPool
	MsgHeight uint64 // height where this message is appended to the batch
	Msg       MsgWithdrawFromLiquidityPool
}

type BatchPoolWithdrawMsg

type BatchPoolWithdrawMsg struct {
	//    string TxHash = 1 [(gogoproto.moretags) = "yaml:\"tx_hash\""];
	MsgHeight int64                         `protobuf:"varint,1,opt,name=MsgHeight,proto3" json:"MsgHeight,omitempty" yaml:"msg_height"`
	Msg       *MsgWithdrawFromLiquidityPool `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty" yaml:"msg"`
}

func MustUnmarshalBatchPoolWithdrawMsg

func MustUnmarshalBatchPoolWithdrawMsg(cdc codec.BinaryMarshaler, value []byte) BatchPoolWithdrawMsg

MustUnmarshalBatchPoolWithdrawMsg return the unmarshaled BatchPoolWithdrawMsg from bytes. Panics if fails.

func UnmarshalBatchPoolWithdrawMsg

func UnmarshalBatchPoolWithdrawMsg(cdc codec.BinaryMarshaler, value []byte) (msg BatchPoolWithdrawMsg, err error)

return the BatchPoolWithdrawMsg

func (*BatchPoolWithdrawMsg) Descriptor

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

func (*BatchPoolWithdrawMsg) Marshal

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

func (*BatchPoolWithdrawMsg) MarshalTo

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

func (*BatchPoolWithdrawMsg) MarshalToSizedBuffer

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

func (*BatchPoolWithdrawMsg) ProtoMessage

func (*BatchPoolWithdrawMsg) ProtoMessage()

func (*BatchPoolWithdrawMsg) Reset

func (m *BatchPoolWithdrawMsg) Reset()

func (*BatchPoolWithdrawMsg) Size

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

func (*BatchPoolWithdrawMsg) String

func (m *BatchPoolWithdrawMsg) String() string

func (*BatchPoolWithdrawMsg) Unmarshal

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

func (*BatchPoolWithdrawMsg) XXX_DiscardUnknown

func (m *BatchPoolWithdrawMsg) XXX_DiscardUnknown()

func (*BatchPoolWithdrawMsg) XXX_Marshal

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

func (*BatchPoolWithdrawMsg) XXX_Merge

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

func (*BatchPoolWithdrawMsg) XXX_Size

func (m *BatchPoolWithdrawMsg) XXX_Size() int

func (*BatchPoolWithdrawMsg) XXX_Unmarshal

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

type BatchSwapMessage

type BatchSwapMessage struct {
	TxHash    string // tx hash for the original MsgSwap
	MsgHeight uint64 // height where this message is appended to the batch
	Msg       MsgSwap
}

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the nft module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(params Params) *GenesisState

NewGenesisState is the constructor function for GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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

type LiquidityPool struct {
	PoolID            uint64                                        `protobuf:"varint,1,opt,name=PoolID,proto3" json:"PoolID,omitempty" yaml:"pool_id"`
	PoolTypeIndex     uint32                                        `protobuf:"varint,2,opt,name=poolTypeIndex,proto3" json:"poolTypeIndex,omitempty" yaml:"pool_type_index"`
	ReserveCoinDenoms []string                                      `protobuf:"bytes,3,rep,name=ReserveCoinDenoms,proto3" json:"ReserveCoinDenoms,omitempty" yaml:"reserve_coin_denoms"`
	ReserveAccount    github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 159-byte string literal not displayed */
	PoolCoinDenom     string                                        `protobuf:"bytes,5,opt,name=PoolCoinDenom,proto3" json:"PoolCoinDenom,omitempty" yaml:"pool_coin_denom"`
}

func MustUnmarshalLiquidityPool

func MustUnmarshalLiquidityPool(cdc codec.BinaryMarshaler, value []byte) LiquidityPool

MustUnmarshalLiquidityPool return the unmarshaled liquidityPool from bytes. Panics if fails.

func UnmarshalLiquidityPool

func UnmarshalLiquidityPool(cdc codec.BinaryMarshaler, value []byte) (liquidityPool LiquidityPool, err error)

return the liquidityPool

func (*LiquidityPool) Descriptor

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

func (*LiquidityPool) Equal

func (this *LiquidityPool) Equal(that interface{}) bool

func (LiquidityPool) GetPoolCoinDenom

func (lp LiquidityPool) GetPoolCoinDenom() string

func (LiquidityPool) GetPoolID

func (lp LiquidityPool) GetPoolID() uint64

func (LiquidityPool) GetPoolKey

func (lp LiquidityPool) GetPoolKey() string

need to validate alphabetical ordering of ReserveCoinDenoms when New() and Store Denominations can be 3 ~ 128 characters long and support letters, followed by either a letter, a number or a separator ('/'). reDnmString = `[a-zA-Z][a-zA-Z0-9/]{2,127}`

func (LiquidityPool) GetReserveAccount

func (lp LiquidityPool) GetReserveAccount() sdk.AccAddress

func (*LiquidityPool) Marshal

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

func (*LiquidityPool) MarshalTo

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

func (*LiquidityPool) MarshalToSizedBuffer

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

func (*LiquidityPool) ProtoMessage

func (*LiquidityPool) ProtoMessage()

func (*LiquidityPool) Reset

func (m *LiquidityPool) Reset()

func (*LiquidityPool) Size

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

func (*LiquidityPool) String

func (m *LiquidityPool) String() string

func (*LiquidityPool) Unmarshal

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

func (*LiquidityPool) XXX_DiscardUnknown

func (m *LiquidityPool) XXX_DiscardUnknown()

func (*LiquidityPool) XXX_Marshal

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

func (*LiquidityPool) XXX_Merge

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

func (*LiquidityPool) XXX_Size

func (m *LiquidityPool) XXX_Size() int

func (*LiquidityPool) XXX_Unmarshal

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

type LiquidityPoolBatch

type LiquidityPoolBatch struct {
	PoolID           uint64 `protobuf:"varint,1,opt,name=PoolID,proto3" json:"PoolID,omitempty" yaml:"pool_id"`
	BatchIndex       uint64 `protobuf:"varint,2,opt,name=BatchIndex,proto3" json:"BatchIndex,omitempty" yaml:"batch_index"`
	BeginHeight      int64  `protobuf:"varint,3,opt,name=BeginHeight,proto3" json:"BeginHeight,omitempty" yaml:"begin_height"`
	DepositMsgIndex  uint64 `protobuf:"varint,4,opt,name=DepositMsgIndex,proto3" json:"DepositMsgIndex,omitempty" yaml:"deposit_msg_index"`
	WithdrawMsgIndex uint64 `protobuf:"varint,5,opt,name=WithdrawMsgIndex,proto3" json:"WithdrawMsgIndex,omitempty" yaml:"withdraw_msg_index"`
	SwapMsgIndex     uint64 `protobuf:"varint,6,opt,name=SwapMsgIndex,proto3" json:"SwapMsgIndex,omitempty" yaml:"swap_msg_index"`
	ExecutionStatus  bool   `protobuf:"varint,7,opt,name=ExecutionStatus,proto3" json:"ExecutionStatus,omitempty" yaml:"execution_status"`
}

func MustUnmarshalLiquidityPoolBatch

func MustUnmarshalLiquidityPoolBatch(cdc codec.BinaryMarshaler, value []byte) LiquidityPoolBatch

MustUnmarshalLiquidityPool return the unmarshaled LiquidityPoolBatch from bytes. Panics if fails.

func NewLiquidityPoolBatch

func NewLiquidityPoolBatch(poolID, batchIndex uint64) LiquidityPoolBatch

func UnmarshalLiquidityPoolBatch

func UnmarshalLiquidityPoolBatch(cdc codec.BinaryMarshaler, value []byte) (liquidityPoolBatch LiquidityPoolBatch, err error)

return the liquidityPoolBatch

func (*LiquidityPoolBatch) Descriptor

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

func (*LiquidityPoolBatch) Equal

func (this *LiquidityPoolBatch) Equal(that interface{}) bool

func (*LiquidityPoolBatch) Marshal

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

func (*LiquidityPoolBatch) MarshalTo

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

func (*LiquidityPoolBatch) MarshalToSizedBuffer

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

func (*LiquidityPoolBatch) ProtoMessage

func (*LiquidityPoolBatch) ProtoMessage()

func (*LiquidityPoolBatch) Reset

func (m *LiquidityPoolBatch) Reset()

func (*LiquidityPoolBatch) Size

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

func (*LiquidityPoolBatch) String

func (m *LiquidityPoolBatch) String() string

func (*LiquidityPoolBatch) Unmarshal

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

func (*LiquidityPoolBatch) XXX_DiscardUnknown

func (m *LiquidityPoolBatch) XXX_DiscardUnknown()

func (*LiquidityPoolBatch) XXX_Marshal

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

func (*LiquidityPoolBatch) XXX_Merge

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

func (*LiquidityPoolBatch) XXX_Size

func (m *LiquidityPoolBatch) XXX_Size() int

func (*LiquidityPoolBatch) XXX_Unmarshal

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

type LiquidityPoolBatchLegacy

type LiquidityPoolBatchLegacy struct {
	BatchIndex              uint64                     // index of this batch
	PoolID                  uint64                     // id of target liquidity pool
	BeginHeight             uint64                     // height where this batch is begun
	SwapMessageList         []BatchSwapMessage         // list of swap messages stored in this batch
	PoolDepositMessageList  []BatchPoolDepositMessage  // list of pool deposit messages stored in this batch
	PoolWithdrawMessageList []BatchPoolWithdrawMessage // list of pool withdraw messages stored in this batch
	ExecutionStatus         bool                       // true if executed, false if not executed yet
}

type LiquidityPoolMetaData

type LiquidityPoolMetaData struct {
	PoolID              uint64     `protobuf:"varint,1,opt,name=PoolID,proto3" json:"PoolID,omitempty" yaml:"pool_id"`
	PoolCoinTotalSupply types.Coin `protobuf:"bytes,2,opt,name=PoolCoinTotalSupply,proto3" json:"PoolCoinTotalSupply" yaml:"pool_coin_total_supply"`
}

func (*LiquidityPoolMetaData) Descriptor

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

func (*LiquidityPoolMetaData) Equal

func (this *LiquidityPoolMetaData) Equal(that interface{}) bool

func (*LiquidityPoolMetaData) Marshal

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

func (*LiquidityPoolMetaData) MarshalTo

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

func (*LiquidityPoolMetaData) MarshalToSizedBuffer

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

func (*LiquidityPoolMetaData) ProtoMessage

func (*LiquidityPoolMetaData) ProtoMessage()

func (*LiquidityPoolMetaData) Reset

func (m *LiquidityPoolMetaData) Reset()

func (*LiquidityPoolMetaData) Size

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

func (*LiquidityPoolMetaData) String

func (m *LiquidityPoolMetaData) String() string

func (*LiquidityPoolMetaData) Unmarshal

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

func (*LiquidityPoolMetaData) XXX_DiscardUnknown

func (m *LiquidityPoolMetaData) XXX_DiscardUnknown()

func (*LiquidityPoolMetaData) XXX_Marshal

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

func (*LiquidityPoolMetaData) XXX_Merge

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

func (*LiquidityPoolMetaData) XXX_Size

func (m *LiquidityPoolMetaData) XXX_Size() int

func (*LiquidityPoolMetaData) XXX_Unmarshal

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

type LiquidityPoolType

type LiquidityPoolType struct {
	PoolTypeIndex     uint32 `protobuf:"varint,1,opt,name=poolTypeIndex,proto3" json:"poolTypeIndex,omitempty" yaml:"pool_type_index"`
	Name              string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty" yaml:"name"`
	MinReserveCoinNum uint32 `protobuf:"varint,3,opt,name=MinReserveCoinNum,proto3" json:"MinReserveCoinNum,omitempty" yaml:"min_reserve_coin_num"`
	MaxReserveCoinNum uint32 `protobuf:"varint,4,opt,name=MaxReserveCoinNum,proto3" json:"MaxReserveCoinNum,omitempty" yaml:"max_reserve_coin_num"`
}

func (*LiquidityPoolType) Descriptor

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

func (*LiquidityPoolType) Equal

func (this *LiquidityPoolType) Equal(that interface{}) bool

func (*LiquidityPoolType) Marshal

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

func (*LiquidityPoolType) MarshalTo

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

func (*LiquidityPoolType) MarshalToSizedBuffer

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

func (*LiquidityPoolType) ProtoMessage

func (*LiquidityPoolType) ProtoMessage()

func (*LiquidityPoolType) Reset

func (m *LiquidityPoolType) Reset()

func (*LiquidityPoolType) Size

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

func (*LiquidityPoolType) String

func (m *LiquidityPoolType) String() string

func (*LiquidityPoolType) Unmarshal

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

func (*LiquidityPoolType) XXX_DiscardUnknown

func (m *LiquidityPoolType) XXX_DiscardUnknown()

func (*LiquidityPoolType) XXX_Marshal

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

func (*LiquidityPoolType) XXX_Merge

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

func (*LiquidityPoolType) XXX_Size

func (m *LiquidityPoolType) XXX_Size() int

func (*LiquidityPoolType) XXX_Unmarshal

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

type LiquidityPoolTypeLegacy

type LiquidityPoolTypeLegacy struct {
	PoolTypeIndex         uint16
	NumOfReserveCoins     uint16
	SwapPriceFunctionName string
	Description           string
}

type LiquidityPools

type LiquidityPools []LiquidityPool

LiquidityPools is a collection of liquidityPools

func (LiquidityPools) String

func (lps LiquidityPools) String() (out string)

type MsgCreateLiquidityPool

type MsgCreateLiquidityPool struct {
	PoolCreator       github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 169-byte string literal not displayed */
	PoolTypeIndex     uint32                                        `` /* 126-byte string literal not displayed */
	ReserveCoinDenoms []string                                      `` /* 141-byte string literal not displayed */
	DepositCoins      []types.Coin                                  `protobuf:"bytes,4,rep,name=deposit_coins,json=depositCoins,proto3" json:"deposit_coins" yaml:"deposit_coins"`
}

func NewMsgCreateLiquidityPool

func NewMsgCreateLiquidityPool(
	poolCreator sdk.AccAddress,
	poolTypeIndex uint32,
	reserveCoinDenoms []string,
	depositCoins sdk.Coins,
) *MsgCreateLiquidityPool

NewMsgSwap creates a new MsgSwap object.

func (*MsgCreateLiquidityPool) Descriptor

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

func (*MsgCreateLiquidityPool) Equal

func (this *MsgCreateLiquidityPool) Equal(that interface{}) bool

func (MsgCreateLiquidityPool) GetSignBytes

func (msg MsgCreateLiquidityPool) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgCreateLiquidityPool) GetSigners

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

GetSigners implements Msg.

func (*MsgCreateLiquidityPool) Marshal

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

func (*MsgCreateLiquidityPool) MarshalTo

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

func (*MsgCreateLiquidityPool) MarshalToSizedBuffer

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

func (*MsgCreateLiquidityPool) ProtoMessage

func (*MsgCreateLiquidityPool) ProtoMessage()

func (*MsgCreateLiquidityPool) Reset

func (m *MsgCreateLiquidityPool) Reset()

func (MsgCreateLiquidityPool) Route

func (msg MsgCreateLiquidityPool) Route() string

Route implements Msg.

func (*MsgCreateLiquidityPool) Size

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

func (*MsgCreateLiquidityPool) String

func (m *MsgCreateLiquidityPool) String() string

func (MsgCreateLiquidityPool) Type

func (msg MsgCreateLiquidityPool) Type() string

Type implements Msg.

func (*MsgCreateLiquidityPool) Unmarshal

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

func (MsgCreateLiquidityPool) ValidateBasic

func (msg MsgCreateLiquidityPool) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgCreateLiquidityPool) XXX_DiscardUnknown

func (m *MsgCreateLiquidityPool) XXX_DiscardUnknown()

func (*MsgCreateLiquidityPool) XXX_Marshal

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

func (*MsgCreateLiquidityPool) XXX_Merge

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

func (*MsgCreateLiquidityPool) XXX_Size

func (m *MsgCreateLiquidityPool) XXX_Size() int

func (*MsgCreateLiquidityPool) XXX_Unmarshal

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

type MsgDepositToLiquidityPool

type MsgDepositToLiquidityPool struct {
	Depositor    github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 143-byte string literal not displayed */
	PoolID       uint64                                        `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	DepositCoins []types.Coin                                  `protobuf:"bytes,3,rep,name=deposit_coins,json=depositCoins,proto3" json:"deposit_coins" yaml:"deposit_coins"`
}

func NewMsgDepositToLiquidityPool

func NewMsgDepositToLiquidityPool(
	depositor sdk.AccAddress,
	poolID uint64,
	depositCoins sdk.Coins,
) *MsgDepositToLiquidityPool

NewMsgSwap creates a new MsgSwap object.

func (*MsgDepositToLiquidityPool) Descriptor

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

func (*MsgDepositToLiquidityPool) Equal

func (this *MsgDepositToLiquidityPool) Equal(that interface{}) bool

func (MsgDepositToLiquidityPool) GetSignBytes

func (msg MsgDepositToLiquidityPool) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgDepositToLiquidityPool) GetSigners

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

GetSigners implements Msg.

func (*MsgDepositToLiquidityPool) Marshal

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

func (*MsgDepositToLiquidityPool) MarshalTo

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

func (*MsgDepositToLiquidityPool) MarshalToSizedBuffer

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

func (*MsgDepositToLiquidityPool) ProtoMessage

func (*MsgDepositToLiquidityPool) ProtoMessage()

func (*MsgDepositToLiquidityPool) Reset

func (m *MsgDepositToLiquidityPool) Reset()

func (MsgDepositToLiquidityPool) Route

func (msg MsgDepositToLiquidityPool) Route() string

Route implements Msg.

func (*MsgDepositToLiquidityPool) Size

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

func (*MsgDepositToLiquidityPool) String

func (m *MsgDepositToLiquidityPool) String() string

func (MsgDepositToLiquidityPool) Type

func (msg MsgDepositToLiquidityPool) Type() string

Type implements Msg.

func (*MsgDepositToLiquidityPool) Unmarshal

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

func (MsgDepositToLiquidityPool) ValidateBasic

func (msg MsgDepositToLiquidityPool) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgDepositToLiquidityPool) XXX_DiscardUnknown

func (m *MsgDepositToLiquidityPool) XXX_DiscardUnknown()

func (*MsgDepositToLiquidityPool) XXX_Marshal

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

func (*MsgDepositToLiquidityPool) XXX_Merge

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

func (*MsgDepositToLiquidityPool) XXX_Size

func (m *MsgDepositToLiquidityPool) XXX_Size() int

func (*MsgDepositToLiquidityPool) XXX_Unmarshal

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

type MsgSwap

type MsgSwap struct {
	SwapRequester github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 177-byte string literal not displayed */
	PoolID        uint64                                        `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	PoolTypeIndex uint32                                        `` /* 126-byte string literal not displayed */
	SwapType      uint32                                        `protobuf:"varint,4,opt,name=swap_type,json=swapType,proto3" json:"swap_type,omitempty" yaml:"swap_type"`
	OfferCoin     types.Coin                                    `protobuf:"bytes,5,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"`
	DemandCoin    types.Coin                                    `protobuf:"bytes,6,opt,name=demand_coin,json=demandCoin,proto3" json:"demand_coin" yaml:"demand_coin"`
	OrderPrice    github_com_cosmos_cosmos_sdk_types.Dec        `` /* 150-byte string literal not displayed */
}

func NewMsgSwap

func NewMsgSwap(
	swapRequester sdk.AccAddress,
	poolID uint64,
	poolTypeIndex uint32,
	swapType uint32,
	offerCoin sdk.Coin,
	demandCoin sdk.Coin,
	orderPrice sdk.Dec,
) *MsgSwap

NewMsgSwap creates a new MsgSwap object.

func (*MsgSwap) Descriptor

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

func (*MsgSwap) Equal

func (this *MsgSwap) Equal(that interface{}) bool

func (MsgSwap) GetSignBytes

func (msg MsgSwap) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgSwap) GetSigners

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

GetSigners implements Msg.

func (*MsgSwap) Marshal

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

func (*MsgSwap) MarshalTo

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

func (*MsgSwap) MarshalToSizedBuffer

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

func (*MsgSwap) ProtoMessage

func (*MsgSwap) ProtoMessage()

func (*MsgSwap) Reset

func (m *MsgSwap) Reset()

func (MsgSwap) Route

func (msg MsgSwap) Route() string

Route implements Msg.

func (*MsgSwap) Size

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

func (*MsgSwap) String

func (m *MsgSwap) String() string

func (MsgSwap) Type

func (msg MsgSwap) Type() string

Type implements Msg.

func (*MsgSwap) Unmarshal

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

func (MsgSwap) ValidateBasic

func (msg MsgSwap) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgSwap) XXX_DiscardUnknown

func (m *MsgSwap) XXX_DiscardUnknown()

func (*MsgSwap) XXX_Marshal

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

func (*MsgSwap) XXX_Merge

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

func (*MsgSwap) XXX_Size

func (m *MsgSwap) XXX_Size() int

func (*MsgSwap) XXX_Unmarshal

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

type MsgWithdrawFromLiquidityPool

type MsgWithdrawFromLiquidityPool struct {
	Withdrawer github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 146-byte string literal not displayed */
	PoolID     uint64                                        `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	PoolCoin   []types.Coin                                  `protobuf:"bytes,3,rep,name=pool_coin,json=poolCoin,proto3" json:"pool_coin" yaml:"pool_coin"`
}

func NewMsgWithdrawFromLiquidityPool

func NewMsgWithdrawFromLiquidityPool(
	withdrawer sdk.AccAddress,
	poolID uint64,
	poolCoin sdk.Coins,
) *MsgWithdrawFromLiquidityPool

NewMsgSwap creates a new MsgSwap object.

func (*MsgWithdrawFromLiquidityPool) Descriptor

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

func (*MsgWithdrawFromLiquidityPool) Equal

func (this *MsgWithdrawFromLiquidityPool) Equal(that interface{}) bool

func (MsgWithdrawFromLiquidityPool) GetSignBytes

func (msg MsgWithdrawFromLiquidityPool) GetSignBytes() []byte

GetSignBytes implements Msg.

func (MsgWithdrawFromLiquidityPool) GetSigners

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

GetSigners implements Msg.

func (*MsgWithdrawFromLiquidityPool) Marshal

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

func (*MsgWithdrawFromLiquidityPool) MarshalTo

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

func (*MsgWithdrawFromLiquidityPool) MarshalToSizedBuffer

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

func (*MsgWithdrawFromLiquidityPool) ProtoMessage

func (*MsgWithdrawFromLiquidityPool) ProtoMessage()

func (*MsgWithdrawFromLiquidityPool) Reset

func (m *MsgWithdrawFromLiquidityPool) Reset()

func (MsgWithdrawFromLiquidityPool) Route

Route implements Msg.

func (*MsgWithdrawFromLiquidityPool) Size

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

func (*MsgWithdrawFromLiquidityPool) String

func (MsgWithdrawFromLiquidityPool) Type

Type implements Msg.

func (*MsgWithdrawFromLiquidityPool) Unmarshal

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

func (MsgWithdrawFromLiquidityPool) ValidateBasic

func (msg MsgWithdrawFromLiquidityPool) ValidateBasic() error

ValidateBasic implements Msg.

func (*MsgWithdrawFromLiquidityPool) XXX_DiscardUnknown

func (m *MsgWithdrawFromLiquidityPool) XXX_DiscardUnknown()

func (*MsgWithdrawFromLiquidityPool) XXX_Marshal

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

func (*MsgWithdrawFromLiquidityPool) XXX_Merge

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

func (*MsgWithdrawFromLiquidityPool) XXX_Size

func (m *MsgWithdrawFromLiquidityPool) XXX_Size() int

func (*MsgWithdrawFromLiquidityPool) XXX_Unmarshal

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

type Params

type Params struct {
	LiquidityPoolTypes       []LiquidityPoolType                    `protobuf:"bytes,1,rep,name=LiquidityPoolTypes,proto3" json:"LiquidityPoolTypes" yaml:"liquidity_pool_types"`
	MinInitDepositToPool     github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
	InitPoolCoinMintAmount   github_com_cosmos_cosmos_sdk_types.Int `` /* 171-byte string literal not displayed */
	SwapFeeRate              github_com_cosmos_cosmos_sdk_types.Dec `` /* 136-byte string literal not displayed */
	LiquidityPoolFeeRate     github_com_cosmos_cosmos_sdk_types.Dec `` /* 164-byte string literal not displayed */
	LiquidityPoolCreationFee []types.Coin                           `` /* 126-byte string literal not displayed */
	UnitBatchSize            uint32                                 `protobuf:"varint,7,opt,name=UnitBatchSize,proto3" json:"UnitBatchSize,omitempty" yaml:"unit_batch_size"`
}

func DefaultParams

func DefaultParams() Params

DefaultParams returns the default liquidity module parameters

func NewParams

func NewParams(liquidityPoolTypes []LiquidityPoolType, minInitDeposit, initPoolCoinMint sdk.Int, swapFeeRate, poolFeeRate sdk.Dec, creationFee sdk.Coins, unitBatchSize uint32) Params

NewParams liquidity paramtypes constructor

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

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

KeyValuePairs implements paramtypes.KeyValuePairs

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 (p Params) String() string

String returns a human readable string representation of the parameters.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate returns err if Params is invalid

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 QueryClient

type QueryClient interface {
	LiquidityPool(ctx context.Context, in *QueryLiquidityPoolRequest, opts ...grpc.CallOption) (*QueryLiquidityPoolResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryLiquidityPoolParams

type QueryLiquidityPoolParams struct {
	PoolID uint64 `json:"pool_id" yaml:"pool_id"`
}

QueryLiquidityPoolParams is the query parameters for 'custom/liquidity'

type QueryLiquidityPoolRequest

type QueryLiquidityPoolRequest struct {
	PoolID uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

func (*QueryLiquidityPoolRequest) Descriptor

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

func (*QueryLiquidityPoolRequest) GetPoolID

func (m *QueryLiquidityPoolRequest) GetPoolID() uint64

func (*QueryLiquidityPoolRequest) Marshal

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

func (*QueryLiquidityPoolRequest) MarshalTo

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

func (*QueryLiquidityPoolRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolRequest) ProtoMessage

func (*QueryLiquidityPoolRequest) ProtoMessage()

func (*QueryLiquidityPoolRequest) Reset

func (m *QueryLiquidityPoolRequest) Reset()

func (*QueryLiquidityPoolRequest) Size

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

func (*QueryLiquidityPoolRequest) String

func (m *QueryLiquidityPoolRequest) String() string

func (*QueryLiquidityPoolRequest) Unmarshal

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

func (*QueryLiquidityPoolRequest) XXX_DiscardUnknown

func (m *QueryLiquidityPoolRequest) XXX_DiscardUnknown()

func (*QueryLiquidityPoolRequest) XXX_Marshal

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

func (*QueryLiquidityPoolRequest) XXX_Merge

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

func (*QueryLiquidityPoolRequest) XXX_Size

func (m *QueryLiquidityPoolRequest) XXX_Size() int

func (*QueryLiquidityPoolRequest) XXX_Unmarshal

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

type QueryLiquidityPoolResponse

type QueryLiquidityPoolResponse struct {
	LiquidityPool LiquidityPool `protobuf:"bytes,1,opt,name=liquidity_pool,json=liquidityPool,proto3" json:"liquidity_pool"`
}

func (*QueryLiquidityPoolResponse) Descriptor

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

func (*QueryLiquidityPoolResponse) GetLiquidityPool

func (m *QueryLiquidityPoolResponse) GetLiquidityPool() LiquidityPool

func (*QueryLiquidityPoolResponse) Marshal

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

func (*QueryLiquidityPoolResponse) MarshalTo

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

func (*QueryLiquidityPoolResponse) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolResponse) ProtoMessage

func (*QueryLiquidityPoolResponse) ProtoMessage()

func (*QueryLiquidityPoolResponse) Reset

func (m *QueryLiquidityPoolResponse) Reset()

func (*QueryLiquidityPoolResponse) Size

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

func (*QueryLiquidityPoolResponse) String

func (m *QueryLiquidityPoolResponse) String() string

func (*QueryLiquidityPoolResponse) Unmarshal

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

func (*QueryLiquidityPoolResponse) XXX_DiscardUnknown

func (m *QueryLiquidityPoolResponse) XXX_DiscardUnknown()

func (*QueryLiquidityPoolResponse) XXX_Marshal

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

func (*QueryLiquidityPoolResponse) XXX_Merge

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

func (*QueryLiquidityPoolResponse) XXX_Size

func (m *QueryLiquidityPoolResponse) XXX_Size() int

func (*QueryLiquidityPoolResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	LiquidityPool(context.Context, *QueryLiquidityPoolRequest) (*QueryLiquidityPoolResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) LiquidityPool

Jump to

Keyboard shortcuts

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