github.com/gravity-devs/liquidity@v1.5.3/x/liquidity/types/querier.go (about)

     1  package types
     2  
     3  // DONTCOVER
     4  // client is excluded from test coverage in the poc phase milestone 1 and will be included in milestone 2 with completeness
     5  
     6  // QueryLiquidityPool liquidity query endpoint supported by the liquidity querier
     7  const (
     8  	QueryLiquidityPool  = "liquidityPool"
     9  	QueryLiquidityPools = "liquidityPools"
    10  )
    11  
    12  // QueryLiquidityPoolParams is the query parameters for 'custom/liquidity'
    13  type QueryLiquidityPoolParams struct {
    14  	PoolId uint64 `json:"pool_id" yaml:"pool_id"` //nolint:revive
    15  }
    16  
    17  // return params of Liquidity Pool Query
    18  func NewQueryLiquidityPoolParams(poolID uint64) QueryLiquidityPoolParams {
    19  	return QueryLiquidityPoolParams{
    20  		PoolId: poolID,
    21  	}
    22  }
    23  
    24  // QueryValidatorsParams defines the params for the following queries:
    25  // - 'custom/liquidity/liquidityPools'
    26  type QueryLiquidityPoolsParams struct {
    27  	Page, Limit int
    28  }
    29  
    30  // return params of Liquidity Pools Query
    31  func NewQueryLiquidityPoolsParams(page, limit int) QueryLiquidityPoolsParams {
    32  	return QueryLiquidityPoolsParams{page, limit}
    33  }