Documentation ¶
Index ¶
- Variables
- type ConcentratedPoolNoTickModelError
- type DenomPair
- type LiquidityDepthsWithRange
- type OrderbookPoolInvalidDirectionError
- type PoolI
- type PoolWrapper
- func (p *PoolWrapper) GetId() uint64
- func (p *PoolWrapper) GetPoolDenoms() []string
- func (p *PoolWrapper) GetPoolLiquidityCap() osmomath.Int
- func (p *PoolWrapper) GetSQSPoolModel() SQSPool
- func (p *PoolWrapper) GetTickModel() (*TickModel, error)
- func (p *PoolWrapper) GetType() poolmanagertypes.PoolType
- func (p *PoolWrapper) GetUnderlyingPool() poolmanagertypes.PoolI
- type SQSPool
- type TakerFeeMap
- func (tfm TakerFeeMap) GetTakerFee(denom0, denom1 string) osmomath.Dec
- func (tfm TakerFeeMap) Has(denom0, denom1 string) bool
- func (tfm TakerFeeMap) MarshalJSON() ([]byte, error)
- func (tfm TakerFeeMap) SetTakerFee(denom0, denom1 string, takerFee osmomath.Dec)
- func (tfm TakerFeeMap) UnmarshalJSON(data []byte) error
- type TickModel
Constants ¶
This section is empty.
Variables ¶
var DefaultTakerFee = osmomath.MustNewDecFromStr("0.001000000000000000")
Functions ¶
This section is empty.
Types ¶
type ConcentratedPoolNoTickModelError ¶
type ConcentratedPoolNoTickModelError struct {
PoolId uint64
}
func (ConcentratedPoolNoTickModelError) Error ¶
func (e ConcentratedPoolNoTickModelError) Error() string
type LiquidityDepthsWithRange ¶
type LiquidityDepthsWithRange = clqueryproto.LiquidityDepthWithRange
type OrderbookPoolInvalidDirectionError ¶
type OrderbookPoolInvalidDirectionError struct {
Direction int64
}
func (OrderbookPoolInvalidDirectionError) Error ¶
func (e OrderbookPoolInvalidDirectionError) Error() string
type PoolI ¶
type PoolI interface { // GetId returns the ID of the pool. GetId() uint64 // GetType returns the type of the pool (Balancer, Stableswap, Concentrated, etc.) GetType() poolmanagertypes.PoolType GetPoolLiquidityCap() osmomath.Int GetPoolDenoms() []string GetUnderlyingPool() poolmanagertypes.PoolI GetSQSPoolModel() SQSPool // GetTickModel returns the tick model for the pool // if this is a concentrated pool. Errors otherwise // Also errors if this is a concentrated pool but // the tick model is not set GetTickModel() (*TickModel, error) }
PoolI represents a generalized Pool interface.
type PoolWrapper ¶
type PoolWrapper struct { ChainModel poolmanagertypes.PoolI `json:"underlying_pool"` SQSModel SQSPool `json:"sqs_model"` APRData passthroughdomain.PoolAPRDataStatusWrap `json:"apr_data,omitempty"` FeesData passthroughdomain.PoolFeesDataStatusWrap `json:"fees_data,omitempty"` TickModel *TickModel `json:"tick_model,omitempty"` }
func NewPool ¶
func NewPool(model poolmanagertypes.PoolI, spreadFactor osmomath.Dec, balances sdk.Coins) *PoolWrapper
func (*PoolWrapper) GetPoolDenoms ¶
func (p *PoolWrapper) GetPoolDenoms() []string
GetPoolDenoms implements PoolI.
func (*PoolWrapper) GetPoolLiquidityCap ¶
func (p *PoolWrapper) GetPoolLiquidityCap() osmomath.Int
GetPoolLiquidityCap implements PoolI.
func (*PoolWrapper) GetSQSPoolModel ¶
func (p *PoolWrapper) GetSQSPoolModel() SQSPool
GetSQSPoolModel implements PoolI.
func (*PoolWrapper) GetTickModel ¶
func (p *PoolWrapper) GetTickModel() (*TickModel, error)
GetTickModel implements PoolI.
func (*PoolWrapper) GetType ¶
func (p *PoolWrapper) GetType() poolmanagertypes.PoolType
GetType implements PoolI.
func (*PoolWrapper) GetUnderlyingPool ¶
func (p *PoolWrapper) GetUnderlyingPool() poolmanagertypes.PoolI
GetUnderlyingPool implements PoolI.
type SQSPool ¶
type SQSPool struct { PoolLiquidityCap osmomath.Int `json:"pool_liquidity_cap"` PoolLiquidityCapError string `json:"pool_liquidity_error,omitempty"` // Only CL and Cosmwasm pools need balances appended Balances sdk.Coins `json:"balances"` PoolDenoms []string `json:"pool_denoms"` SpreadFactor osmomath.Dec `json:"spread_factor"` // Only CosmWasm pools need CosmWasmPoolModel appended CosmWasmPoolModel *cosmwasmpool.CosmWasmPoolModel `json:"cosmwasm_pool_model,omitempty"` }
type TakerFeeMap ¶
TakerFeeMap is a map of DenomPair to taker fee. Sorting is no longer performed since bi-directional taker fee is supported.
func (TakerFeeMap) GetTakerFee ¶
func (tfm TakerFeeMap) GetTakerFee(denom0, denom1 string) osmomath.Dec
GetTakerFee returns the taker fee for the given denoms. Sorting is no longer performed since bi-directional taker fees are stored. Returns error if the taker fee is not found.
func (TakerFeeMap) Has ¶
func (tfm TakerFeeMap) Has(denom0, denom1 string) bool
Has returns true if the taker fee for the given denoms is found. Sorting is no longer performed since bi-directional taker fees are stored.
func (TakerFeeMap) MarshalJSON ¶
func (tfm TakerFeeMap) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (TakerFeeMap) SetTakerFee ¶
func (tfm TakerFeeMap) SetTakerFee(denom0, denom1 string, takerFee osmomath.Dec)
SetTakerFee sets the taker fee for the given denoms. Sorting is no longer performed since bi-directional taker fee is supported.
func (TakerFeeMap) UnmarshalJSON ¶
func (tfm TakerFeeMap) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type TickModel ¶
type TickModel struct { Ticks []LiquidityDepthsWithRange `json:"ticks,omitempty"` CurrentTickIndex int64 `json:"current_tick_index,omitempty"` HasNoLiquidity bool `json:"has_no_liquidity,omitempty"` }
Directories ¶
Path | Synopsis |
---|---|
This package encapsulates the JSON library used by the sidecar query server.
|
This package encapsulates the JSON library used by the sidecar query server. |
proto
|
|