Versions in this module Expand all Collapse all v1 v1.1.0 Nov 28, 2023 Changes in this version + 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 struct + func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ...) *Keeper + func (k Keeper) BurnShares(ctx sdk.Context, addr sdk.AccAddress, amount math.Int, sharesID string) error + func (k Keeper) CancelLimitOrderCore(goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress) error + func (k Keeper) DepositCore(goCtx context.Context, pairID *types.PairID, callerAddr sdk.AccAddress, ...) (amounts0Deposit, amounts1Deposit []math.Int, sharesIssued sdk.Coins, err error) + 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) 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) 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) GetInactiveLimitOrderTranche(ctx sdk.Context, limitOrderTrancheKey *types.LimitOrderTrancheKey) (val *types.LimitOrderTranche, found bool) + 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) 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) GetPlaceTranche(sdkCtx sdk.Context, tradePairID *types.TradePairID, ...) *types.LimitOrderTranche + func (k Keeper) GetPool(ctx sdk.Context, pairID *types.PairID, centerTickIndexNormalized int64, ...) (*types.Pool, 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) InitPool(ctx sdk.Context, pairID *types.PairID, centerTickIndexNormalized int64, ...) (pool *types.Pool, err error) + 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, req *types.QueryAllUserLimitOrdersRequest) (*types.QueryAllUserLimitOrdersResponse, error) + func (k Keeper) Logger(ctx sdk.Context) log.Logger + 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, err error) + func (k Keeper) MultihopStep(bctx *types.BranchableCache, step MultihopStep, inCoin 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.Coin, func(), error) + func (k Keeper) SaveInactiveTranche(sdkCtx sdk.Context, tranche *types.LimitOrderTranche) + func (k Keeper) SaveLiquidity(sdkCtx sdk.Context, liquidityI types.Liquidity) + func (k Keeper) SaveTranche(ctx sdk.Context, tranche *types.LimitOrderTranche) + func (k Keeper) SaveTrancheUser(ctx sdk.Context, trancheUser *types.LimitOrderTrancheUser) + func (k Keeper) SetInactiveLimitOrderTranche(ctx sdk.Context, limitOrderTranche *types.LimitOrderTranche) + 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) SetPool(ctx sdk.Context, pool *types.Pool) + 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) 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) (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) TickLiquidityAll(c context.Context, req *types.QueryAllTickLiquidityRequest) (*types.QueryAllTickLiquidityResponse, error) + 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, ...) error + func (k Keeper) WithdrawFilledLimitOrderCore(goCtx context.Context, trancheKey string, callerAddr sdk.AccAddress) error + type LiquidityIterator struct + func (s *LiquidityIterator) Close() + func (s *LiquidityIterator) Next() types.Liquidity + func (s *LiquidityIterator) WrapTickLiquidity(tick types.TickLiquidity) types.Liquidity + type MsgServer struct + 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 MultihopStep struct + RemainingBestPrice math_utils.PrecDec + type StepResult struct + CoinOut sdk.Coin + Ctx *types.BranchableCache + Err error + type TickIterator struct + func (ti TickIterator) Close() error + func (ti TickIterator) Next() + func (ti TickIterator) Valid() bool + func (ti TickIterator) Value() (tick types.TickLiquidity) Other modules containing this package github.com/neutron-org/neutron/v2 github.com/neutron-org/neutron/v3 github.com/neutron-org/neutron/v4 github.com/neutron-org/neutron/v5