getter.gno
ExistsPoolPath
ExistsPoolPath checks if a pool exists at the given path.
Parameters
poolPath
string
Canonical pool path identifying the pool to check.
Return Values
bool
bool
True when a pool is registered at poolPath; false otherwise.
GetBalanceToken0
GetBalanceToken0 returns the balance of token0 in the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
int64
int64
Current token0 balance held by the pool, in token base units.
error
error
Non-nil when poolPath does not identify an existing pool.
GetBalanceToken1
GetBalanceToken1 returns the balance of token1 in the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
int64
int64
Current token1 balance held by the pool, in token base units.
error
error
Non-nil when poolPath does not identify an existing pool.
GetBalances
GetBalances returns the balances of the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool whose balances are read.
Return Values
int64
int64
Current token0 balance held by the pool, in token base units.
int64
int64
Current token1 balance held by the pool, in token base units.
error
error
Non-nil when poolPath does not identify an existing pool.
GetFee
GetFee returns the fee tier of the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool whose fee tier is read.
Return Values
uint32
uint32
Configured fee tier for the pool.
error
error
Non-nil when poolPath does not identify an existing pool.
GetFeeAmountTickSpacing
GetFeeAmountTickSpacing returns the tick spacing for a given fee tier.
Parameters
fee
uint32
Fee tier whose supported tick spacing is requested.
Return Values
spacing
int32
Tick spacing configured for fee.
err
error
Non-nil when fee is not one of the supported fee tiers.
GetFeeAmountTickSpacings
GetFeeAmountTickSpacings returns all fee tier to tick spacing mappings.
Return Values
map[uint32]int32
map[uint32]int32
Copy of the configured fee-tier-to-tick-spacing mapping.
GetFeeGrowthGlobal0X128
GetFeeGrowthGlobal0X128 returns the global fee growth for token0.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
string
string
Token0 global fee growth, serialized as a base-10 X128 accumulator.
error
error
Non-nil when poolPath does not identify an existing pool.
GetFeeGrowthGlobal1X128
GetFeeGrowthGlobal1X128 returns the global fee growth for token1.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
string
string
Token1 global fee growth, serialized as a base-10 X128 accumulator.
error
error
Non-nil when poolPath does not identify an existing pool.
GetFeeGrowthGlobalX128
GetFeeGrowthGlobalX128 returns the global fee growth for both tokens.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
string
string
Token0 global fee growth, serialized as a base-10 X128 accumulator.
string
string
Token1 global fee growth, serialized as a base-10 X128 accumulator.
error
error
Non-nil when poolPath does not identify an existing pool.
GetInitializedTicksInRange
GetInitializedTicksInRange returns initialized ticks within the given range.
Parameters
poolPath
string
Canonical pool path whose ticks are enumerated.
tickLower
int32
Lower inclusive tick bound for enumeration.
tickUpper
int32
Upper bound for enumeration; ticks are selected through the pool's range iterator.
Return Values
[]int32
[]int32
Tick indices that are initialized in the requested range.
error
error
Non-nil when poolPath does not identify an existing pool.
GetLiquidity
GetLiquidity returns the current liquidity in the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool whose liquidity is read.
Return Values
string
string
Current pool liquidity, serialized as a base-10 unsigned integer.
error
error
Non-nil when poolPath does not identify an existing pool.
GetPendingProtocolFees
GetPendingProtocolFees returns the pending protocol fee amount per token path.
Return Values
map[string]int64
map[string]int64
Copy of pending protocol fees keyed by token contract path, with amounts in token base units.
GetPoolCreationFee
GetPoolCreationFee returns the current pool creation fee.
Return Values
int64
int64
Pool creation fee charged when a new pool is created, in configured native-token base units.
GetPoolPositions
GetPoolPositions returns a read-only view of a pool's positions, keyed by position key. nil is returned when the pool does not exist.
Parameters
poolPath
string
Canonical pool path identifying the pool whose positions are read.
Return Values
*rotree.ReadOnlyTree
*rotree.ReadOnlyTree
Read-only tree keyed by position key; nil when the pool does not exist.
GetPools
GetPools returns a read-only view of every pool, keyed by pool path. Reading an entry yields a clone, so the view cannot mutate realm state.
Return Values
*rotree.ReadOnlyTree
*rotree.ReadOnlyTree
Read-only tree keyed by canonical pool path; each entry is cloned before it is exposed.
GetPositionFeeGrowthInside0LastX128
GetPositionFeeGrowthInside0LastX128 returns the last recorded fee growth inside for token0.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
string
string
Position's last token0 fee-growth-inside accumulator, serialized as a base-10 X128 value.
error
error
Non-nil when the pool or position key cannot be found.
GetPositionFeeGrowthInside1LastX128
GetPositionFeeGrowthInside1LastX128 returns the last recorded fee growth inside for token1.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
string
string
Position's last token1 fee-growth-inside accumulator, serialized as a base-10 X128 value.
error
error
Non-nil when the pool or position key cannot be found.
GetPositionFeeGrowthInsideLastX128
GetPositionFeeGrowthInsideLastX128 returns the last recorded fee growth inside for both tokens.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
string
string
Position's last token0 fee-growth-inside accumulator, serialized as a base-10 X128 value.
string
string
Position's last token1 fee-growth-inside accumulator, serialized as a base-10 X128 value.
error
error
Non-nil when the pool or position key cannot be found.
GetPositionLiquidity
GetPositionLiquidity returns the liquidity of a position.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
string
string
Position liquidity, serialized as a base-10 unsigned integer.
error
error
Non-nil when the pool or position key cannot be found.
GetPositionTokensOwed
GetPositionTokensOwedInfos returns the amount of tokens owed for both tokens.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
int64
int64
Amount of token0 owed to the position, in token base units.
int64
int64
Amount of token1 owed to the position, in token base units.
error
error
Non-nil when the pool or position key cannot be found.
GetPositionTokensOwed0
GetPositionTokensOwed0 returns the amount of token0 owed to a position.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
int64
int64
Amount of token0 owed to the position, in token base units.
error
error
Non-nil when the pool or position key cannot be found.
GetPositionTokensOwed1
GetPositionTokensOwed1 returns the amount of token1 owed to a position.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the position.
key
string
Position key identifying the position within the pool.
Return Values
int64
int64
Amount of token1 owed to the position, in token base units.
error
error
Non-nil when the pool or position key cannot be found.
GetProtocolFeesToken0
GetProtocolFeesToken0 returns accumulated protocol fees for token0.
Parameters
poolPath
string
Canonical pool path identifying the pool whose fees are read.
Return Values
int64
int64
Accumulated protocol fee for token0, in token base units.
error
error
Non-nil when poolPath does not identify an existing pool.
GetProtocolFeesToken1
GetProtocolFeesToken1 returns accumulated protocol fees for token1.
Parameters
poolPath
string
Canonical pool path identifying the pool whose fees are read.
Return Values
int64
int64
Accumulated protocol fee for token1, in token base units.
error
error
Non-nil when poolPath does not identify an existing pool.
GetProtocolFeesTokens
GetProtocolFeesTokens returns the accumulated protocol fees for both tokens.
Parameters
poolPath
string
Canonical pool path identifying the pool whose fees are read.
Return Values
int64
int64
Accumulated protocol fee for token0, in token base units.
int64
int64
Accumulated protocol fee for token1, in token base units.
error
error
Non-nil when poolPath does not identify an existing pool.
GetSlot0FeeProtocol
GetSlot0FeeProtocol returns the protocol fee rate from slot0.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
uint8
uint8
Packed protocol-fee denominator configuration from slot0; token0 occupies the low nibble and token1 the high nibble.
error
error
Non-nil when poolPath does not identify an existing pool.
GetSlot0SqrtPriceX96
GetSlot0SqrtPriceX96 returns the current sqrt price from slot0.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
string
string
Current square-root price in Q64.96 fixed-point form, serialized as a base-10 unsigned integer.
error
error
Non-nil when poolPath does not identify an existing pool.
GetSlot0Tick
GetSlot0Tick returns the current tick from slot0.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
int32
int32
Current active tick index stored in slot0.
error
error
Non-nil when poolPath does not identify an existing pool.
GetSlot0Unlocked
GetSlot0Unlocked reports whether the pool is currently unlocked.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
bool
bool
True when the pool is not holding its reentrancy lock; false when the pool is currently locked.
error
error
Non-nil when poolPath does not identify an existing pool.
GetTickBitmaps
GetTickBitmaps returns the tick bitmap for a given word position.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the bitmap.
wordPos
int16
Signed bitmap word position to read.
Return Values
string
string
Bitmap word serialized as a base-10 unsigned integer.
error
error
Non-nil when the pool or bitmap word is not found.
GetTickCumulativeOutside
GetTickCumulativeOutside returns the tick cumulative value outside a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose outside tick cumulative is requested.
Return Values
int64
int64
Tick cumulative recorded outside tick.
error
error
Non-nil when the pool or tick is not found.
GetTickFeeGrowthOutside0X128
GetTickFeeGrowthOutside0X128 returns fee growth outside for token0 at a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose outside fee growth is requested.
Return Values
string
string
Token0 fee growth outside tick, serialized as a base-10 X128 accumulator.
error
error
Non-nil when the pool or tick is not found.
GetTickFeeGrowthOutside1X128
GetTickFeeGrowthOutside1X128 returns fee growth outside for token1 at a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose outside fee growth is requested.
Return Values
string
string
Token1 fee growth outside tick, serialized as a base-10 X128 accumulator.
error
error
Non-nil when the pool or tick is not found.
GetTickFeeGrowthOutsideX128
GetTickFeeGrowthOutsideX128 returns fee growth outside for both tokens at a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose outside fee growth is requested.
Return Values
string
string
Token0 fee growth outside tick, serialized as a base-10 X128 accumulator.
string
string
Token1 fee growth outside tick, serialized as a base-10 X128 accumulator.
error
error
Non-nil when the pool or tick is not found.
GetTickInitialized
GetTickInitialized returns whether a tick is initialized.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose initialization flag is requested.
Return Values
bool
bool
True when the tick has initialized liquidity and outside accumulators.
error
error
Non-nil when the pool or tick is not found.
GetTickLiquidityGross
GetTickLiquidityGross returns the total liquidity that references a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose gross liquidity is requested.
Return Values
string
string
Gross liquidity referencing the tick, serialized as a base-10 unsigned integer.
error
error
Non-nil when the pool or tick is not found.
GetTickLiquidityNet
GetTickLiquidityNet returns the net liquidity change at a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose net liquidity change is requested.
Return Values
string
string
Signed net liquidity change at the tick, serialized as a base-10 integer.
error
error
Non-nil when the pool or tick is not found.
GetTickSecondsOutside
GetTickSecondsOutside returns seconds spent outside a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose outside time is requested.
Return Values
uint32
uint32
Seconds accumulated outside the tick.
error
error
Non-nil when the pool or tick is not found.
GetTickSecondsPerLiquidityOutsideX128
GetTickSecondsPerLiquidityOutsideX128 returns seconds per liquidity outside a tick.
Parameters
poolPath
string
Canonical pool path identifying the pool containing the tick.
tick
int32
Tick index whose outside accumulator is requested.
Return Values
string
string
Seconds-per-liquidity outside tick in X128 precision, serialized as a base-10 unsigned integer.
error
error
Non-nil when the pool or tick is not found.
GetTickSpacing
GetTickSpacing returns the tick spacing of the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool whose spacing is read.
Return Values
int32
int32
Tick spacing associated with the pool's fee tier.
error
error
Non-nil when poolPath does not identify an existing pool.
GetToken0Path
GetToken0Path returns the path of token0 in the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
string
string
Canonical token0 contract path stored by the pool.
error
error
Non-nil when poolPath does not identify an existing pool.
GetToken1Path
GetToken1Path returns the path of token1 in the pool.
Parameters
poolPath
string
Canonical pool path identifying the pool to query.
Return Values
string
string
Canonical token1 contract path stored by the pool.
error
error
Non-nil when poolPath does not identify an existing pool.
GetWithdrawalFee
GetWithdrawalFee returns the current withdrawal fee rate.
Return Values
uint64
uint64
Withdrawal fee rate in basis points; zero means no withdrawal fee is charged.
Observe
Observe returns the tick and seconds-per-liquidity cumulatives for each requested lookback, matching Uniswap V3's observe(uint32[] secondsAgos).
Parameters
poolPath
string
Canonical pool path whose oracle history is queried.
secondsAgos
[]uint32
Lookback intervals in seconds; one cumulative pair is returned for each value, in the same order.
Return Values
[]int64
[]int64
Tick cumulative values corresponding to each requested lookback.
[]string
[]string
Seconds-per-liquidity cumulative X128 values, serialized as base-10 strings, corresponding to each lookback.
error
error
Non-nil when pool or observation data cannot be read.
OracleConsult
OracleConsult returns the arithmetic mean tick and harmonic mean liquidity over a lookback, following Uniswap V3 OracleLibrary's consult convention.
Parameters
poolPath
string
Canonical pool path whose oracle data is queried.
secondsAgo
uint32
Lookback duration in seconds used to compute the time-weighted values.
Return Values
int32
int32
Arithmetic mean tick over the requested lookback.
string
string
Harmonic mean liquidity over the lookback, serialized as a base-10 unsigned integer.
error
error
Non-nil when the pool or required observation history is unavailable.
SnapshotCumulativesInside
SnapshotCumulativesInside returns the tick, seconds-per-liquidity, and seconds cumulatives accrued while the pool price was inside [tickLower, tickUpper). Both boundary ticks must be initialized.
Snapshots are only comparable across an interval during which a position in the range existed, matching Uniswap V3's snapshotCumulativesInside.
Parameters
poolPath
string
Canonical pool path whose oracle snapshot is queried.
tickLower
int32
Lower inclusive tick boundary of the position range.
tickUpper
int32
Upper exclusive tick boundary of the position range; both boundary ticks must be initialized.
Return Values
int64
int64
Tick cumulative accrued while the price was inside the range.
string
string
Seconds-per-liquidity-inside X128 accumulator, serialized as a base-10 string.
uint32
uint32
Seconds accrued while the price was inside the range.
error
error
Non-nil when the pool, observations, or initialized boundaries are unavailable.
Last updated