Documentation ¶
Index ¶
- Variables
- type Querier
- func (q Querier) AllPools(ctx sdk.Context, req queryproto.AllPoolsRequest) (*queryproto.AllPoolsResponse, error)
- func (q Querier) AllRegisteredAlloyedPools(ctx sdk.Context, req queryproto.AllRegisteredAlloyedPoolsRequest) (*queryproto.AllRegisteredAlloyedPoolsResponse, error)
- func (q Querier) AllTakerFeeShareAccumulators(ctx sdk.Context, req queryproto.AllTakerFeeShareAccumulatorsRequest) (*queryproto.AllTakerFeeShareAccumulatorsResponse, error)
- func (q Querier) AllTakerFeeShareAgreements(ctx sdk.Context, req queryproto.AllTakerFeeShareAgreementsRequest) (*queryproto.AllTakerFeeShareAgreementsResponse, error)
- func (q Querier) EstimateSinglePoolSwapExactAmountIn(ctx sdk.Context, req queryproto.EstimateSinglePoolSwapExactAmountInRequest) (*queryproto.EstimateSwapExactAmountInResponse, error)
- func (q Querier) EstimateSinglePoolSwapExactAmountOut(ctx sdk.Context, req queryproto.EstimateSinglePoolSwapExactAmountOutRequest) (*queryproto.EstimateSwapExactAmountOutResponse, error)
- func (q Querier) EstimateSwapExactAmountIn(ctx sdk.Context, req queryproto.EstimateSwapExactAmountInRequest) (*queryproto.EstimateSwapExactAmountInResponse, error)
- func (q Querier) EstimateSwapExactAmountInWithPrimitiveTypes(ctx sdk.Context, ...) (*queryproto.EstimateSwapExactAmountInResponse, error)
- func (q Querier) EstimateSwapExactAmountOut(ctx sdk.Context, req queryproto.EstimateSwapExactAmountOutRequest) (*queryproto.EstimateSwapExactAmountOutResponse, error)
- func (q Querier) EstimateSwapExactAmountOutWithPrimitiveTypes(ctx sdk.Context, ...) (*queryproto.EstimateSwapExactAmountOutResponse, error)
- func (q Querier) EstimateTradeBasedOnPriceImpact(ctx sdk.Context, req queryproto.EstimateTradeBasedOnPriceImpactRequest) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error)
- func (q Querier) ListPoolsByDenom(ctx sdk.Context, req queryproto.ListPoolsByDenomRequest) (*queryproto.ListPoolsByDenomResponse, error)
- func (q Querier) NumPools(ctx sdk.Context, _ queryproto.NumPoolsRequest) (*queryproto.NumPoolsResponse, error)
- func (q Querier) Params(ctx sdk.Context, req queryproto.ParamsRequest) (*queryproto.ParamsResponse, error)
- func (q Querier) Pool(ctx sdk.Context, req queryproto.PoolRequest) (*queryproto.PoolResponse, error)
- func (q Querier) RegisteredAlloyedPoolFromDenom(ctx sdk.Context, req queryproto.RegisteredAlloyedPoolFromDenomRequest) (*queryproto.RegisteredAlloyedPoolFromDenomResponse, error)
- func (q Querier) RegisteredAlloyedPoolFromPoolId(ctx sdk.Context, req queryproto.RegisteredAlloyedPoolFromPoolIdRequest) (*queryproto.RegisteredAlloyedPoolFromPoolIdResponse, error)
- func (q Querier) SpotPrice(ctx sdk.Context, req queryproto.SpotPriceRequest) (*queryproto.SpotPriceResponse, error)
- func (q Querier) TakerFeeShareAgreementFromDenom(ctx sdk.Context, req queryproto.TakerFeeShareAgreementFromDenomRequest) (*queryproto.TakerFeeShareAgreementFromDenomResponse, error)
- func (q Querier) TakerFeeShareDenomsToAccruedValue(ctx sdk.Context, req queryproto.TakerFeeShareDenomsToAccruedValueRequest) (*queryproto.TakerFeeShareDenomsToAccruedValueResponse, error)
- func (q Querier) TotalLiquidity(ctx sdk.Context, req queryproto.TotalLiquidityRequest) (*queryproto.TotalLiquidityResponse, error)
- func (q Querier) TotalPoolLiquidity(ctx sdk.Context, req queryproto.TotalPoolLiquidityRequest) (*queryproto.TotalPoolLiquidityResponse, error)
- func (q Querier) TotalVolumeForPool(ctx sdk.Context, req queryproto.TotalVolumeForPoolRequest) (*queryproto.TotalVolumeForPoolResponse, error)
- func (q Querier) TradingPairTakerFee(ctx sdk.Context, req queryproto.TradingPairTakerFeeRequest) (*queryproto.TradingPairTakerFeeResponse, error)
- type QuerierV2
Constants ¶
This section is empty.
Variables ¶
var (
DenomPairTakerFeeProposalHandler = govclient.NewProposalHandler(cli.NewCmdHandleDenomPairTakerFeeProposal)
)
Functions ¶
This section is empty.
Types ¶
type Querier ¶
type Querier struct {
K *poolmanager.Keeper
}
func NewQuerier ¶
func NewQuerier(k *poolmanager.Keeper) Querier
func (Querier) AllPools ¶
func (q Querier) AllPools(ctx sdk.Context, req queryproto.AllPoolsRequest) (*queryproto.AllPoolsResponse, error)
func (Querier) AllRegisteredAlloyedPools ¶
func (q Querier) AllRegisteredAlloyedPools(ctx sdk.Context, req queryproto.AllRegisteredAlloyedPoolsRequest) (*queryproto.AllRegisteredAlloyedPoolsResponse, error)
func (Querier) AllTakerFeeShareAccumulators ¶
func (q Querier) AllTakerFeeShareAccumulators(ctx sdk.Context, req queryproto.AllTakerFeeShareAccumulatorsRequest) (*queryproto.AllTakerFeeShareAccumulatorsResponse, error)
func (Querier) AllTakerFeeShareAgreements ¶
func (q Querier) AllTakerFeeShareAgreements(ctx sdk.Context, req queryproto.AllTakerFeeShareAgreementsRequest) (*queryproto.AllTakerFeeShareAgreementsResponse, error)
func (Querier) EstimateSinglePoolSwapExactAmountIn ¶
func (q Querier) EstimateSinglePoolSwapExactAmountIn(ctx sdk.Context, req queryproto.EstimateSinglePoolSwapExactAmountInRequest) (*queryproto.EstimateSwapExactAmountInResponse, error)
func (Querier) EstimateSinglePoolSwapExactAmountOut ¶
func (q Querier) EstimateSinglePoolSwapExactAmountOut(ctx sdk.Context, req queryproto.EstimateSinglePoolSwapExactAmountOutRequest) (*queryproto.EstimateSwapExactAmountOutResponse, error)
func (Querier) EstimateSwapExactAmountIn ¶
func (q Querier) EstimateSwapExactAmountIn(ctx sdk.Context, req queryproto.EstimateSwapExactAmountInRequest) (*queryproto.EstimateSwapExactAmountInResponse, error)
EstimateSwapExactAmountIn estimates input token amount for a swap.
func (Querier) EstimateSwapExactAmountInWithPrimitiveTypes ¶
func (q Querier) EstimateSwapExactAmountInWithPrimitiveTypes(ctx sdk.Context, req queryproto.EstimateSwapExactAmountInWithPrimitiveTypesRequest) (*queryproto.EstimateSwapExactAmountInResponse, error)
EstimateSwapExactAmountInWithPrimitiveTypes runs same logic with EstimateSwapExactAmountIn but instead takes array of primitive types in the request to support query through grpc-gateway.
func (Querier) EstimateSwapExactAmountOut ¶
func (q Querier) EstimateSwapExactAmountOut(ctx sdk.Context, req queryproto.EstimateSwapExactAmountOutRequest) (*queryproto.EstimateSwapExactAmountOutResponse, error)
EstimateSwapExactAmountOut estimates token output amount for a swap.
func (Querier) EstimateSwapExactAmountOutWithPrimitiveTypes ¶
func (q Querier) EstimateSwapExactAmountOutWithPrimitiveTypes(ctx sdk.Context, req queryproto.EstimateSwapExactAmountOutWithPrimitiveTypesRequest) (*queryproto.EstimateSwapExactAmountOutResponse, error)
EstimateSwapExactAmountOut estimates token output amount for a swap.
func (Querier) EstimateTradeBasedOnPriceImpact ¶
func (q Querier) EstimateTradeBasedOnPriceImpact( ctx sdk.Context, req queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error)
EstimateTradeBasedOnPriceImpact returns the input and output amount of coins for a pool trade based on external price and maximum price impact.
func (Querier) ListPoolsByDenom ¶
func (q Querier) ListPoolsByDenom(ctx sdk.Context, req queryproto.ListPoolsByDenomRequest) (*queryproto.ListPoolsByDenomResponse, error)
ListPoolsByDenom returns a list of pools filtered by denom
func (Querier) NumPools ¶
func (q Querier) NumPools(ctx sdk.Context, _ queryproto.NumPoolsRequest) (*queryproto.NumPoolsResponse, error)
NumPools returns total number of pools.
func (Querier) Params ¶
func (q Querier) Params(ctx sdk.Context, req queryproto.ParamsRequest, ) (*queryproto.ParamsResponse, error)
func (Querier) Pool ¶
func (q Querier) Pool(ctx sdk.Context, req queryproto.PoolRequest) (*queryproto.PoolResponse, error)
Pool returns the pool specified by id.
func (Querier) RegisteredAlloyedPoolFromDenom ¶
func (q Querier) RegisteredAlloyedPoolFromDenom(ctx sdk.Context, req queryproto.RegisteredAlloyedPoolFromDenomRequest) (*queryproto.RegisteredAlloyedPoolFromDenomResponse, error)
func (Querier) RegisteredAlloyedPoolFromPoolId ¶
func (q Querier) RegisteredAlloyedPoolFromPoolId(ctx sdk.Context, req queryproto.RegisteredAlloyedPoolFromPoolIdRequest) (*queryproto.RegisteredAlloyedPoolFromPoolIdResponse, error)
func (Querier) SpotPrice ¶
func (q Querier) SpotPrice(ctx sdk.Context, req queryproto.SpotPriceRequest) (*queryproto.SpotPriceResponse, error)
SpotPrice returns the spot price of the pool with the given quote and base asset denoms. 18 decimals.
func (Querier) TakerFeeShareAgreementFromDenom ¶
func (q Querier) TakerFeeShareAgreementFromDenom(ctx sdk.Context, req queryproto.TakerFeeShareAgreementFromDenomRequest) (*queryproto.TakerFeeShareAgreementFromDenomResponse, error)
func (Querier) TakerFeeShareDenomsToAccruedValue ¶
func (q Querier) TakerFeeShareDenomsToAccruedValue(ctx sdk.Context, req queryproto.TakerFeeShareDenomsToAccruedValueRequest) (*queryproto.TakerFeeShareDenomsToAccruedValueResponse, error)
func (Querier) TotalLiquidity ¶
func (q Querier) TotalLiquidity(ctx sdk.Context, req queryproto.TotalLiquidityRequest) (*queryproto.TotalLiquidityResponse, error)
TotalLiquidity returns the total liquidity across all pools.
func (Querier) TotalPoolLiquidity ¶
func (q Querier) TotalPoolLiquidity(ctx sdk.Context, req queryproto.TotalPoolLiquidityRequest) (*queryproto.TotalPoolLiquidityResponse, error)
TotalPoolLiquidity returns the total liquidity of the pool.
func (Querier) TotalVolumeForPool ¶
func (q Querier) TotalVolumeForPool(ctx sdk.Context, req queryproto.TotalVolumeForPoolRequest) (*queryproto.TotalVolumeForPoolResponse, error)
TotalVolumeForPool returns the total volume of the pool.
func (Querier) TradingPairTakerFee ¶
func (q Querier) TradingPairTakerFee(ctx sdk.Context, req queryproto.TradingPairTakerFeeRequest) (*queryproto.TradingPairTakerFeeResponse, error)
TradingPairTakerFee returns the taker fee for the given trading pair
type QuerierV2 ¶
type QuerierV2 struct {
K poolmanager.Keeper
}
QuerierV2 defines a wrapper around the x/poolmanager keeper providing gRPC method handlers for v2 queries.
func NewV2Querier ¶
func NewV2Querier(k poolmanager.Keeper) QuerierV2
func (QuerierV2) SpotPriceV2 ¶
func (q QuerierV2) SpotPriceV2(ctx sdk.Context, req queryprotov2.SpotPriceRequest) (*queryprotov2.SpotPriceResponse, error)
SpotPriceV2 returns the spot price of the pool with the given quote and base asset denoms. 36 decimals.
Directories ¶
Path | Synopsis |
---|---|
Package queryproto is a reverse proxy.
|
Package queryproto is a reverse proxy. |
Package queryprotov2 is a reverse proxy.
|
Package queryprotov2 is a reverse proxy. |