Documentation ¶
Index ¶
- func AllInvariants(k Keeper) sdk.Invariant
- func DepositCoinsEscrowInvariant(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NumMMOrdersInvariant(k Keeper) sdk.Invariant
- func PoolCoinEscrowInvariant(k Keeper) sdk.Invariant
- func PoolStatusInvariant(k Keeper) sdk.Invariant
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func RemainingOfferCoinEscrowInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) ApplyMatchResult(ctx sdk.Context, pair types.Pair, orders []amm.Order, quoteCoinDiff sdk.Int) error
- func (k Keeper) CancelAllOrders(ctx sdk.Context, msg *types.MsgCancelAllOrders) error
- func (k Keeper) CancelOrder(ctx sdk.Context, msg *types.MsgCancelOrder) error
- func (k Keeper) CreatePair(ctx sdk.Context, msg *types.MsgCreatePair) (types.Pair, error)
- func (k Keeper) CreatePool(ctx sdk.Context, msg *types.MsgCreatePool) (types.Pool, error)
- func (k Keeper) CreateRangedPool(ctx sdk.Context, msg *types.MsgCreateRangedPool) (types.Pool, error)
- func (k Keeper) DeleteDepositRequest(ctx sdk.Context, req types.DepositRequest)
- func (k Keeper) DeleteDepositRequestIndex(ctx sdk.Context, req types.DepositRequest)
- func (k Keeper) DeleteLastPairId(ctx sdk.Context)
- func (k Keeper) DeleteLastPoolId(ctx sdk.Context)
- func (k Keeper) DeleteNumMMOrders(ctx sdk.Context, ordererAddr sdk.AccAddress, pairId uint64)
- func (k Keeper) DeleteOrder(ctx sdk.Context, order types.Order)
- func (k Keeper) DeleteOrderIndex(ctx sdk.Context, order types.Order)
- func (k Keeper) DeleteOutdatedRequests(ctx sdk.Context)
- func (k Keeper) DeletePair(ctx sdk.Context, pairId uint64)
- func (k Keeper) DeletePairLookupIndex(ctx sdk.Context, pair types.Pair)
- func (k Keeper) DeletePool(ctx sdk.Context, poolId uint64)
- func (k Keeper) DeletePoolByReserveIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) DeletePoolsByPairIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) DeleteWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest)
- func (k Keeper) DeleteWithdrawRequestIndex(ctx sdk.Context, req types.WithdrawRequest)
- func (k Keeper) Deposit(ctx sdk.Context, msg *types.MsgDeposit) (types.DepositRequest, error)
- func (k Keeper) ExecuteDepositRequest(ctx sdk.Context, req types.DepositRequest) error
- func (k Keeper) ExecuteMatching(ctx sdk.Context, pair types.Pair) error
- func (k Keeper) ExecuteRequests(ctx sdk.Context)
- func (k Keeper) ExecuteWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FinishDepositRequest(ctx sdk.Context, req types.DepositRequest, status types.RequestStatus) error
- func (k Keeper) FinishOrder(ctx sdk.Context, order types.Order, status types.OrderStatus) error
- func (k Keeper) FinishWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest, status types.RequestStatus) error
- func (k Keeper) GetAllDepositRequests(ctx sdk.Context) (reqs []types.DepositRequest)
- func (k Keeper) GetAllOrders(ctx sdk.Context) (orders []types.Order)
- func (k Keeper) GetAllPairs(ctx sdk.Context) (pairs []types.Pair)
- func (k Keeper) GetAllPools(ctx sdk.Context) (pools []types.Pool)
- func (k Keeper) GetAllWithdrawRequests(ctx sdk.Context) (reqs []types.WithdrawRequest)
- func (k Keeper) GetBatchSize(ctx sdk.Context) (batchSize uint32)
- func (k Keeper) GetDepositExtraGas(ctx sdk.Context) (gas sdk.Gas)
- func (k Keeper) GetDepositRequest(ctx sdk.Context, poolId, id uint64) (req types.DepositRequest, found bool)
- func (k Keeper) GetDepositRequestsByDepositor(ctx sdk.Context, depositor sdk.AccAddress) (reqs []types.DepositRequest)
- func (k Keeper) GetDustCollector(ctx sdk.Context) sdk.AccAddress
- func (k Keeper) GetFeeCollector(ctx sdk.Context) sdk.AccAddress
- func (k Keeper) GetLastPairId(ctx sdk.Context) (id uint64)
- func (k Keeper) GetLastPoolId(ctx sdk.Context) (id uint64)
- func (k Keeper) GetMaxNumActivePoolsPerPair(ctx sdk.Context) (i uint32)
- func (k Keeper) GetMaxNumMarketMakingOrderTicks(ctx sdk.Context) (i uint32)
- func (k Keeper) GetMaxNumMarketMakingOrdersPerPair(ctx sdk.Context) (i uint32)
- func (k Keeper) GetMaxOrderLifespan(ctx sdk.Context) (maxLifespan time.Duration)
- func (k Keeper) GetMaxPriceLimitRatio(ctx sdk.Context) (ratio sdk.Dec)
- func (k Keeper) GetMinInitialDepositAmount(ctx sdk.Context) (amt sdk.Int)
- func (k Keeper) GetMinInitialPoolCoinSupply(ctx sdk.Context) (i sdk.Int)
- func (k Keeper) GetNumMMOrders(ctx sdk.Context, ordererAddr sdk.AccAddress, pairId uint64) (numMMOrders uint32)
- func (k Keeper) GetOrder(ctx sdk.Context, pairId, id uint64) (order types.Order, found bool)
- func (k Keeper) GetOrderExtraGas(ctx sdk.Context) (gas sdk.Gas)
- func (k Keeper) GetOrdersByOrderer(ctx sdk.Context, orderer sdk.AccAddress) (orders []types.Order)
- func (k Keeper) GetOrdersByPair(ctx sdk.Context, pairId uint64) (orders []types.Order)
- func (k Keeper) GetPair(ctx sdk.Context, id uint64) (pair types.Pair, found bool)
- func (k Keeper) GetPairByDenoms(ctx sdk.Context, baseCoinDenom, quoteCoinDenom string) (pair types.Pair, found bool)
- func (k Keeper) GetPairCreationFee(ctx sdk.Context) (fee sdk.Coins)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPool(ctx sdk.Context, id uint64) (pool types.Pool, found bool)
- func (k Keeper) GetPoolBalances(ctx sdk.Context, pool types.Pool) (rx sdk.Coin, ry sdk.Coin)
- func (k Keeper) GetPoolByReserveAddress(ctx sdk.Context, reserveAddr sdk.AccAddress) (pool types.Pool, found bool)
- func (k Keeper) GetPoolCoinSupply(ctx sdk.Context, pool types.Pool) sdk.Int
- func (k Keeper) GetPoolCreationFee(ctx sdk.Context) (fee sdk.Coins)
- func (k Keeper) GetPoolsByPair(ctx sdk.Context, pairId uint64) (pools []types.Pool)
- func (k Keeper) GetTickPrecision(ctx sdk.Context) (tickPrec uint32)
- func (k Keeper) GetWithdrawExtraGas(ctx sdk.Context) (gas sdk.Gas)
- func (k Keeper) GetWithdrawFeeRate(ctx sdk.Context) (feeRate sdk.Dec)
- func (k Keeper) GetWithdrawRequest(ctx sdk.Context, poolId, id uint64) (req types.WithdrawRequest, found bool)
- func (k Keeper) GetWithdrawRequestsByWithdrawer(ctx sdk.Context, withdrawer sdk.AccAddress) (reqs []types.WithdrawRequest)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) IterateAllDepositRequests(ctx sdk.Context, cb func(req types.DepositRequest) (stop bool, err error)) error
- func (k Keeper) IterateAllNumMMOrders(ctx sdk.Context, ...)
- func (k Keeper) IterateAllOrders(ctx sdk.Context, cb func(order types.Order) (stop bool, err error)) error
- func (k Keeper) IterateAllPairs(ctx sdk.Context, cb func(pair types.Pair) (stop bool, err error)) error
- func (k Keeper) IterateAllPools(ctx sdk.Context, cb func(pool types.Pool) (stop bool, err error)) error
- func (k Keeper) IterateAllWithdrawRequests(ctx sdk.Context, cb func(req types.WithdrawRequest) (stop bool, err error)) error
- func (k Keeper) IterateDepositRequestsByDepositor(ctx sdk.Context, depositor sdk.AccAddress, ...) error
- func (k Keeper) IterateOrdersByOrderer(ctx sdk.Context, orderer sdk.AccAddress, ...) error
- func (k Keeper) IterateOrdersByPair(ctx sdk.Context, pairId uint64, ...) error
- func (k Keeper) IteratePoolsByPair(ctx sdk.Context, pairId uint64, ...) error
- func (k Keeper) IterateWithdrawRequestsByWithdrawer(ctx sdk.Context, withdrawer sdk.AccAddress, ...) error
- func (k Keeper) LimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) (types.Order, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MMOrder(ctx sdk.Context, msg *types.MsgMMOrder) (types.Order, error)
- func (k Keeper) MarkPoolAsDisabled(ctx sdk.Context, pool types.Pool)
- func (k Keeper) MarketOrder(ctx sdk.Context, msg *types.MsgMarketOrder) (types.Order, error)
- func (k Keeper) Match(ctx sdk.Context, ob *amm.OrderBook, pools []*types.PoolOrderer, ...) (matchPrice sdk.Dec, quoteCoinDiff sdk.Int, matched bool)
- func (k Keeper) PriceLimits(ctx sdk.Context, lastPrice sdk.Dec) (lowest, highest sdk.Dec)
- func (k Keeper) SetDepositRequest(ctx sdk.Context, req types.DepositRequest)
- func (k Keeper) SetDepositRequestIndex(ctx sdk.Context, req types.DepositRequest)
- func (k Keeper) SetLastPairId(ctx sdk.Context, id uint64)
- func (k Keeper) SetLastPoolId(ctx sdk.Context, id uint64)
- func (k Keeper) SetMaxNumActivePoolsPerPair(ctx sdk.Context, i uint32)
- func (k Keeper) SetMaxNumMarketMakingOrderTicks(ctx sdk.Context, input uint32)
- func (k Keeper) SetMaxNumMarketMakingOrdersPerPair(ctx sdk.Context, input uint32)
- func (k Keeper) SetNumMMOrders(ctx sdk.Context, ordererAddr sdk.AccAddress, pairId uint64, numMMOrders uint32)
- func (k Keeper) SetOrder(ctx sdk.Context, order types.Order)
- func (k Keeper) SetOrderIndex(ctx sdk.Context, order types.Order)
- func (k Keeper) SetPair(ctx sdk.Context, pair types.Pair)
- func (k Keeper) SetPairIndex(ctx sdk.Context, baseCoinDenom, quoteCoinDenom string, pairId uint64)
- func (k Keeper) SetPairLookupIndex(ctx sdk.Context, denomA string, denomB string, pairId uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPool(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetPoolByReserveIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetPoolsByPairIndex(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest)
- func (k Keeper) SetWithdrawRequestIndex(ctx sdk.Context, req types.WithdrawRequest)
- func (k Keeper) ValidateMsgCancelOrder(ctx sdk.Context, msg *types.MsgCancelOrder) (order types.Order, err error)
- func (k Keeper) ValidateMsgCreatePair(ctx sdk.Context, msg *types.MsgCreatePair) error
- func (k Keeper) ValidateMsgCreatePool(ctx sdk.Context, msg *types.MsgCreatePool) error
- func (k Keeper) ValidateMsgCreateRangedPool(ctx sdk.Context, msg *types.MsgCreateRangedPool) error
- func (k Keeper) ValidateMsgDeposit(ctx sdk.Context, msg *types.MsgDeposit) error
- func (k Keeper) ValidateMsgWithdraw(ctx sdk.Context, msg *types.MsgWithdraw) error
- func (k Keeper) Withdraw(ctx sdk.Context, msg *types.MsgWithdraw) (types.WithdrawRequest, error)
- type Migrator
- type Querier
- func (k Querier) DepositRequest(c context.Context, req *types.QueryDepositRequestRequest) (*types.QueryDepositRequestResponse, error)
- func (k Querier) DepositRequests(c context.Context, req *types.QueryDepositRequestsRequest) (*types.QueryDepositRequestsResponse, error)
- func (k Querier) NumMMOrders(c context.Context, req *types.QueryNumMMOrdersRequest) (*types.QueryNumMMOrdersResponse, error)
- func (k Querier) Order(c context.Context, req *types.QueryOrderRequest) (*types.QueryOrderResponse, error)
- func (k Querier) OrderBooks(c context.Context, req *types.QueryOrderBooksRequest) (*types.QueryOrderBooksResponse, error)
- func (k Querier) Orders(c context.Context, req *types.QueryOrdersRequest) (*types.QueryOrdersResponse, error)
- func (k Querier) OrdersByOrderer(c context.Context, req *types.QueryOrdersByOrdererRequest) (*types.QueryOrdersResponse, error)
- func (k Querier) Pair(c context.Context, req *types.QueryPairRequest) (*types.QueryPairResponse, error)
- func (k Querier) Pairs(c context.Context, req *types.QueryPairsRequest) (*types.QueryPairsResponse, error)
- func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Querier) Pool(c context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
- func (k Querier) PoolByPoolCoinDenom(c context.Context, req *types.QueryPoolByPoolCoinDenomRequest) (*types.QueryPoolResponse, error)
- func (k Querier) PoolByReserveAddress(c context.Context, req *types.QueryPoolByReserveAddressRequest) (*types.QueryPoolResponse, error)
- func (k Querier) Pools(c context.Context, req *types.QueryPoolsRequest) (*types.QueryPoolsResponse, error)
- func (k Querier) WithdrawRequest(c context.Context, req *types.QueryWithdrawRequestRequest) (*types.QueryWithdrawRequestResponse, error)
- func (k Querier) WithdrawRequests(c context.Context, req *types.QueryWithdrawRequestsRequest) (*types.QueryWithdrawRequestsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
AllInvariants returns a combined invariant of the liquidity module.
func DepositCoinsEscrowInvariant ¶
DepositCoinsEscrowInvariant checks that the amount of coins in the global escrow address is greater or equal than remaining deposit coins in all deposit requests.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NumMMOrdersInvariant ¶
NumMMOrdersInvariant checks the actual number of mm orders with NumMMOrders records.
func PoolCoinEscrowInvariant ¶
PoolCoinEscrowInvariant checks that the amount of coins in the global escrow address is greater or equal than remaining withdrawing pool coins in all withdrawal requests.
func PoolStatusInvariant ¶
PoolStatusInvariant checks that the pools with zero pool coin supply have been marked as disabled.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all liquidity module invariants.
func RemainingOfferCoinEscrowInvariant ¶
RemainingOfferCoinEscrowInvariant checks that the amount of coins in each pair's escrow address is greater or equal than remaining offer coins in the pair's orders.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the liquidity store.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) Keeper
NewKeeper creates a new liquidity Keeper instance.
func (Keeper) ApplyMatchResult ¶
func (Keeper) CancelAllOrders ¶
CancelAllOrders handles types.MsgCancelAllOrders and cancels all orders.
func (Keeper) CancelOrder ¶
CancelOrder handles types.MsgCancelOrder and cancels an order.
func (Keeper) CreatePair ¶
CreatePair handles types.MsgCreatePair and creates a pair.
func (Keeper) CreatePool ¶
CreatePool handles types.MsgCreatePool and creates a basic pool.
func (Keeper) CreateRangedPool ¶
func (k Keeper) CreateRangedPool(ctx sdk.Context, msg *types.MsgCreateRangedPool) (types.Pool, error)
CreateRangedPool handles types.MsgCreateRangedPool and creates a ranged pool.
func (Keeper) DeleteDepositRequest ¶
func (k Keeper) DeleteDepositRequest(ctx sdk.Context, req types.DepositRequest)
DeleteDepositRequest deletes a deposit request.
func (Keeper) DeleteDepositRequestIndex ¶
func (k Keeper) DeleteDepositRequestIndex(ctx sdk.Context, req types.DepositRequest)
func (Keeper) DeleteLastPairId ¶
func (Keeper) DeleteLastPoolId ¶
func (Keeper) DeleteNumMMOrders ¶
func (Keeper) DeleteOrder ¶
DeleteOrder deletes an order.
func (Keeper) DeleteOrderIndex ¶
func (Keeper) DeleteOutdatedRequests ¶
DeleteOutdatedRequests deletes outdated(should be deleted) requests. Determining if a request should be deleted is based on its status.
func (Keeper) DeletePairLookupIndex ¶
func (Keeper) DeletePoolByReserveIndex ¶
func (Keeper) DeletePoolsByPairIndex ¶
func (Keeper) DeleteWithdrawRequest ¶
func (k Keeper) DeleteWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest)
DeleteWithdrawRequest deletes a withdraw request.
func (Keeper) DeleteWithdrawRequestIndex ¶
func (k Keeper) DeleteWithdrawRequestIndex(ctx sdk.Context, req types.WithdrawRequest)
func (Keeper) Deposit ¶
func (k Keeper) Deposit(ctx sdk.Context, msg *types.MsgDeposit) (types.DepositRequest, error)
Deposit handles types.MsgDeposit and stores the request.
func (Keeper) ExecuteDepositRequest ¶
ExecuteDepositRequest executes a deposit request.
func (Keeper) ExecuteMatching ¶
func (Keeper) ExecuteRequests ¶
ExecuteRequests executes all orders, deposit requests and withdraw requests. ExecuteRequests also handles order expiration.
func (Keeper) ExecuteWithdrawRequest ¶
ExecuteWithdrawRequest executes a withdraw request.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the capability module's exported genesis.
func (Keeper) FinishDepositRequest ¶
func (k Keeper) FinishDepositRequest(ctx sdk.Context, req types.DepositRequest, status types.RequestStatus) error
FinishDepositRequest refunds unhandled deposit coins and set request status.
func (Keeper) FinishOrder ¶
func (Keeper) FinishWithdrawRequest ¶
func (k Keeper) FinishWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest, status types.RequestStatus) error
FinishWithdrawRequest refunds unhandled pool coin and set request status.
func (Keeper) GetAllDepositRequests ¶
func (k Keeper) GetAllDepositRequests(ctx sdk.Context) (reqs []types.DepositRequest)
GetAllDepositRequests returns all deposit requests in the store.
func (Keeper) GetAllOrders ¶
GetAllOrders returns all orders in the store.
func (Keeper) GetAllPairs ¶
GetAllPairs returns all pairs in the store.
func (Keeper) GetAllPools ¶
GetAllPools returns all pools in the store.
func (Keeper) GetAllWithdrawRequests ¶
func (k Keeper) GetAllWithdrawRequests(ctx sdk.Context) (reqs []types.WithdrawRequest)
GetAllWithdrawRequests returns all withdraw requests in the store.
func (Keeper) GetBatchSize ¶
GetBatchSize returns the current batch size parameter.
func (Keeper) GetDepositExtraGas ¶
GetDepositExtraGas returns the current deposit extra gas parameter.
func (Keeper) GetDepositRequest ¶
func (k Keeper) GetDepositRequest(ctx sdk.Context, poolId, id uint64) (req types.DepositRequest, found bool)
GetDepositRequest returns the particular deposit request.
func (Keeper) GetDepositRequestsByDepositor ¶
func (k Keeper) GetDepositRequestsByDepositor(ctx sdk.Context, depositor sdk.AccAddress) (reqs []types.DepositRequest)
GetDepositRequestsByDepositor returns deposit requests by the depositor.
func (Keeper) GetDustCollector ¶
func (k Keeper) GetDustCollector(ctx sdk.Context) sdk.AccAddress
GetDustCollector returns the current dust collector address parameter.
func (Keeper) GetFeeCollector ¶
func (k Keeper) GetFeeCollector(ctx sdk.Context) sdk.AccAddress
GetFeeCollector returns the current fee collector address parameter.
func (Keeper) GetLastPairId ¶
GetLastPairId returns the last pair id.
func (Keeper) GetLastPoolId ¶
GetLastPoolId returns the last pool id.
func (Keeper) GetMaxNumActivePoolsPerPair ¶
GetMaxNumActivePoolsPerPair returns the current maximum number of active pools per pair.
func (Keeper) GetMaxNumMarketMakingOrderTicks ¶
GetMaxNumMarketMakingOrderTicks returns the current maximum number of market making order ticks.
func (Keeper) GetMaxNumMarketMakingOrdersPerPair ¶
GetMaxNumMarketMakingOrdersPerPair returns the current maximum number of market making orders per pair.
func (Keeper) GetMaxOrderLifespan ¶
GetMaxOrderLifespan returns the current maximum order lifespan parameter.
func (Keeper) GetMaxPriceLimitRatio ¶
GetMaxPriceLimitRatio returns the current maximum price limit ratio parameter.
func (Keeper) GetMinInitialDepositAmount ¶
GetMinInitialDepositAmount returns the current minimum initial deposit amount parameter.
func (Keeper) GetMinInitialPoolCoinSupply ¶
GetMinInitialPoolCoinSupply returns the current minimum pool coin supply parameter.
func (Keeper) GetNumMMOrders ¶
func (Keeper) GetOrderExtraGas ¶
GetOrderExtraGas returns the current order extra gas parameter.
func (Keeper) GetOrdersByOrderer ¶
GetOrdersByOrderer returns orders by the orderer.
func (Keeper) GetOrdersByPair ¶
GetOrdersByPair returns orders within the pair.
func (Keeper) GetPairByDenoms ¶
func (k Keeper) GetPairByDenoms(ctx sdk.Context, baseCoinDenom, quoteCoinDenom string) (pair types.Pair, found bool)
GetPairByDenoms returns a types.Pair for given denoms.
func (Keeper) GetPairCreationFee ¶
GetPairCreationFee returns the current pair creation fee parameter.
func (Keeper) GetPoolBalances ¶
GetPoolBalances returns the balances of the pool.
func (Keeper) GetPoolByReserveAddress ¶
func (k Keeper) GetPoolByReserveAddress(ctx sdk.Context, reserveAddr sdk.AccAddress) (pool types.Pool, found bool)
GetPoolByReserveAddress returns pool object for the given reserve account address.
func (Keeper) GetPoolCoinSupply ¶
GetPoolCoinSupply returns total pool coin supply of the pool.
func (Keeper) GetPoolCreationFee ¶
GetPoolCreationFee returns the current pool creation fee parameter.
func (Keeper) GetPoolsByPair ¶
GetPoolsByPair returns pools within the pair.
func (Keeper) GetTickPrecision ¶
GetTickPrecision returns the current tick precision parameter.
func (Keeper) GetWithdrawExtraGas ¶
GetWithdrawExtraGas returns the current withdraw extra gas parameter.
func (Keeper) GetWithdrawFeeRate ¶
GetWithdrawFeeRate returns the current withdraw fee rate parameter.
func (Keeper) GetWithdrawRequest ¶
func (k Keeper) GetWithdrawRequest(ctx sdk.Context, poolId, id uint64) (req types.WithdrawRequest, found bool)
GetWithdrawRequest returns the particular withdraw request.
func (Keeper) GetWithdrawRequestsByWithdrawer ¶
func (k Keeper) GetWithdrawRequestsByWithdrawer(ctx sdk.Context, withdrawer sdk.AccAddress) (reqs []types.WithdrawRequest)
GetWithdrawRequestsByWithdrawer returns withdraw requests by the withdrawer.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the capability module's state from a provided genesis state.
func (Keeper) IterateAllDepositRequests ¶
func (k Keeper) IterateAllDepositRequests(ctx sdk.Context, cb func(req types.DepositRequest) (stop bool, err error)) error
IterateAllDepositRequests iterates through all deposit requests in the store and call cb for each request.
func (Keeper) IterateAllNumMMOrders ¶
func (Keeper) IterateAllOrders ¶
func (k Keeper) IterateAllOrders(ctx sdk.Context, cb func(order types.Order) (stop bool, err error)) error
IterateAllOrders iterates through all orders in the store and all cb for each order.
func (Keeper) IterateAllPairs ¶
func (k Keeper) IterateAllPairs(ctx sdk.Context, cb func(pair types.Pair) (stop bool, err error)) error
IterateAllPairs iterates over all the stored pairs and performs a callback function. Stops iteration when callback returns true.
func (Keeper) IterateAllPools ¶
func (k Keeper) IterateAllPools(ctx sdk.Context, cb func(pool types.Pool) (stop bool, err error)) error
IterateAllPools iterates over all the stored pools and performs a callback function. Stops iteration when callback returns true.
func (Keeper) IterateAllWithdrawRequests ¶
func (k Keeper) IterateAllWithdrawRequests(ctx sdk.Context, cb func(req types.WithdrawRequest) (stop bool, err error)) error
IterateAllWithdrawRequests iterates through all withdraw requests in the store and call cb for each request.
func (Keeper) IterateDepositRequestsByDepositor ¶
func (k Keeper) IterateDepositRequestsByDepositor(ctx sdk.Context, depositor sdk.AccAddress, cb func(req types.DepositRequest) (stop bool, err error)) error
IterateDepositRequestsByDepositor iterates through deposit requests in the store by a depositor and call cb on each order.
func (Keeper) IterateOrdersByOrderer ¶
func (k Keeper) IterateOrdersByOrderer(ctx sdk.Context, orderer sdk.AccAddress, cb func(order types.Order) (stop bool, err error)) error
IterateOrdersByOrderer iterates through orders in the store by an orderer and call cb on each order.
func (Keeper) IterateOrdersByPair ¶
func (k Keeper) IterateOrdersByPair(ctx sdk.Context, pairId uint64, cb func(order types.Order) (stop bool, err error)) error
IterateOrdersByPair iterates through all the orders within the pair and call cb for each order.
func (Keeper) IteratePoolsByPair ¶
func (k Keeper) IteratePoolsByPair(ctx sdk.Context, pairId uint64, cb func(pool types.Pool) (stop bool, err error)) error
IteratePoolsByPair iterates over all the stored pools by the pair and performs a callback function. Stops iteration when callback returns true.
func (Keeper) IterateWithdrawRequestsByWithdrawer ¶
func (k Keeper) IterateWithdrawRequestsByWithdrawer(ctx sdk.Context, withdrawer sdk.AccAddress, cb func(req types.WithdrawRequest) (stop bool, err error)) error
IterateWithdrawRequestsByWithdrawer iterates through withdraw requests in the store by a withdrawer and call cb on each order.
func (Keeper) LimitOrder ¶
LimitOrder handles types.MsgLimitOrder and stores types.Order.
func (Keeper) MarkPoolAsDisabled ¶
MarkPoolAsDisabled marks a pool as disabled.
func (Keeper) MarketOrder ¶
MarketOrder handles types.MsgMarketOrder and stores types.Order.
func (Keeper) PriceLimits ¶
func (Keeper) SetDepositRequest ¶
func (k Keeper) SetDepositRequest(ctx sdk.Context, req types.DepositRequest)
SetDepositRequest stores deposit request for the batch execution.
func (Keeper) SetDepositRequestIndex ¶
func (k Keeper) SetDepositRequestIndex(ctx sdk.Context, req types.DepositRequest)
func (Keeper) SetLastPairId ¶
SetLastPairId stores the last pair id.
func (Keeper) SetLastPoolId ¶
SetLastPoolId stores the last pool id.
func (Keeper) SetMaxNumActivePoolsPerPair ¶
SetMaxNumActivePoolsPerPair sets the maximum number of active pools per pair.
func (Keeper) SetMaxNumMarketMakingOrderTicks ¶
SetMaxNumMarketMakingOrderTicks sets max num market making order ticks
func (Keeper) SetMaxNumMarketMakingOrdersPerPair ¶
SetMaxNumMarketMakingOrdersPerPair sets max num market making orders per pair
func (Keeper) SetNumMMOrders ¶
func (Keeper) SetPairIndex ¶
SetPairIndex stores a pair index.
func (Keeper) SetPairLookupIndex ¶
SetPairLookupIndex stores a pair lookup index for given denoms.
func (Keeper) SetPoolByReserveIndex ¶
SetPoolByReserveIndex stores a pool by reserve account index key.
func (Keeper) SetPoolsByPairIndex ¶
SetPoolsByPairIndex stores a pool by pair index key.
func (Keeper) SetWithdrawRequest ¶
func (k Keeper) SetWithdrawRequest(ctx sdk.Context, req types.WithdrawRequest)
SetWithdrawRequest stores withdraw request for the batch execution.
func (Keeper) SetWithdrawRequestIndex ¶
func (k Keeper) SetWithdrawRequestIndex(ctx sdk.Context, req types.WithdrawRequest)
func (Keeper) ValidateMsgCancelOrder ¶
func (k Keeper) ValidateMsgCancelOrder(ctx sdk.Context, msg *types.MsgCancelOrder) (order types.Order, err error)
ValidateMsgCancelOrder validates types.MsgCancelOrder and returns the order.
func (Keeper) ValidateMsgCreatePair ¶
ValidateMsgCreatePair validates types.MsgCreatePair.
func (Keeper) ValidateMsgCreatePool ¶
ValidateMsgCreatePool validates types.MsgCreatePool.
func (Keeper) ValidateMsgCreateRangedPool ¶
ValidateMsgCreateRangedPool validates types.MsgCreateRangedPool.
func (Keeper) ValidateMsgDeposit ¶
ValidateMsgDeposit validates types.MsgDeposit.
func (Keeper) ValidateMsgWithdraw ¶
ValidateMsgWithdraw validates types.MsgWithdraw.
func (Keeper) Withdraw ¶
func (k Keeper) Withdraw(ctx sdk.Context, msg *types.MsgWithdraw) (types.WithdrawRequest, error)
Withdraw handles types.MsgWithdraw and stores the request.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
type Querier ¶
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper.
func (Querier) DepositRequest ¶
func (k Querier) DepositRequest(c context.Context, req *types.QueryDepositRequestRequest) (*types.QueryDepositRequestResponse, error)
DepositRequest queries the specific deposit request.
func (Querier) DepositRequests ¶
func (k Querier) DepositRequests(c context.Context, req *types.QueryDepositRequestsRequest) (*types.QueryDepositRequestsResponse, error)
DepositRequests queries all deposit requests.
func (Querier) NumMMOrders ¶
func (k Querier) NumMMOrders(c context.Context, req *types.QueryNumMMOrdersRequest) (*types.QueryNumMMOrdersResponse, error)
NumMMOrders queries the number of market making orders by an orderer in a pair.
func (Querier) Order ¶
func (k Querier) Order(c context.Context, req *types.QueryOrderRequest) (*types.QueryOrderResponse, error)
Order queries the specific order.
func (Querier) OrderBooks ¶
func (k Querier) OrderBooks(c context.Context, req *types.QueryOrderBooksRequest) (*types.QueryOrderBooksResponse, error)
OrderBooks queries virtual order books from user orders and pools.
func (Querier) Orders ¶
func (k Querier) Orders(c context.Context, req *types.QueryOrdersRequest) (*types.QueryOrdersResponse, error)
Orders queries all orders.
func (Querier) OrdersByOrderer ¶
func (k Querier) OrdersByOrderer(c context.Context, req *types.QueryOrdersByOrdererRequest) (*types.QueryOrdersResponse, error)
OrdersByOrderer returns orders made by an orderer.
func (Querier) Pair ¶
func (k Querier) Pair(c context.Context, req *types.QueryPairRequest) (*types.QueryPairResponse, error)
Pair queries the specific pair.
func (Querier) Pairs ¶
func (k Querier) Pairs(c context.Context, req *types.QueryPairsRequest) (*types.QueryPairsResponse, error)
Pairs queries all pairs.
func (Querier) Params ¶
func (k Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries the parameters of the liquidity module.
func (Querier) Pool ¶
func (k Querier) Pool(c context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
Pool queries the specific pool.
func (Querier) PoolByPoolCoinDenom ¶
func (k Querier) PoolByPoolCoinDenom(c context.Context, req *types.QueryPoolByPoolCoinDenomRequest) (*types.QueryPoolResponse, error)
PoolByPoolCoinDenom queries the specific pool by the pool coin denomination.
func (Querier) PoolByReserveAddress ¶
func (k Querier) PoolByReserveAddress(c context.Context, req *types.QueryPoolByReserveAddressRequest) (*types.QueryPoolResponse, error)
PoolByReserveAddress queries the specific pool by the reserve account address.
func (Querier) Pools ¶
func (k Querier) Pools(c context.Context, req *types.QueryPoolsRequest) (*types.QueryPoolsResponse, error)
Pools queries all pools.
func (Querier) WithdrawRequest ¶
func (k Querier) WithdrawRequest(c context.Context, req *types.QueryWithdrawRequestRequest) (*types.QueryWithdrawRequestResponse, error)
WithdrawRequest queries the specific withdraw request.
func (Querier) WithdrawRequests ¶
func (k Querier) WithdrawRequests(c context.Context, req *types.QueryWithdrawRequestsRequest) (*types.QueryWithdrawRequestsResponse, error)
WithdrawRequests queries all withdraw requests.