Documentation ¶
Index ¶
- func GetInOutTokens(tokenIn, tokenA, tokenB string) (_, tokenOut string)
- func GetPoolMetadataIDBytes(id uint64) []byte
- func NewLimitOrderExpiration(tranche *types.LimitOrderTranche) *types.LimitOrderExpiration
- func NewLimitOrderTranche(limitOrderTrancheKey *types.LimitOrderTrancheKey, goodTil *time.Time) (*types.LimitOrderTranche, error)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewTrancheKey(ctx sdk.Context) string
- func NormalizeAllTickIndexes(takerDenom, token0 string, tickIndexes []int64) []int64
- func SortAmounts(tokenA, token0 string, amountsA, amountsB []math.Int) ([]math.Int, []math.Int)
- type Keeper
- func (k Keeper) AssertCanPlaceJIT(ctx sdk.Context) error
- func (k Keeper) BurnShares(ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) error
- func (k Keeper) CalcWithdrawableShares(ctx sdk.Context, trancheUser types.LimitOrderTrancheUser) (amount math.Int, err error)
- func (k Keeper) CalulateMultiHopSwap(ctx sdk.Context, amountIn math.Int, routes []*types.MultiHopRoute, ...) (bestRoute MultiHopRouteOutput, initialInCoin sdk.Coin, err error)
- func (k Keeper) CancelLimitOrderCore(goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress) (makerCoinOut, takerCoinOut sdk.Coin, err error)
- func (k Keeper) DepositCore(goCtx context.Context, pairID *types.PairID, callerAddr sdk.AccAddress, ...) (amounts0Deposit, amounts1Deposit []math.Int, sharesIssued sdk.Coins, ...)
- func (k Keeper) EstimateMultiHopSwap(goCtx context.Context, req *types.QueryEstimateMultiHopSwapRequest) (*types.QueryEstimateMultiHopSwapResponse, error)
- func (k Keeper) EstimatePlaceLimitOrder(goCtx context.Context, req *types.QueryEstimatePlaceLimitOrderRequest) (*types.QueryEstimatePlaceLimitOrderResponse, error)
- func (k Keeper) ExecuteCancelLimitOrder(ctx sdk.Context, trancheKey string, callerAddr sdk.AccAddress) (makerCoinOut, takerCoinOut sdk.Coin, error error)
- func (k Keeper) ExecuteDeposit(ctx sdk.Context, pairID *types.PairID, callerAddr sdk.AccAddress, ...) (amounts0Deposited, amounts1Deposited []math.Int, ...)
- func (k Keeper) ExecutePlaceLimitOrder(ctx sdk.Context, takerTradePairID *types.TradePairID, amountIn math.Int, ...) (trancheKey string, totalIn math.Int, swapInCoin, swapOutCoin sdk.Coin, ...)
- func (k Keeper) ExecuteWithdraw(ctx sdk.Context, pairID *types.PairID, callerAddr sdk.AccAddress, ...) (totalReserves0ToRemove, totalReserves1ToRemove math.Int, coinsToBurn sdk.Coins, ...)
- func (k Keeper) ExecuteWithdrawFilledLimitOrder(ctx sdk.Context, trancheKey string, callerAddr sdk.AccAddress) (takerCoinOut, makerCoinOut sdk.Coin, err error)
- func (k Keeper) FindLimitOrderTranche(ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey) (val *types.LimitOrderTranche, fromFilled, found bool)
- func (k Keeper) GetAllDepositsForAddress(ctx sdk.Context, addr sdk.AccAddress) []*types.DepositRecord
- func (k Keeper) GetAllInactiveLimitOrderTranche(ctx sdk.Context) (list []*types.LimitOrderTranche)
- func (k Keeper) GetAllLimitOrderExpiration(ctx sdk.Context) (list []*types.LimitOrderExpiration)
- func (k Keeper) GetAllLimitOrderTrancheAtIndex(sdkCtx sdk.Context, tradePairID *types.TradePairID, ...) (trancheList []types.LimitOrderTranche)
- func (k Keeper) GetAllLimitOrderTrancheUser(ctx sdk.Context) (list []*types.LimitOrderTrancheUser)
- func (k Keeper) GetAllLimitOrderTrancheUserForAddress(ctx sdk.Context, address sdk.AccAddress) (list []*types.LimitOrderTrancheUser)
- func (k Keeper) GetAllPoolMetadata(ctx sdk.Context) (list []types.PoolMetadata)
- func (k Keeper) GetAllPoolShareholders(ctx sdk.Context) map[uint64][]types.PoolShareholder
- func (k Keeper) GetAllTickLiquidity(ctx sdk.Context) (list []*types.TickLiquidity)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetCurrLiq(ctx sdk.Context, tradePairID *types.TradePairID) *types.TickLiquidity
- func (k Keeper) GetCurrPrice(ctx sdk.Context, tradePairID *types.TradePairID) (math_utils.PrecDec, bool)
- func (k Keeper) GetCurrTickIndexTakerToMaker(ctx sdk.Context, tradePairID *types.TradePairID) (int64, bool)
- func (k Keeper) GetCurrTickIndexTakerToMakerNormalized(ctx sdk.Context, tradePairID *types.TradePairID) (int64, bool)
- func (k Keeper) GetFillTranche(sdkCtx sdk.Context, tradePairID *types.TradePairID, ...) (*types.LimitOrderTranche, bool)
- func (k Keeper) GetGTCPlaceTranche(sdkCtx sdk.Context, tradePairID *types.TradePairID, ...) *types.LimitOrderTranche
- func (k Keeper) GetGoodTilPurgeAllowance(ctx sdk.Context) uint64
- func (k Keeper) GetInactiveLimitOrderTranche(ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey) (val *types.LimitOrderTranche, found bool)
- func (k Keeper) GetJITsInBlockCount(ctx sdk.Context) uint64
- func (k Keeper) GetLimitOrderExpiration(ctx sdk.Context, goodTilDate time.Time, trancheRef []byte) (val *types.LimitOrderExpiration, found bool)
- func (k Keeper) GetLimitOrderTranche(ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey) (tranche *types.LimitOrderTranche)
- func (k Keeper) GetLimitOrderTrancheByKey(ctx sdk.Context, key []byte) (tranche *types.LimitOrderTranche, found bool)
- func (k Keeper) GetLimitOrderTrancheUser(ctx sdk.Context, address string, trancheKey string) (val *types.LimitOrderTrancheUser, found bool)
- func (k Keeper) GetMaxJITsPerBlock(ctx sdk.Context) uint64
- func (k Keeper) GetNextPoolID(ctx sdk.Context) uint64
- func (k Keeper) GetOrInitLimitOrderTrancheUser(ctx sdk.Context, tradePairID *types.TradePairID, tickIndex int64, ...) *types.LimitOrderTrancheUser
- func (k Keeper) GetOrInitPlaceTranche(ctx sdk.Context, tradePairID *types.TradePairID, tickIndexTakerToMaker int64, ...) (placeTranche *types.LimitOrderTranche, err error)
- func (k Keeper) GetOrInitPool(ctx sdk.Context, pairID *types.PairID, centerTickIndexNormalized int64, ...) (*types.Pool, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPool(ctx sdk.Context, pairID *types.PairID, centerTickIndexNormalized int64, ...) (pool *types.Pool, found bool)
- func (k Keeper) GetPoolByID(ctx sdk.Context, poolID uint64) (pool *types.Pool, found bool)
- func (k Keeper) GetPoolCount(ctx sdk.Context) uint64
- func (k Keeper) GetPoolIDByParams(ctx sdk.Context, pairID *types.PairID, centerTickIndexNormalized int64, ...) (id uint64, found bool)
- func (k Keeper) GetPoolMetadata(ctx sdk.Context, id uint64) (val types.PoolMetadata, found bool)
- func (k Keeper) GetPoolMetadataByDenom(ctx sdk.Context, denom string) (pm types.PoolMetadata, err error)
- func (k Keeper) GetPoolReserves(ctx sdk.Context, poolReservesID *types.PoolReservesKey) (pool *types.PoolReserves, found bool)
- func (k Keeper) GetValidFees(ctx sdk.Context) []uint64
- func (k Keeper) HopsToRouteData(ctx sdk.Context, hops []string) ([]MultihopStep, error)
- func (k Keeper) InactiveLimitOrderTranche(c context.Context, req *types.QueryGetInactiveLimitOrderTrancheRequest) (*types.QueryGetInactiveLimitOrderTrancheResponse, error)
- func (k Keeper) InactiveLimitOrderTrancheAll(c context.Context, req *types.QueryAllInactiveLimitOrderTrancheRequest) (*types.QueryAllInactiveLimitOrderTrancheResponse, error)
- func (k Keeper) IncrementJITsInBlock(ctx sdk.Context)
- func (k Keeper) InitPool(ctx sdk.Context, pairID *types.PairID, centerTickIndexNormalized int64, ...) (pool *types.Pool, err error)
- func (k Keeper) IsBehindEnemyLines(ctx sdk.Context, tradePairID *types.TradePairID, tickIndex int64) bool
- func (k Keeper) IsPoolBehindEnemyLines(ctx sdk.Context, pairID *types.PairID, tickIndex int64, fee uint64, ...) bool
- func (k Keeper) LimitOrderTranche(c context.Context, req *types.QueryGetLimitOrderTrancheRequest) (*types.QueryGetLimitOrderTrancheResponse, error)
- func (k Keeper) LimitOrderTrancheAll(c context.Context, req *types.QueryAllLimitOrderTrancheRequest) (*types.QueryAllLimitOrderTrancheResponse, error)
- func (k Keeper) LimitOrderTrancheUser(c context.Context, req *types.QueryGetLimitOrderTrancheUserRequest) (*types.QueryGetLimitOrderTrancheUserResponse, error)
- func (k Keeper) LimitOrderTrancheUserAll(c context.Context, req *types.QueryAllLimitOrderTrancheUserRequest) (*types.QueryAllLimitOrderTrancheUserResponse, error)
- func (k Keeper) LimitOrderTrancheUserAllByAddress(goCtx context.Context, ...) (*types.QueryAllLimitOrderTrancheUserByAddressResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MakerLimitOrderSwap(ctx sdk.Context, tradePairID types.TradePairID, amountIn math.Int, ...) (totalInCoin, totalOutCoin sdk.Coin, filled bool, err error)
- func (k Keeper) MintShares(ctx sdk.Context, addr sdk.AccAddress, sharesCoins sdk.Coins) error
- func (k Keeper) MultiHopSwapCore(goCtx context.Context, amountIn math.Int, routes []*types.MultiHopRoute, ...) (coinOut sdk.Coin, route []string, dust sdk.Coins, err error)
- func (k Keeper) MultihopStep(bCtx *types.BranchableCache, step MultihopStep, inCoin sdk.Coin, ...) (sdk.Coin, sdk.Coin, *types.BranchableCache, error)
- func (k Keeper) NewLiquidityIterator(ctx sdk.Context, tradePairID *types.TradePairID) *LiquidityIterator
- func (k Keeper) NewTickIterator(ctx sdk.Context, tradePairID *types.TradePairID) TickIterator
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PlaceLimitOrderCore(goCtx context.Context, tokenIn string, tokenOut string, amountIn math.Int, ...) (trancheKey string, totalInCoin, swapInCoin, swapOutCoin sdk.Coin, err error)
- func (k Keeper) Pool(goCtx context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
- func (k Keeper) PoolByID(goCtx context.Context, req *types.QueryPoolByIDRequest) (*types.QueryPoolResponse, error)
- func (k Keeper) PoolMetadata(goCtx context.Context, req *types.QueryGetPoolMetadataRequest) (*types.QueryGetPoolMetadataResponse, error)
- func (k Keeper) PoolMetadataAll(goCtx context.Context, req *types.QueryAllPoolMetadataRequest) (*types.QueryAllPoolMetadataResponse, error)
- func (k Keeper) PoolReserves(goCtx context.Context, req *types.QueryGetPoolReservesRequest) (*types.QueryGetPoolReservesResponse, error)
- func (k Keeper) PoolReservesAll(goCtx context.Context, req *types.QueryAllPoolReservesRequest) (*types.QueryAllPoolReservesResponse, error)
- func (k Keeper) PurgeExpiredLimitOrders(ctx sdk.Context, curTime time.Time)
- func (k Keeper) RemoveInactiveLimitOrderTranche(ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey)
- func (k Keeper) RemoveLimitOrderExpiration(ctx sdk.Context, goodTilDate time.Time, trancheRef []byte)
- func (k Keeper) RemoveLimitOrderExpirationByKey(ctx sdk.Context, key []byte)
- func (k Keeper) RemoveLimitOrderTranche(ctx sdk.Context, trancheKey *types.LimitOrderTrancheKey)
- func (k Keeper) RemoveLimitOrderTrancheUser(ctx sdk.Context, trancheUser *types.LimitOrderTrancheUser)
- func (k Keeper) RemoveLimitOrderTrancheUserByKey(ctx sdk.Context, trancheKey string, address string)
- func (k Keeper) RemovePoolMetadata(ctx sdk.Context, id uint64)
- func (k Keeper) RemovePoolReserves(ctx sdk.Context, poolReservesID *types.PoolReservesKey)
- func (k Keeper) RunMultihopRoute(ctx sdk.Context, route types.MultiHopRoute, initialInCoin sdk.Coin, ...) (sdk.Coins, sdk.Coin, func(), error)
- func (k Keeper) SaveLiquidity(sdkCtx sdk.Context, liquidityI types.Liquidity)
- func (k Keeper) SetInactiveLimitOrderTranche(ctx sdk.Context, limitOrderTranche *types.LimitOrderTranche)
- func (k Keeper) SetJITsInBlockCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetLimitOrderExpiration(ctx sdk.Context, goodTilRecord *types.LimitOrderExpiration)
- func (k Keeper) SetLimitOrderTranche(ctx sdk.Context, tranche *types.LimitOrderTranche)
- func (k Keeper) SetLimitOrderTrancheUser(ctx sdk.Context, limitOrderTrancheUser *types.LimitOrderTrancheUser)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetPoolCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetPoolMetadata(ctx sdk.Context, poolMetadata types.PoolMetadata)
- func (k Keeper) SetPoolReserves(ctx sdk.Context, poolReserves *types.PoolReserves)
- func (k Keeper) SimulateCancelLimitOrder(goCtx context.Context, req *types.QuerySimulateCancelLimitOrderRequest) (*types.QuerySimulateCancelLimitOrderResponse, error)
- func (k Keeper) SimulateDeposit(goCtx context.Context, req *types.QuerySimulateDepositRequest) (*types.QuerySimulateDepositResponse, error)
- func (k Keeper) SimulateMultiHopSwap(goCtx context.Context, req *types.QuerySimulateMultiHopSwapRequest) (*types.QuerySimulateMultiHopSwapResponse, error)
- func (k Keeper) SimulatePlaceLimitOrder(goCtx context.Context, req *types.QuerySimulatePlaceLimitOrderRequest) (*types.QuerySimulatePlaceLimitOrderResponse, error)
- func (k Keeper) SimulateWithdrawFilledLimitOrder(goCtx context.Context, req *types.QuerySimulateWithdrawFilledLimitOrderRequest) (*types.QuerySimulateWithdrawFilledLimitOrderResponse, error)
- func (k Keeper) SimulateWithdrawal(goCtx context.Context, req *types.QuerySimulateWithdrawalRequest) (*types.QuerySimulateWithdrawalResponse, error)
- func (k Keeper) StorePoolIDRef(ctx sdk.Context, poolID uint64, pairID *types.PairID, ...)
- func (k Keeper) Swap(ctx sdk.Context, tradePairID *types.TradePairID, maxAmountTakerDenom math.Int, ...) (totalTakerCoin, totalMakerCoin sdk.Coin, orderFilled bool, err error)
- func (k Keeper) SwapFullAmountIn(ctx sdk.Context, tradePairID *types.TradePairID, amountIn math.Int) (dust, totalOut sdk.Coin, err error)
- func (k Keeper) SwapWithCache(ctx sdk.Context, tradePairID *types.TradePairID, maxAmountIn math.Int, ...) (totalIn, totalOut sdk.Coin, orderFilled bool, err error)
- func (k Keeper) TakerLimitOrderSwap(ctx sdk.Context, tradePairID types.TradePairID, amountIn math.Int, ...) (totalInCoin, totalOutCoin sdk.Coin, err error)
- func (k Keeper) TickLiquidityAll(c context.Context, req *types.QueryAllTickLiquidityRequest) (*types.QueryAllTickLiquidityResponse, error)
- func (k Keeper) UpdateInactiveTranche(sdkCtx sdk.Context, tranche *types.LimitOrderTranche)
- func (k Keeper) UpdatePool(ctx sdk.Context, pool *types.Pool)
- func (k Keeper) UpdatePoolReserves(ctx sdk.Context, reserves *types.PoolReserves)
- func (k Keeper) UpdateTranche(ctx sdk.Context, tranche *types.LimitOrderTranche)
- func (k Keeper) UpdateTrancheUser(ctx sdk.Context, trancheUser *types.LimitOrderTrancheUser)
- func (k Keeper) UserDepositsAll(goCtx context.Context, req *types.QueryAllUserDepositsRequest) (*types.QueryAllUserDepositsResponse, error)
- func (k Keeper) ValidateFee(ctx sdk.Context, fee uint64) error
- func (k Keeper) WithdrawCore(goCtx context.Context, pairID *types.PairID, callerAddr sdk.AccAddress, ...) (reserves0ToRemoved, reserves1ToRemoved math.Int, sharesBurned sdk.Coins, ...)
- func (k Keeper) WithdrawFilledLimitOrderCore(goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress) (takerCoinOut, makerCoinOut sdk.Coin, err error)
- type LiquidityIterator
- type Migrator
- type MsgServer
- func (k MsgServer) AssertNotPaused(goCtx context.Context) error
- func (k MsgServer) CancelLimitOrder(goCtx context.Context, msg *types.MsgCancelLimitOrder) (*types.MsgCancelLimitOrderResponse, error)
- func (k MsgServer) Deposit(goCtx context.Context, msg *types.MsgDeposit) (*types.MsgDepositResponse, error)
- func (k MsgServer) MultiHopSwap(goCtx context.Context, msg *types.MsgMultiHopSwap) (*types.MsgMultiHopSwapResponse, error)
- func (k MsgServer) PlaceLimitOrder(goCtx context.Context, msg *types.MsgPlaceLimitOrder) (*types.MsgPlaceLimitOrderResponse, error)
- func (k MsgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- func (k MsgServer) WithdrawFilledLimitOrder(goCtx context.Context, msg *types.MsgWithdrawFilledLimitOrder) (*types.MsgWithdrawFilledLimitOrderResponse, error)
- func (k MsgServer) Withdrawal(goCtx context.Context, msg *types.MsgWithdrawal) (*types.MsgWithdrawalResponse, error)
- type MultiHopRouteOutput
- type MultihopStep
- type StepResult
- type TickIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInOutTokens ¶
func GetPoolMetadataIDBytes ¶
GetPoolMetadataIDBytes returns the byte representation of the ID
func NewLimitOrderExpiration ¶
func NewLimitOrderExpiration(tranche *types.LimitOrderTranche) *types.LimitOrderExpiration
Creates a new LimitOrderExpiration struct based on a LimitOrderTranche
func NewLimitOrderTranche ¶
func NewLimitOrderTranche( limitOrderTrancheKey *types.LimitOrderTrancheKey, goodTil *time.Time, ) (*types.LimitOrderTranche, error)
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewTrancheKey ¶
func NormalizeAllTickIndexes ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, tKey storetypes.StoreKey, bankKeeper types.BankKeeper, authority string, ) *Keeper
func (Keeper) BurnShares ¶
func (Keeper) CalcWithdrawableShares ¶
func (Keeper) CalulateMultiHopSwap ¶
func (k Keeper) CalulateMultiHopSwap( ctx sdk.Context, amountIn math.Int, routes []*types.MultiHopRoute, exitLimitPrice math_utils.PrecDec, pickBestRoute bool, ) (bestRoute MultiHopRouteOutput, initialInCoin sdk.Coin, err error)
CalulateMultiHopSwap handles the core logic for MultiHopSwap -- simulating swap operations across all routes (when applicable) and picking the best route to execute. It uses a cache and does not modify state.
func (Keeper) CancelLimitOrderCore ¶
func (k Keeper) CancelLimitOrderCore( goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress, ) (makerCoinOut, takerCoinOut sdk.Coin, err error)
CancelLimitOrderCore handles the logic for MsgCancelLimitOrder including bank operations and event emissions.
func (Keeper) DepositCore ¶
func (k Keeper) DepositCore( goCtx context.Context, pairID *types.PairID, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, amounts0 []math.Int, amounts1 []math.Int, tickIndices []int64, fees []uint64, options []*types.DepositOptions, ) (amounts0Deposit, amounts1Deposit []math.Int, sharesIssued sdk.Coins, failedDeposits []*types.FailedDeposit, err error)
DepositCore handles core logic for MsgDeposit including bank operations and event emissions
func (Keeper) EstimateMultiHopSwap ¶
func (k Keeper) EstimateMultiHopSwap( goCtx context.Context, req *types.QueryEstimateMultiHopSwapRequest, ) (*types.QueryEstimateMultiHopSwapResponse, error)
TODO: This doesn't run ValidateBasic() checks.
func (Keeper) EstimatePlaceLimitOrder ¶
func (k Keeper) EstimatePlaceLimitOrder( goCtx context.Context, req *types.QueryEstimatePlaceLimitOrderRequest, ) (*types.QueryEstimatePlaceLimitOrderResponse, error)
TODO: This doesn't run ValidateBasic() checks.
func (Keeper) ExecuteCancelLimitOrder ¶
func (k Keeper) ExecuteCancelLimitOrder( ctx sdk.Context, trancheKey string, callerAddr sdk.AccAddress, ) (makerCoinOut, takerCoinOut sdk.Coin, error error)
ExecuteCancelLimitOrder handles the core logic for CancelLimitOrder -- removing remaining TokenIn from the LimitOrderTranche and returning it to the user, updating the number of canceled shares on the LimitOrderTrancheUser. IT DOES NOT PERFORM ANY BANKING OPERATIONS
func (Keeper) ExecuteDeposit ¶
func (k Keeper) ExecuteDeposit( ctx sdk.Context, pairID *types.PairID, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, amounts0 []math.Int, amounts1 []math.Int, tickIndices []int64, fees []uint64, options []*types.DepositOptions) ( amounts0Deposited, amounts1Deposited []math.Int, totalAmountReserve0, totalAmountReserve1 math.Int, sharesIssued sdk.Coins, events sdk.Events, failedDeposits []*types.FailedDeposit, err error, )
ExecuteDeposit handles core logic for deposits -- checking and initializing data structures (tick, pair), calculating shares based on amount deposited. IT DOES NOT PERFORM ANY BANKING OPERATIONS.
func (Keeper) ExecutePlaceLimitOrder ¶
func (k Keeper) ExecutePlaceLimitOrder( ctx sdk.Context, takerTradePairID *types.TradePairID, amountIn math.Int, tickIndexInToOut int64, orderType types.LimitOrderType, goodTil *time.Time, maxAmountOut *math.Int, minAvgSellPriceP *math_utils.PrecDec, receiverAddr sdk.AccAddress, ) ( trancheKey string, totalIn math.Int, swapInCoin, swapOutCoin sdk.Coin, sharesIssued math.Int, minAvgSellPrice math_utils.PrecDec, err error, )
ExecutePlaceLimitOrder handles the core logic for PlaceLimitOrder -- performing taker a swap and (when applicable) adding a maker limit order to the orderbook. IT DOES NOT PERFORM ANY BANKING OPERATIONS
func (Keeper) ExecuteWithdraw ¶
func (k Keeper) ExecuteWithdraw( ctx sdk.Context, pairID *types.PairID, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, sharesToRemoveList []math.Int, tickIndicesNormalized []int64, fees []uint64, ) (totalReserves0ToRemove, totalReserves1ToRemove math.Int, coinsToBurn sdk.Coins, events sdk.Events, err error)
ExecuteWithdraw handles the core Withdraw logic including calculating and withdrawing reserve0,reserve1 from a specified tick given a specified number of shares to remove. Calculates the amount of reserve0, reserve1 to withdraw based on the percentage of the desired number of shares to remove compared to the total number of shares at the given tick. IT DOES NOT PERFORM ANY BANKING OPERATIONS.
func (Keeper) ExecuteWithdrawFilledLimitOrder ¶
func (k Keeper) ExecuteWithdrawFilledLimitOrder( ctx sdk.Context, trancheKey string, callerAddr sdk.AccAddress, ) (takerCoinOut, makerCoinOut sdk.Coin, err error)
ExecuteWithdrawFilledLimitOrder handles the for logic for WithdrawFilledLimitOrder -- calculates and sends filled liquidity from module to user, returns any remaining TokenIn from inactive limit orders, and updates the LimitOrderTranche and LimitOrderTrancheUser. IT DOES NOT PERFORM ANY BANKING OPERATIONS
func (Keeper) FindLimitOrderTranche ¶
func (k Keeper) FindLimitOrderTranche( ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey, ) (val *types.LimitOrderTranche, fromFilled, found bool)
func (Keeper) GetAllDepositsForAddress ¶
func (k Keeper) GetAllDepositsForAddress(ctx sdk.Context, addr sdk.AccAddress) []*types.DepositRecord
func (Keeper) GetAllInactiveLimitOrderTranche ¶
func (k Keeper) GetAllInactiveLimitOrderTranche(ctx sdk.Context) (list []*types.LimitOrderTranche)
GetAllInactiveLimitOrderTranche returns all inactiveLimitOrderTranche
func (Keeper) GetAllLimitOrderExpiration ¶
func (k Keeper) GetAllLimitOrderExpiration(ctx sdk.Context) (list []*types.LimitOrderExpiration)
GetAllLimitOrderExpiration returns all goodTilRecord
func (Keeper) GetAllLimitOrderTrancheAtIndex ¶
func (k Keeper) GetAllLimitOrderTrancheAtIndex( sdkCtx sdk.Context, tradePairID *types.TradePairID, tickIndexTakerToMaker int64, ) (trancheList []types.LimitOrderTranche)
func (Keeper) GetAllLimitOrderTrancheUser ¶
func (k Keeper) GetAllLimitOrderTrancheUser(ctx sdk.Context) (list []*types.LimitOrderTrancheUser)
GetAllLimitOrderTrancheUser returns all LimitOrderTrancheUser
func (Keeper) GetAllLimitOrderTrancheUserForAddress ¶
func (k Keeper) GetAllLimitOrderTrancheUserForAddress( ctx sdk.Context, address sdk.AccAddress, ) (list []*types.LimitOrderTrancheUser)
func (Keeper) GetAllPoolMetadata ¶
func (k Keeper) GetAllPoolMetadata(ctx sdk.Context) (list []types.PoolMetadata)
GetAllPoolMetadata returns all poolMetadata
func (Keeper) GetAllPoolShareholders ¶
func (Keeper) GetAllTickLiquidity ¶
func (k Keeper) GetAllTickLiquidity(ctx sdk.Context) (list []*types.TickLiquidity)
GetAllTickLiquidity returns all tickLiquidity
func (Keeper) GetAuthority ¶
func (Keeper) GetCurrLiq ¶
func (k Keeper) GetCurrLiq(ctx sdk.Context, tradePairID *types.TradePairID) *types.TickLiquidity
func (Keeper) GetCurrPrice ¶
func (k Keeper) GetCurrPrice(ctx sdk.Context, tradePairID *types.TradePairID) (math_utils.PrecDec, bool)
func (Keeper) GetCurrTickIndexTakerToMaker ¶
func (k Keeper) GetCurrTickIndexTakerToMaker( ctx sdk.Context, tradePairID *types.TradePairID, ) (int64, bool)
Returns a takerToMaker tick index
func (Keeper) GetCurrTickIndexTakerToMakerNormalized ¶
func (k Keeper) GetCurrTickIndexTakerToMakerNormalized( ctx sdk.Context, tradePairID *types.TradePairID, ) (int64, bool)
Returns a takerToMaker tick index
func (Keeper) GetFillTranche ¶
func (k Keeper) GetFillTranche( sdkCtx sdk.Context, tradePairID *types.TradePairID, tickIndexTakerToMaker int64, ) (*types.LimitOrderTranche, bool)
func (Keeper) GetGTCPlaceTranche ¶
func (k Keeper) GetGTCPlaceTranche( sdkCtx sdk.Context, tradePairID *types.TradePairID, tickIndexTakerToMaker int64, ) *types.LimitOrderTranche
func (Keeper) GetGoodTilPurgeAllowance ¶
func (Keeper) GetInactiveLimitOrderTranche ¶
func (k Keeper) GetInactiveLimitOrderTranche( ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey, ) (val *types.LimitOrderTranche, found bool)
GetInactiveLimitOrderTranche returns a inactiveLimitOrderTranche from its index
func (Keeper) GetJITsInBlockCount ¶
GetJITsInBlockCount gets the total number of JIT LimitOrders placed in a block
func (Keeper) GetLimitOrderExpiration ¶
func (k Keeper) GetLimitOrderExpiration( ctx sdk.Context, goodTilDate time.Time, trancheRef []byte, ) (val *types.LimitOrderExpiration, found bool)
GetLimitOrderExpiration returns a goodTilRecord from its index
func (Keeper) GetLimitOrderTranche ¶
func (k Keeper) GetLimitOrderTranche( ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey, ) (tranche *types.LimitOrderTranche)
func (Keeper) GetLimitOrderTrancheByKey ¶
func (Keeper) GetLimitOrderTrancheUser ¶
func (k Keeper) GetLimitOrderTrancheUser( ctx sdk.Context, address string, trancheKey string, ) (val *types.LimitOrderTrancheUser, found bool)
GetLimitOrderTrancheUser returns a LimitOrderTrancheUser from its index
func (Keeper) GetNextPoolID ¶
GetNextPoolId get ID for the next pool to be created
func (Keeper) GetOrInitLimitOrderTrancheUser ¶
func (k Keeper) GetOrInitLimitOrderTrancheUser( ctx sdk.Context, tradePairID *types.TradePairID, tickIndex int64, trancheKey string, orderType types.LimitOrderType, receiver string, ) *types.LimitOrderTrancheUser
func (Keeper) GetOrInitPlaceTranche ¶
func (k Keeper) GetOrInitPlaceTranche(ctx sdk.Context, tradePairID *types.TradePairID, tickIndexTakerToMaker int64, goodTil *time.Time, orderType types.LimitOrderType, ) (placeTranche *types.LimitOrderTranche, err error)
func (Keeper) GetOrInitPool ¶
func (Keeper) GetPoolByID ¶
func (Keeper) GetPoolCount ¶
GetPoolCount get the total number of pools
func (Keeper) GetPoolIDByParams ¶
func (Keeper) GetPoolMetadata ¶
GetPoolMetadata returns a poolMetadata from its id
func (Keeper) GetPoolMetadataByDenom ¶
func (Keeper) GetPoolReserves ¶
func (k Keeper) GetPoolReserves( ctx sdk.Context, poolReservesID *types.PoolReservesKey, ) (pool *types.PoolReserves, found bool)
func (Keeper) HopsToRouteData ¶
func (Keeper) InactiveLimitOrderTranche ¶
func (k Keeper) InactiveLimitOrderTranche( c context.Context, req *types.QueryGetInactiveLimitOrderTrancheRequest, ) (*types.QueryGetInactiveLimitOrderTrancheResponse, error)
func (Keeper) InactiveLimitOrderTrancheAll ¶
func (k Keeper) InactiveLimitOrderTrancheAll( c context.Context, req *types.QueryAllInactiveLimitOrderTrancheRequest, ) (*types.QueryAllInactiveLimitOrderTrancheResponse, error)
func (Keeper) IncrementJITsInBlock ¶
func (Keeper) IsBehindEnemyLines ¶
func (Keeper) IsPoolBehindEnemyLines ¶
func (Keeper) LimitOrderTranche ¶
func (k Keeper) LimitOrderTranche( c context.Context, req *types.QueryGetLimitOrderTrancheRequest, ) (*types.QueryGetLimitOrderTrancheResponse, error)
Returns a specific limit order tranche either from the tickLiquidity index or from the FillLimitOrderTranche index
func (Keeper) LimitOrderTrancheAll ¶
func (k Keeper) LimitOrderTrancheAll( c context.Context, req *types.QueryAllLimitOrderTrancheRequest, ) (*types.QueryAllLimitOrderTrancheResponse, error)
Returns all ACTIVE limit order tranches for a given pairID/tokenIn combination Does NOT return inactiveLimitOrderTranches
func (Keeper) LimitOrderTrancheUser ¶
func (k Keeper) LimitOrderTrancheUser(c context.Context, req *types.QueryGetLimitOrderTrancheUserRequest, ) (*types.QueryGetLimitOrderTrancheUserResponse, error)
func (Keeper) LimitOrderTrancheUserAll ¶
func (k Keeper) LimitOrderTrancheUserAll( c context.Context, req *types.QueryAllLimitOrderTrancheUserRequest, ) (*types.QueryAllLimitOrderTrancheUserResponse, error)
func (Keeper) LimitOrderTrancheUserAllByAddress ¶
func (k Keeper) LimitOrderTrancheUserAllByAddress( goCtx context.Context, req *types.QueryAllLimitOrderTrancheUserByAddressRequest, ) (*types.QueryAllLimitOrderTrancheUserByAddressResponse, error)
func (Keeper) MakerLimitOrderSwap ¶
func (k Keeper) MakerLimitOrderSwap( ctx sdk.Context, tradePairID types.TradePairID, amountIn math.Int, limitPrice math_utils.PrecDec, minAvgSellPrice math_utils.PrecDec, ) (totalInCoin, totalOutCoin sdk.Coin, filled bool, err error)
Wrapper for maker LimitOrders Ensures the swap portion + maker portion of the limit order will have an output >= the limit price output
func (Keeper) MintShares ¶
func (Keeper) MultiHopSwapCore ¶
func (k Keeper) MultiHopSwapCore( goCtx context.Context, amountIn math.Int, routes []*types.MultiHopRoute, exitLimitPrice math_utils.PrecDec, pickBestRoute bool, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, ) (coinOut sdk.Coin, route []string, dust sdk.Coins, err error)
MultiHopSwapCore handles logic for MsgMultihopSwap including bank operations and event emissions.
func (Keeper) MultihopStep ¶
func (k Keeper) MultihopStep( bCtx *types.BranchableCache, step MultihopStep, inCoin sdk.Coin, stepCache map[multihopCacheKey]StepResult, ) (sdk.Coin, sdk.Coin, *types.BranchableCache, error)
func (Keeper) NewLiquidityIterator ¶
func (k Keeper) NewLiquidityIterator( ctx sdk.Context, tradePairID *types.TradePairID, ) *LiquidityIterator
func (Keeper) NewTickIterator ¶
func (k Keeper) NewTickIterator( ctx sdk.Context, tradePairID *types.TradePairID, ) TickIterator
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Returns dex params to the caller
func (Keeper) PlaceLimitOrderCore ¶
func (k Keeper) PlaceLimitOrderCore( goCtx context.Context, tokenIn string, tokenOut string, amountIn math.Int, tickIndexInToOut int64, orderType types.LimitOrderType, goodTil *time.Time, maxAmountOut *math.Int, minAvgSellPriceP *math_utils.PrecDec, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, ) (trancheKey string, totalInCoin, swapInCoin, swapOutCoin sdk.Coin, err error)
PlaceLimitOrderCore handles the logic for MsgPlaceLimitOrder including bank operations and event emissions.
func (Keeper) Pool ¶
func (k Keeper) Pool( goCtx context.Context, req *types.QueryPoolRequest, ) (*types.QueryPoolResponse, error)
Returns the pool that was requested by PairId, TickIndex and Fee (or errors)
func (Keeper) PoolByID ¶
func (k Keeper) PoolByID( goCtx context.Context, req *types.QueryPoolByIDRequest, ) (*types.QueryPoolResponse, error)
func (Keeper) PoolMetadata ¶
func (k Keeper) PoolMetadata(goCtx context.Context, req *types.QueryGetPoolMetadataRequest) (*types.QueryGetPoolMetadataResponse, error)
func (Keeper) PoolMetadataAll ¶
func (k Keeper) PoolMetadataAll(goCtx context.Context, req *types.QueryAllPoolMetadataRequest) (*types.QueryAllPoolMetadataResponse, error)
func (Keeper) PoolReserves ¶
func (k Keeper) PoolReserves( goCtx context.Context, req *types.QueryGetPoolReservesRequest, ) (*types.QueryGetPoolReservesResponse, error)
func (Keeper) PoolReservesAll ¶
func (k Keeper) PoolReservesAll( goCtx context.Context, req *types.QueryAllPoolReservesRequest, ) (*types.QueryAllPoolReservesResponse, error)
func (Keeper) PurgeExpiredLimitOrders ¶
func (Keeper) RemoveInactiveLimitOrderTranche ¶
func (k Keeper) RemoveInactiveLimitOrderTranche( ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey, )
RemoveInactiveLimitOrderTranche removes a inactiveLimitOrderTranche from the store
func (Keeper) RemoveLimitOrderExpiration ¶
func (k Keeper) RemoveLimitOrderExpiration( ctx sdk.Context, goodTilDate time.Time, trancheRef []byte, )
RemoveLimitOrderExpiration removes a goodTilRecord from the store
func (Keeper) RemoveLimitOrderExpirationByKey ¶
func (Keeper) RemoveLimitOrderTranche ¶
func (k Keeper) RemoveLimitOrderTranche(ctx sdk.Context, trancheKey *types.LimitOrderTrancheKey)
func (Keeper) RemoveLimitOrderTrancheUser ¶
func (k Keeper) RemoveLimitOrderTrancheUser(ctx sdk.Context, trancheUser *types.LimitOrderTrancheUser)
func (Keeper) RemoveLimitOrderTrancheUserByKey ¶
func (k Keeper) RemoveLimitOrderTrancheUserByKey( ctx sdk.Context, trancheKey string, address string, )
RemoveLimitOrderTrancheUserByKey removes a LimitOrderTrancheUser from the store
func (Keeper) RemovePoolMetadata ¶
RemovePoolMetadata removes a poolMetadata from the store
func (Keeper) RemovePoolReserves ¶
func (k Keeper) RemovePoolReserves(ctx sdk.Context, poolReservesID *types.PoolReservesKey)
RemovePoolReserves removes a tickLiquidity from the store
func (Keeper) RunMultihopRoute ¶
func (k Keeper) RunMultihopRoute( ctx sdk.Context, route types.MultiHopRoute, initialInCoin sdk.Coin, exitLimitPrice math_utils.PrecDec, stepCache map[multihopCacheKey]StepResult, ) (sdk.Coins, sdk.Coin, func(), error)
func (Keeper) SaveLiquidity ¶
func (Keeper) SetInactiveLimitOrderTranche ¶
func (k Keeper) SetInactiveLimitOrderTranche(ctx sdk.Context, limitOrderTranche *types.LimitOrderTranche)
SetInactiveLimitOrderTranche set a specific inactiveLimitOrderTranche in the store from its index
func (Keeper) SetJITsInBlockCount ¶
SetJITsInBlockCount sets the total number of JIT LimitOrders placed in a block
func (Keeper) SetLimitOrderExpiration ¶
func (k Keeper) SetLimitOrderExpiration( ctx sdk.Context, goodTilRecord *types.LimitOrderExpiration, )
SetLimitOrderExpiration set a specific goodTilRecord in the store from its index
func (Keeper) SetLimitOrderTranche ¶
func (k Keeper) SetLimitOrderTranche(ctx sdk.Context, tranche *types.LimitOrderTranche)
func (Keeper) SetLimitOrderTrancheUser ¶
func (k Keeper) SetLimitOrderTrancheUser(ctx sdk.Context, limitOrderTrancheUser *types.LimitOrderTrancheUser)
SetLimitOrderTrancheUser set a specific LimitOrderTrancheUser in the store from its index
func (Keeper) SetPoolCount ¶
SetPoolCount set the total number of pools
func (Keeper) SetPoolMetadata ¶
func (k Keeper) SetPoolMetadata(ctx sdk.Context, poolMetadata types.PoolMetadata)
SetPoolMetadata set a specific poolMetadata in the store
func (Keeper) SetPoolReserves ¶
func (k Keeper) SetPoolReserves(ctx sdk.Context, poolReserves *types.PoolReserves)
func (Keeper) SimulateCancelLimitOrder ¶
func (k Keeper) SimulateCancelLimitOrder( goCtx context.Context, req *types.QuerySimulateCancelLimitOrderRequest, ) (*types.QuerySimulateCancelLimitOrderResponse, error)
func (Keeper) SimulateDeposit ¶
func (k Keeper) SimulateDeposit( goCtx context.Context, req *types.QuerySimulateDepositRequest, ) (*types.QuerySimulateDepositResponse, error)
func (Keeper) SimulateMultiHopSwap ¶
func (k Keeper) SimulateMultiHopSwap( goCtx context.Context, req *types.QuerySimulateMultiHopSwapRequest, ) (*types.QuerySimulateMultiHopSwapResponse, error)
func (Keeper) SimulatePlaceLimitOrder ¶
func (k Keeper) SimulatePlaceLimitOrder( goCtx context.Context, req *types.QuerySimulatePlaceLimitOrderRequest, ) (*types.QuerySimulatePlaceLimitOrderResponse, error)
func (Keeper) SimulateWithdrawFilledLimitOrder ¶
func (k Keeper) SimulateWithdrawFilledLimitOrder( goCtx context.Context, req *types.QuerySimulateWithdrawFilledLimitOrderRequest, ) (*types.QuerySimulateWithdrawFilledLimitOrderResponse, error)
func (Keeper) SimulateWithdrawal ¶
func (k Keeper) SimulateWithdrawal( goCtx context.Context, req *types.QuerySimulateWithdrawalRequest, ) (*types.QuerySimulateWithdrawalResponse, error)
func (Keeper) StorePoolIDRef ¶
func (Keeper) SwapFullAmountIn ¶
func (k Keeper) SwapFullAmountIn( ctx sdk.Context, tradePairID *types.TradePairID, amountIn math.Int, ) (dust, totalOut sdk.Coin, err error)
SwapFullAmountIn swaps full amount of given `amountIn` to the `tradePairID` taker denom. NOTE: SwapFullAmountIn does not ensure that 100% of amountIn is used. Due to rounding it is possible that a dust amount of AmountIn remains unswapped. It is the caller's responsibility to handle this appropriately. It returns remaining dust as a first argument.
func (Keeper) SwapWithCache ¶
func (Keeper) TakerLimitOrderSwap ¶
func (k Keeper) TakerLimitOrderSwap( ctx sdk.Context, tradePairID types.TradePairID, amountIn math.Int, maxAmountOut *math.Int, limitPrice math_utils.PrecDec, minAvgSellPrice math_utils.PrecDec, orderType types.LimitOrderType, ) (totalInCoin, totalOutCoin sdk.Coin, err error)
Wrapper for taker LimitOrders Ensures Fok behavior is correct and that the output >= limit price output
func (Keeper) TickLiquidityAll ¶
func (k Keeper) TickLiquidityAll( c context.Context, req *types.QueryAllTickLiquidityRequest, ) (*types.QueryAllTickLiquidityResponse, error)
func (Keeper) UpdateInactiveTranche ¶
func (k Keeper) UpdateInactiveTranche(sdkCtx sdk.Context, tranche *types.LimitOrderTranche)
UpdateInactiveTranche handles the logic for all updates to InactiveLimitOrderTranches It will delete an InactiveTranche if there is no remaining MakerReserves or TakerReserves
func (Keeper) UpdatePool ¶
UpdatePool handles the logic for all updates to Pools in the KV Store. It provides a convenient way to save both sides of the pool reserves.
func (Keeper) UpdatePoolReserves ¶
func (k Keeper) UpdatePoolReserves(ctx sdk.Context, reserves *types.PoolReserves)
UpdatePoolReserves handles the logic for all updates to PoolReserves in the KV Store. NOTE: This method should always be called even if not all logic branches are applicable. It avoids unnecessary repetition of logic and provides a single place to attach update event handlers.
func (Keeper) UpdateTranche ¶
func (k Keeper) UpdateTranche(ctx sdk.Context, tranche *types.LimitOrderTranche)
UpdateTranche handles the logic for all updates to active LimitOrderTranches in the KV Store. NOTE: This method should always be called even if not all logic branches are applicable. It avoids unnecessary repetition of logic and provides a single place to attach update event handlers.
func (Keeper) UpdateTrancheUser ¶
func (k Keeper) UpdateTrancheUser(ctx sdk.Context, trancheUser *types.LimitOrderTrancheUser)
UpdateTrancheUser handles the logic for all updates to LimitOrderTrancheUsers in the KV Store. NOTE: This method should always be called even if not all logic branches are applicable. It avoids unnecessary repetition of logic and provides a single place to attach update event handlers.
func (Keeper) UserDepositsAll ¶
func (k Keeper) UserDepositsAll( goCtx context.Context, req *types.QueryAllUserDepositsRequest, ) (*types.QueryAllUserDepositsResponse, error)
func (Keeper) WithdrawCore ¶
func (k Keeper) WithdrawCore( goCtx context.Context, pairID *types.PairID, callerAddr sdk.AccAddress, receiverAddr sdk.AccAddress, sharesToRemoveList []math.Int, tickIndicesNormalized []int64, fees []uint64, ) (reserves0ToRemoved, reserves1ToRemoved math.Int, sharesBurned sdk.Coins, err error)
WithdrawCore handles logic for MsgWithdrawal including bank operations and event emissions.
func (Keeper) WithdrawFilledLimitOrderCore ¶
func (k Keeper) WithdrawFilledLimitOrderCore( goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress, ) (takerCoinOut, makerCoinOut sdk.Coin, err error)
WithdrawFilledLimitOrderCore handles MsgWithdrawFilledLimitOrder including bank operations and event emissions.
type LiquidityIterator ¶
type LiquidityIterator struct {
// contains filtered or unexported fields
}
func (*LiquidityIterator) Close ¶
func (s *LiquidityIterator) Close()
func (*LiquidityIterator) Next ¶
func (s *LiquidityIterator) Next() types.Liquidity
func (*LiquidityIterator) WrapTickLiquidity ¶
func (s *LiquidityIterator) WrapTickLiquidity(tick types.TickLiquidity) types.Liquidity
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func (Migrator) Migrate2to3 ¶
Migrate2to3 migrates from version 2 to 3.
func (Migrator) Migrate3to4 ¶
Migrate3to4 migrates from version 3 to 4.
type MsgServer ¶
type MsgServer struct {
Keeper
}
func (MsgServer) CancelLimitOrder ¶
func (k MsgServer) CancelLimitOrder( goCtx context.Context, msg *types.MsgCancelLimitOrder, ) (*types.MsgCancelLimitOrderResponse, error)
func (MsgServer) Deposit ¶
func (k MsgServer) Deposit( goCtx context.Context, msg *types.MsgDeposit, ) (*types.MsgDepositResponse, error)
func (MsgServer) MultiHopSwap ¶
func (k MsgServer) MultiHopSwap( goCtx context.Context, msg *types.MsgMultiHopSwap, ) (*types.MsgMultiHopSwapResponse, error)
func (MsgServer) PlaceLimitOrder ¶
func (k MsgServer) PlaceLimitOrder( goCtx context.Context, msg *types.MsgPlaceLimitOrder, ) (*types.MsgPlaceLimitOrderResponse, error)
func (MsgServer) UpdateParams ¶
func (k MsgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
func (MsgServer) WithdrawFilledLimitOrder ¶
func (k MsgServer) WithdrawFilledLimitOrder( goCtx context.Context, msg *types.MsgWithdrawFilledLimitOrder, ) (*types.MsgWithdrawFilledLimitOrderResponse, error)
func (MsgServer) Withdrawal ¶
func (k MsgServer) Withdrawal( goCtx context.Context, msg *types.MsgWithdrawal, ) (*types.MsgWithdrawalResponse, error)
type MultiHopRouteOutput ¶
type MultiHopRouteOutput struct {
// contains filtered or unexported fields
}
type MultihopStep ¶
type MultihopStep struct { RemainingBestPrice math_utils.PrecDec // contains filtered or unexported fields }
type StepResult ¶
type TickIterator ¶
type TickIterator struct {
// contains filtered or unexported fields
}
func (TickIterator) Close ¶
func (ti TickIterator) Close() error
func (TickIterator) Next ¶
func (ti TickIterator) Next()
func (TickIterator) Valid ¶
func (ti TickIterator) Valid() bool
func (TickIterator) Value ¶
func (ti TickIterator) Value() (tick types.TickLiquidity)
Source Files ¶
- cancel_limit_order.go
- core_helper.go
- deposit.go
- deposit_record.go
- grpc_query.go
- grpc_query_estimate_multi_hop_swap.go
- grpc_query_estimate_place_limit_order.go
- grpc_query_inactive_limit_order_tranche.go
- grpc_query_limit_order_tranche.go
- grpc_query_limit_order_tranche_user.go
- grpc_query_params.go
- grpc_query_pool.go
- grpc_query_pool_metadata.go
- grpc_query_pool_reserves.go
- grpc_query_simulate_cancel_limit_order.go
- grpc_query_simulate_deposit.go
- grpc_query_simulate_multi_hop_swap.go
- grpc_query_simulate_place_limit_order.go
- grpc_query_simulate_withdraw_filled_limit_order.go
- grpc_query_simulate_withdrawal.go
- grpc_query_tick_liquidity.go
- grpc_query_user_deposits.go
- inactive_limit_order_tranche.go
- keeper.go
- limit_order_expiration.go
- limit_order_tranche.go
- limit_order_tranche_user.go
- liquidity.go
- liquidity_iterator.go
- migrations.go
- msg_server.go
- multihop_swap.go
- pair_helper.go
- params.go
- place_limit_order.go
- pool.go
- pool_metadata.go
- pool_reserves.go
- tick_iterator.go
- tick_liquidity.go
- withdraw.go
- withdraw_filled_limit_order.go