ErrSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
errUpgradeWhileLocked
untyped stringerrUpgradeWhileLocked is returned when UpgradeImpl is invoked while the pool's reentrancy lock (StoreKeyUnlocked) is held.
Value
"cannot upgrade pool implementation while pool is locked"
GetPools
func() *v0.ReadOnlyTreeGetPools retrieves the map containing all pool data. This is the main data structure that stores all pool instances. Returns: - pools: the B+tree containing all persisted pool instances; panics if the KV store cannot read it or the stored value is nil.
- OID
- 07abb6…7fed:3
GetPools details
ExistsPoolPath
func(poolPath string) boolExistsPoolPath checks if a pool exists at the given path. Parameters: - poolPath: Canonical pool path identifying the pool to check. Returns: - bool: True when a pool is registered at poolPath; false otherwise.
- OID
- 07abb6…7fed:5
ExistsPoolPath details
GetBalances
func(poolPath string) (int64, int64, .uverse.error)GetBalances returns the balances of the pool. Parameters: - poolPath: Canonical pool path identifying the pool whose balances are read. Returns: - int64: Current token0 balance held by the pool, in token base units. - int64: Current token1 balance held by the pool, in token base units. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:6
GetBalances details
GetBalanceToken0
func(poolPath string) (int64, .uverse.error)GetBalanceToken0 returns the balance of token0 in the pool. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - int64: Current token0 balance held by the pool, in token base units. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:7
GetBalanceToken0 details
GetBalanceToken1
func(poolPath string) (int64, .uverse.error)GetBalanceToken1 returns the balance of token1 in the pool. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - int64: Current token1 balance held by the pool, in token base units. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:8
GetBalanceToken1 details
GetFee
func(poolPath string) (uint32, .uverse.error)GetFee returns the fee tier of the pool. Parameters: - poolPath: Canonical pool path identifying the pool whose fee tier is read. Returns: - uint32: Configured fee tier for the pool. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:9
GetFee details
GetFeeAmountTickSpacings
func() map[uint32]int32GetFeeAmountTickSpacings returns all fee tier to tick spacing mappings. Returns: - map\[uint32]int32: Copy of the configured fee-tier-to-tick-spacing mapping.
- OID
- 07abb6…7fed:10
GetFeeAmountTickSpacings details
GetFeeAmountTickSpacing
func(fee uint32) (spacing int32, err .uverse.error)GetFeeAmountTickSpacing retrieves the mapping between fee amounts and tick spacing. This mapping determines the tick spacing for each supported fee tier. Returns: - feeAmountTickSpacing: a copy of the fee amount to tick-spacing mapping; panics if the KV value cannot be read, has the wrong type, or is nil.
- OID
- 07abb6…7fed:11
GetFeeAmountTickSpacing details
GetFeeGrowthGlobal0X128
func(poolPath string) (string, .uverse.error)GetFeeGrowthGlobal0X128 returns the global fee growth for token0. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - string: Token0 global fee growth, serialized as a base-10 X128 accumulator. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:12
GetFeeGrowthGlobal0X128 details
GetFeeGrowthGlobal1X128
func(poolPath string) (string, .uverse.error)GetFeeGrowthGlobal1X128 returns the global fee growth for token1. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - string: Token1 global fee growth, serialized as a base-10 X128 accumulator. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:13
GetFeeGrowthGlobal1X128 details
GetFeeGrowthGlobalX128
func(poolPath string) (string, string, .uverse.error)GetFeeGrowthGlobalX128 returns the global fee growth for both tokens. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - string: Token0 global fee growth, serialized as a base-10 X128 accumulator. - string: Token1 global fee growth, serialized as a base-10 X128 accumulator. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:14
GetFeeGrowthGlobalX128 details
GetLiquidity
func(poolPath string) (string, .uverse.error)GetLiquidity returns the current liquidity in the pool. Parameters: - poolPath: Canonical pool path identifying the pool whose liquidity is read. Returns: - string: Current pool liquidity, serialized as a base-10 unsigned integer. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:15
GetLiquidity details
GetPoolCreationFee
func() int64GetPoolCreationFee retrieves the pool creation fee amount. Returns: - poolCreationFee: configured pool-creation charge in the chain's smallest currency unit; panics if the KV value cannot be read or has the wrong type.
- OID
- 07abb6…7fed:16
GetPoolCreationFee details
GetPositionFeeGrowthInside0LastX128
func(poolPath string, key string) (string, .uverse.error)GetPositionFeeGrowthInside0LastX128 returns the last recorded fee growth inside for token0. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - string: Position's last token0 fee-growth-inside accumulator, serialized as a base-10 X128 value. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:17
GetPositionFeeGrowthInside0LastX128 details
GetPositionFeeGrowthInside1LastX128
func(poolPath string, key string) (string, .uverse.error)GetPositionFeeGrowthInside1LastX128 returns the last recorded fee growth inside for token1. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - string: Position's last token1 fee-growth-inside accumulator, serialized as a base-10 X128 value. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:18
GetPositionFeeGrowthInside1LastX128 details
GetPositionFeeGrowthInsideLastX128
func(poolPath string, key string) (string, string, .uverse.error)GetPositionFeeGrowthInsideLastX128 returns the last recorded fee growth inside for both tokens. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - string: Position's last token0 fee-growth-inside accumulator, serialized as a base-10 X128 value. - string: Position's last token1 fee-growth-inside accumulator, serialized as a base-10 X128 value. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:19
GetPositionFeeGrowthInsideLastX128 details
GetPoolPositions
func(poolPath string) *v0.ReadOnlyTreeGetPoolPositions 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: Canonical pool path identifying the pool whose positions are read. Returns: - \*rotree.ReadOnlyTree: Read-only tree keyed by position key; nil when the pool does not exist.
- OID
- 07abb6…7fed:20
GetPoolPositions details
GetPositionLiquidity
func(poolPath string, key string) (string, .uverse.error)GetPositionLiquidity returns the liquidity of a position. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - string: Position liquidity, serialized as a base-10 unsigned integer. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:21
GetPositionLiquidity details
GetPositionTokensOwed0
func(poolPath string, key string) (int64, .uverse.error)GetPositionTokensOwed0 returns the amount of token0 owed to a position. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - int64: Amount of token0 owed to the position, in token base units. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:22
GetPositionTokensOwed0 details
GetPositionTokensOwed1
func(poolPath string, key string) (int64, .uverse.error)GetPositionTokensOwed1 returns the amount of token1 owed to a position. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - int64: Amount of token1 owed to the position, in token base units. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:23
GetPositionTokensOwed1 details
GetPositionTokensOwed
func(poolPath string, key string) (int64, int64, .uverse.error)GetPositionTokensOwedInfos returns the amount of tokens owed for both tokens. Parameters: - poolPath: Canonical pool path identifying the pool containing the position. - key: Position key identifying the position within the pool. Returns: - int64: Amount of token0 owed to the position, in token base units. - int64: Amount of token1 owed to the position, in token base units. - error: Non-nil when the pool or position key cannot be found.
- OID
- 07abb6…7fed:24
GetPositionTokensOwed details
GetProtocolFeesToken0
func(poolPath string) (int64, .uverse.error)GetProtocolFeesToken0 returns accumulated protocol fees for token0. Parameters: - poolPath: Canonical pool path identifying the pool whose fees are read. Returns: - int64: Accumulated protocol fee for token0, in token base units. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:25
GetProtocolFeesToken0 details
GetProtocolFeesToken1
func(poolPath string) (int64, .uverse.error)GetProtocolFeesToken1 returns accumulated protocol fees for token1. Parameters: - poolPath: Canonical pool path identifying the pool whose fees are read. Returns: - int64: Accumulated protocol fee for token1, in token base units. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:26
GetProtocolFeesToken1 details
GetProtocolFeesTokens
func(poolPath string) (int64, int64, .uverse.error)GetProtocolFeesTokens returns the accumulated protocol fees for both tokens. Parameters: - poolPath: Canonical pool path identifying the pool whose fees are read. Returns: - int64: Accumulated protocol fee for token0, in token base units. - int64: Accumulated protocol fee for token1, in token base units. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:27
GetProtocolFeesTokens details
GetSlot0FeeProtocol
func(poolPath string) (uint8, .uverse.error)GetSlot0FeeProtocol retrieves the protocol fee denominator(s) for slot0. Returns: - slot0FeeProtocol: packed protocol-fee denominator configuration for slot0; panics if the KV value cannot be read or has the wrong type.
- OID
- 07abb6…7fed:28
GetSlot0FeeProtocol details
GetSlot0SqrtPriceX96
func(poolPath string) (string, .uverse.error)GetSlot0SqrtPriceX96 returns the current sqrt price from slot0. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - string: Current square-root price in Q64.96 fixed-point form, serialized as a base-10 unsigned integer. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:29
GetSlot0SqrtPriceX96 details
GetSlot0Tick
func(poolPath string) (int32, .uverse.error)GetSlot0Tick returns the current tick from slot0. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - int32: Current active tick index stored in slot0. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:30
GetSlot0Tick details
GetSlot0Unlocked
func(poolPath string) (bool, .uverse.error)GetSlot0Unlocked reports whether the pool is currently unlocked. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - bool: True when the pool is not holding its reentrancy lock; false when the pool is currently locked. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:31
GetSlot0Unlocked details
GetSlot0
func(poolPath string) pool.Slot0GetSlot0 returns a safe copy of the pool's slot0 (sqrt price, tick, protocol fee, lock state, and oracle cursor/capacity metadata). The clone happens here, at the proxy boundary, so every implementation version can return its internal Slot0 by value without each one having to remember to defend against callers mutating the shared sqrtPriceX96. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - Slot0: Copy of the pool's slot0 state, including price, tick, protocol fee, lock, and observation metadata; panics if the pool is missing.
- OID
- 07abb6…7fed:32
GetSlot0 details
GetObservationAt
func(poolPath string, index uint16) (pool.Observation, .uverse.error)GetObservationAt returns a safe copy of the observation stored at index. An in-range but uninitialized slot returns the zero observation, matching Uniswap V3's fixed observation-array getter. ref: uniswap v3 IUniswapV3PoolState.observations(uint256 index) Parameters: - poolPath: Canonical pool path identifying the pool containing the observation. - index: Zero-based observation-array index; values at or above the fixed cardinality bound return an error. Returns: - Observation: Observation at index, or the zero observation when the slot is in range but has never been written. - error: Non-nil when the pool is missing or index is out of range.
- OID
- 07abb6…7fed:33
GetObservationAt details
Observe
func(poolPath string, secondsAgos []uint32) ([]int64, []string, .uverse.error)Observe returns the tick and seconds-per-liquidity cumulatives for each requested lookback, matching Uniswap V3's observe(uint32\[] secondsAgos). Parameters: - poolPath: Canonical pool path whose oracle history is queried. - secondsAgos: Lookback intervals in seconds; one cumulative pair is returned for each value, in the same order. Returns: - \[]int64: Tick cumulative values corresponding to each requested lookback. - \[]string: Seconds-per-liquidity cumulative X128 values, serialized as base-10 strings, corresponding to each lookback. - error: Non-nil when pool or observation data cannot be read.
- OID
- 07abb6…7fed:34
Observe details
SnapshotCumulativesInside
func(poolPath string, tickLower int32, tickUpper int32) (int64, string, uint32, .uverse.error)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: Canonical pool path whose oracle snapshot is queried. - tickLower: Lower inclusive tick boundary of the position range. - tickUpper: Upper exclusive tick boundary of the position range; both boundary ticks must be initialized. Returns: - int64: Tick cumulative accrued while the price was inside the range. - string: Seconds-per-liquidity-inside X128 accumulator, serialized as a base-10 string. - uint32: Seconds accrued while the price was inside the range. - error: Non-nil when the pool, observations, or initialized boundaries are unavailable.
- OID
- 07abb6…7fed:35
SnapshotCumulativesInside details
GetTickCumulativeOutside
func(poolPath string, tick int32) (int64, .uverse.error)GetTickCumulativeOutside returns the tick cumulative value outside a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose outside tick cumulative is requested. Returns: - int64: Tick cumulative recorded outside tick. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:36
GetTickCumulativeOutside details
GetTickFeeGrowthOutside0X128
func(poolPath string, tick int32) (string, .uverse.error)GetTickFeeGrowthOutside0X128 returns fee growth outside for token0 at a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose outside fee growth is requested. Returns: - string: Token0 fee growth outside tick, serialized as a base-10 X128 accumulator. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:37
GetTickFeeGrowthOutside0X128 details
GetTickFeeGrowthOutside1X128
func(poolPath string, tick int32) (string, .uverse.error)GetTickFeeGrowthOutside1X128 returns fee growth outside for token1 at a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose outside fee growth is requested. Returns: - string: Token1 fee growth outside tick, serialized as a base-10 X128 accumulator. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:38
GetTickFeeGrowthOutside1X128 details
GetTickFeeGrowthOutsideX128
func(poolPath string, tick int32) (string, string, .uverse.error)GetTickFeeGrowthOutsideX128 returns fee growth outside for both tokens at a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose outside fee growth is requested. Returns: - string: Token0 fee growth outside tick, serialized as a base-10 X128 accumulator. - string: Token1 fee growth outside tick, serialized as a base-10 X128 accumulator. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:39
GetTickFeeGrowthOutsideX128 details
GetTickInitialized
func(poolPath string, tick int32) (bool, .uverse.error)GetTickInitialized returns whether a tick is initialized. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose initialization flag is requested. Returns: - bool: True when the tick has initialized liquidity and outside accumulators. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:40
GetTickInitialized details
GetInitializedTicksInRange
func(poolPath string, tickLower int32, tickUpper int32) ([]int32, .uverse.error)GetInitializedTicksInRange returns initialized ticks within the given range. Parameters: - poolPath: Canonical pool path whose ticks are enumerated. - tickLower: Lower inclusive tick bound for enumeration. - tickUpper: Upper bound for enumeration; ticks are selected through the pool's range iterator. Returns: - \[]int32: Tick indices that are initialized in the requested range. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:41
GetInitializedTicksInRange details
GetTickLiquidityGross
func(poolPath string, tick int32) (string, .uverse.error)GetTickLiquidityGross returns the total liquidity that references a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose gross liquidity is requested. Returns: - string: Gross liquidity referencing the tick, serialized as a base-10 unsigned integer. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:42
GetTickLiquidityGross details
GetTickLiquidityNet
func(poolPath string, tick int32) (string, .uverse.error)GetTickLiquidityNet returns the net liquidity change at a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose net liquidity change is requested. Returns: - string: Signed net liquidity change at the tick, serialized as a base-10 integer. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:43
GetTickLiquidityNet details
GetTickSecondsOutside
func(poolPath string, tick int32) (uint32, .uverse.error)GetTickSecondsOutside returns seconds spent outside a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose outside time is requested. Returns: - uint32: Seconds accumulated outside the tick. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:44
GetTickSecondsOutside details
GetTickSecondsPerLiquidityOutsideX128
func(poolPath string, tick int32) (string, .uverse.error)GetTickSecondsPerLiquidityOutsideX128 returns seconds per liquidity outside a tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose outside accumulator is requested. Returns: - string: Seconds-per-liquidity outside tick in X128 precision, serialized as a base-10 unsigned integer. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:45
GetTickSecondsPerLiquidityOutsideX128 details
GetTickSpacing
func(poolPath string) (int32, .uverse.error)GetTickSpacing returns the tick spacing of the pool. Parameters: - poolPath: Canonical pool path identifying the pool whose spacing is read. Returns: - int32: Tick spacing associated with the pool's fee tier. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:46
GetTickSpacing details
GetToken0Path
func(poolPath string) (string, .uverse.error)GetToken0Path returns the path of token0 in the pool. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - string: Canonical token0 contract path stored by the pool. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:47
GetToken0Path details
GetToken1Path
func(poolPath string) (string, .uverse.error)GetToken1Path returns the path of token1 in the pool. Parameters: - poolPath: Canonical pool path identifying the pool to query. Returns: - string: Canonical token1 contract path stored by the pool. - error: Non-nil when poolPath does not identify an existing pool.
- OID
- 07abb6…7fed:48
GetToken1Path details
GetWithdrawalFee
func() uint64GetWithdrawalFee returns the current withdrawal fee rate. Returns: - uint64: Withdrawal fee rate in basis points; zero means no withdrawal fee is charged.
- OID
- 07abb6…7fed:49
GetWithdrawalFee details
OracleConsult
func(poolPath string, secondsAgo uint32) (int32, string, .uverse.error)OracleConsult returns the arithmetic mean tick and harmonic mean liquidity over a lookback, following Uniswap V3 OracleLibrary's consult convention. Parameters: - poolPath: Canonical pool path whose oracle data is queried. - secondsAgo: Lookback duration in seconds used to compute the time-weighted values. Returns: - int32: Arithmetic mean tick over the requested lookback. - string: Harmonic mean liquidity over the lookback, serialized as a base-10 unsigned integer. - error: Non-nil when the pool or required observation history is unavailable.
- OID
- 07abb6…7fed:50
OracleConsult details
GetTickInfo
func(poolPath string, tick int32) (pool.TickInfo, .uverse.error)GetTickInfo returns the tick info for a given tick. Parameters: - poolPath: Canonical pool path identifying the pool containing the tick. - tick: Tick index whose complete state is requested. Returns: - TickInfo: Safe copy of the requested tick's liquidity and oracle/fee accumulator fields. - error: Non-nil when the pool or tick is not found.
- OID
- 07abb6…7fed:51
GetTickInfo details
GetTickBitmaps
func(poolPath string, wordPos int16) (string, .uverse.error)GetTickBitmaps returns the tick bitmap for a given word position. Parameters: - poolPath: Canonical pool path identifying the pool containing the bitmap. - wordPos: Signed bitmap word position to read. Returns: - string: Bitmap word serialized as a base-10 unsigned integer. - error: Non-nil when the pool or bitmap word is not found.
- OID
- 07abb6…7fed:52
GetTickBitmaps details
GetPendingProtocolFees
func() map[string]int64Returns: - pendingProtocolFees: mapping from token path to pending protocol-fee amount in the chain's smallest currency unit; panics if the KV value cannot be read or has the wrong type.
- OID
- 07abb6…7fed:53
GetPendingProtocolFees details
cloneInt32Slice
func(src []int32) []int32- OID
- 07abb6…7fed:54
cloneInt32Slice details
cloneInt64Slice
func(src []int64) []int64- OID
- 07abb6…7fed:56
cloneInt64Slice details
cloneStringSlice
func(src []string) []string- OID
- 07abb6…7fed:57
cloneStringSlice details
cloneUint32Slice
func(src []uint32) []uint32- OID
- 07abb6…7fed:58
cloneUint32Slice details
cloneFeeAmountTickSpacings
func(src map[uint32]int32) map[uint32]int32- OID
- 07abb6…7fed:59
cloneFeeAmountTickSpacings details
cloneStringInt64Map
func(src map[string]int64) map[string]int64- OID
- 07abb6…7fed:60
cloneStringInt64Map details
NewDefaultPositionInfo
func() pool.PositionInfoNewDefaultPositionInfo returns the zero-accounting position state used for a new pool position. Returns: - info: Position info with zero liquidity, zero fee-growth checkpoints, and no tokens owed.
- OID
- 07abb6…7fed:61
NewDefaultPositionInfo details
Observation
typeValue
pool.Observation
MakeObservation
func(blockTimestamp int64, tickCumulative int64, secondsPerLiquidityCumulativeX128 string, initialized bool) pool.ObservationMakeObservation constructs an observation from its stored oracle accumulators. Parameters: - blockTimestamp: Timestamp associated with the observation. - tickCumulative: Signed cumulative tick at blockTimestamp. - secondsPerLiquidityCumulativeX128: Decimal Q128-scaled cumulative seconds-per-liquidity value. - initialized: Whether this observation slot is initialized and usable. Returns: - observation: Observation containing the supplied timestamp, accumulators, and initialization flag.
- OID
- 07abb6…7fed:62
MakeObservation details
DefaultObservation
func() pool.ObservationDefaultObservation returns the zero, uninitialized observation used for an empty slot. Returns: - observation: Observation with zero timestamp and accumulators and Initialized false.
- OID
- 07abb6…7fed:64
DefaultObservation details
ObservationTree
typeObservationTree is a pool-local oracle ring buffer keyed by index. It owns the B+tree key encoding so oracle code works with uint16 indices.
Value
pool.ObservationTree
NewObservationTree
func() *pool.ObservationTreeNewObservationTree creates an empty pool-local observation tree keyed by uint16 index. Returns: - tree: Initialized observation tree ready for Get, Set, and Has operations.
- OID
- 07abb6…7fed:65
NewObservationTree details
NewObservationsTree
func() *v0.BPTreeNewObservationsTree creates the top-level B+tree that indexes pool observation trees by pool path. Returns: - tree: Empty B+tree suitable for storing pool-path observation trees.
- OID
- 07abb6…7fed:66
NewObservationsTree details
NewPoolObservationsTree
func(currentTime int64) *pool.ObservationTreeNewPoolObservationsTree creates a circular observation buffer with slot zero initialized. Parameters: - currentTime: Timestamp assigned to the initial observation at index zero. Returns: - tree: Observation tree containing an initialized zero-index observation with zero cumulative values.
- OID
- 07abb6…7fed:67
NewPoolObservationsTree details
Pool
typePool describes a single pool's state. A pool is identified with a unique key (token0, token1, fee), where token0 \< token1.
Value
pool.Pool
NewPool
func(token0Path string, token1Path string, fee uint32, sqrtPriceX96 *v1.Uint, tickSpacing int32, tick int32, slot0FeeProtocol uint8) *pool.PoolNewPool constructs a pool with the supplied token pair, fee, price, and tick configuration. Parameters: - token0Path: path of the pool's token0 asset. - token1Path: path of the pool's token1 asset. - fee: fee tier used by swaps. - sqrtPriceX96: initial sqrt(token1/token0) price scaled by 2^96. - tickSpacing: spacing between initialized ticks. - tick: initial current tick. - slot0FeeProtocol: packed protocol-fee denominator configuration for slot0. Returns: - \*Pool: initialized pool with empty balances, fee growth, ticks, bitmaps, and positions.
- OID
- 07abb6…7fed:68
NewPool details
NewPoolsTree
func() *v0.BPTreeNewPoolsTree creates the BPTree used to store pools by pool path. Returns: - \*bptree.BPTree: empty pool storage tree with fanout 32.
- OID
- 07abb6…7fed:70
NewPoolsTree details
NewPoolTicksTree
func() *v0.BPTreeNewPoolTicksTree creates a BPTree for storing pool tick info (fanout 32), owned by the pool domain realm so leaf-slot writes are not readonly tainted. Returns: - \*bptree.BPTree: empty tick storage tree with fanout 32.
- OID
- 07abb6…7fed:71
NewPoolTicksTree details
NewPoolPositionsTree
func() *v0.BPTreeNewPoolPositionsTree creates a BPTree for storing pool position info (fanout 16), owned by the pool domain realm so leaf-slot writes are not readonly tainted. Returns: - \*bptree.BPTree: empty position storage tree with fanout 16.
- OID
- 07abb6…7fed:72
NewPoolPositionsTree details
TokenPair
typeValue
pool.TokenPair
NewTokenPair
func() pool.TokenPairNewTokenPair creates a token-pair balance value initialized to zero. Returns: - TokenPair: zero token0 and token1 balances.
- OID
- 07abb6…7fed:73
NewTokenPair details
Slot0
typeSlot0 mirrors Uniswap V3's slot0(): current price/tick/protocol-fee/lock state and the oracle cursor/capacity metadata.
Value
pool.Slot0
NewSlot0
func(sqrtPriceX96 *v1.Uint, tick int32, feeProtocol uint8, unlocked bool) pool.Slot0NewSlot0 constructs slot0 with the supplied price, tick, protocol fee, and lock state. Observation metadata starts with index zero and cardinality one. Parameters: - sqrtPriceX96: initial sqrt(token1/token0) price scaled by 2^96. - tick: initial current pool tick. - feeProtocol: packed token0/token1 protocol-fee denominator configuration. - unlocked: initial reentrancy-lock state. Returns: - Slot0: initialized slot0 value with one observation slot.
- OID
- 07abb6…7fed:74
NewSlot0 details
TickInfo
typeTickInfo stores information about a specific tick in the pool. TIcks represent discrete price points that can be used as boundaries for positions.
Value
pool.TickInfo
NewTickInfo
func() pool.TickInfoNewTickInfo creates an uninitialized tick state with zero accumulators. Returns: - TickInfo: default tick state with all numeric fields zero and Initialized false.
- OID
- 07abb6…7fed:75
NewTickInfo details
PositionInfo
typePositionInfo stores aggregate liquidity, fee-growth checkpoints, and tokens owed for one pool-scoped lower/upper tick key.
Value
pool.PositionInfo
NewPositionInfo
func() pool.PositionInfoNewPositionInfo creates a zeroed position state for a tick range. Returns: - PositionInfo: position with zero liquidity, fee-growth checkpoints, and owed tokens.
- OID
- 07abb6…7fed:76
NewPositionInfo details
NewDefaultFeeAmountTickSpacing
func() map[uint32]int32NewDefaultFeeAmountTickSpacing returns the default tick spacing for each supported fee tier. Returns: - map\[uint32]int32: fee-tier to tick-spacing mapping for 100, 500, 3000, and 10000 tiers.
- OID
- 07abb6…7fed:77
NewDefaultFeeAmountTickSpacing details
CreatePool
func(token0Path string, token1Path string, fee uint32, sqrtPriceX96 string)CreatePool creates a new liquidity pool for a token pair. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Token contract path supplied for token0; the pool orders the pair canonically rather than preserving the supplied order. - token1Path: Token contract path supplied for token1; must form a distinct registered pair with token0Path. - fee: Fee tier for the pool; determines its tick spacing and swap fee. - sqrtPriceX96: Initial square-root price in Q64.96 fixed-point form; it is inverted when the supplied token order is reversed and must be in bounds. Halt check: reverts while the Pool halt scope is active.
- OID
- 07abb6…7fed:78
CreatePool details
SetPoolCreationFee
func(fee int64)SetPoolCreationFee stores the pool creation fee amount. Parameters: - \_: leading realm-call discriminator; callers pass 0. - rlm: propagated realm context; it must be the current realm or the method returns ErrSpoofedRealm before writing. - poolCreationFee: pool-creation charge in the chain's smallest currency unit. Returns: - err: nil when the fee is stored; ErrSpoofedRealm for a non-current realm, or the underlying KV-store write error.
- OID
- 07abb6…7fed:80
SetPoolCreationFee details
IncreaseObservationCardinalityNext
func(token0Path string, token1Path string, fee uint32, cardinalityNext uint16)IncreaseObservationCardinalityNext increases the observation cardinality for a pool. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - cardinalityNext: Requested maximum number of oracle observations retained for the pool. Halt check: reverts while the Pool halt scope is active.
- OID
- 07abb6…7fed:81
IncreaseObservationCardinalityNext details
Mint
func(token0Path string, token1Path string, fee uint32, tickLower int32, tickUpper int32, liquidityAmount string, positionCaller .uverse.address) (string, string)Mint adds liquidity to a position. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - tickLower: Lower inclusive tick boundary of the position range. - tickUpper: Upper exclusive tick boundary of the position range. - liquidityAmount: Decimal liquidity amount to add to the position. - positionCaller: Position-contract address whose position receives the liquidity. Returns: - amount0: Token0 amount required for the liquidity addition, as a decimal string. - amount1: Token1 amount required for the liquidity addition, as a decimal string. Halt check: reverts while the Pool halt scope is active.
- OID
- 07abb6…7fed:82
Mint details
Burn
func(token0Path string, token1Path string, fee uint32, tickLower int32, tickUpper int32, liquidityAmount string, positionCaller .uverse.address) (string, string)Burn removes liquidity from a position. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - tickLower: Lower inclusive tick boundary of the position range. - tickUpper: Upper exclusive tick boundary of the position range. - liquidityAmount: Decimal liquidity amount to remove from the position. - positionCaller: Position-contract address whose position is decreased. Returns: - amount0: Token0 principal credited to the position, as a decimal string; the pool operation leaves it owed until a subsequent collection. - amount1: Token1 principal credited to the position, as a decimal string; the pool operation leaves it owed until a subsequent collection. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 07abb6…7fed:83
Burn details
CollectSwapFee
func(token0Path string, token1Path string, fee uint32, recipient .uverse.address, tickLower int32, tickUpper int32, amount0Requested string, amount1Requested string) (amount0 string, amount1 string, fee0 string, fee1 string)CollectSwapFee pays accrued swap fees for a position out to recipient, net of the withdrawal fee. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - recipient: Non-zero address receiving the collected token amounts after withdrawal-fee deduction. - tickLower: Lower inclusive tick boundary of the position range. - tickUpper: Upper exclusive tick boundary of the position range. - amount0Requested: Decimal token0 amount requested; the configured maximum value requests all token0 fees owed. - amount1Requested: Decimal token1 amount requested; the configured maximum value requests all token1 fees owed. Returns: - amount0: Collected token0 amount before withdrawal-fee deduction, as a decimal string. - amount1: Collected token1 amount before withdrawal-fee deduction, as a decimal string. - fee0: Withdrawal fee withheld from token0, as a decimal string. - fee1: Withdrawal fee withheld from token1, as a decimal string. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 07abb6…7fed:84
CollectSwapFee details
Collect
func(token0Path string, token1Path string, fee uint32, recipient .uverse.address, tickLower int32, tickUpper int32, amount0Requested string, amount1Requested string) (string, string)Collect pays tokens owed to a position out to recipient in full. No withdrawal fee is charged on this path; see CollectSwapFee for the fee-bearing path. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - recipient: Non-zero address receiving the owed token amounts. - tickLower: Lower inclusive tick boundary of the position range. - tickUpper: Upper exclusive tick boundary of the position range. - amount0Requested: Decimal token0 amount requested from the position's accrued principal. - amount1Requested: Decimal token1 amount requested from the position's accrued principal. Returns: - amount0: Token0 principal transferred to recipient, as a decimal string. - amount1: Token1 principal transferred to recipient, as a decimal string. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 07abb6…7fed:85
Collect details
SetWithdrawalFee
func(fee uint64)SetWithdrawalFee sets the withdrawal fee rate. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - fee: Withdrawal fee in basis points; zero disables the fee. Halt check: reverts while the Pool halt scope is active.
- OID
- 07abb6…7fed:86
SetWithdrawalFee details
Swap
func(token0Path string, token1Path string, fee uint32, recipient .uverse.address, zeroForOne bool, amountSpecified string, sqrtPriceLimitX96 string, swapCallback func(...)) (string, string)Swap executes a token swap in the pool. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - recipient: Address receiving output tokens. - zeroForOne: True to sell token0 for token1; false to sell token1 for token0. - amountSpecified: Decimal signed amount; positive requests exact input and negative requests exact output. - sqrtPriceLimitX96: Price boundary in Q64.96 fixed-point form at which the swap must stop. - swapCallback: Callback invoked with the current realm, signed token deltas, and a callback marker; it must settle the input token and return a non-nil error to abort settlement. Returns: - amount0: Signed token0 delta for the swap, as a decimal string. - amount1: Signed token1 delta for the swap, as a decimal string. Halt check: reverts while the Pool halt scope is active.
- OID
- 07abb6…7fed:87
Swap details
DrySwap
func(token0Path string, token1Path string, fee uint32, zeroForOne bool, amountSpecified string, sqrtPriceLimitX96 string) (string, string, .uverse.error)DrySwap simulates a swap without executing it, returning the expected output. This is a read-only operation that does not modify pool state. Used by router for multi-hop swap simulations and by clients for price quotes. Parameters: - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - zeroForOne: True to sell token0 for token1; false to sell token1 for token0. - amountSpecified: Decimal signed amount; positive requests exact input and negative requests exact output. - sqrtPriceLimitX96: Price boundary in Q64.96 fixed-point form at which the simulation must stop. Returns: - amount0: Simulated signed token0 delta, as a decimal string; "0" on an unsuccessful simulation. - amount1: Simulated signed token1 delta, as a decimal string; "0" on an unsuccessful simulation. - error: Nil when the simulation succeeds; non-nil when validation, computation, or pool-balance checks fail.
- OID
- 07abb6…7fed:88
DrySwap details
SetSwapEndHook
func(hook func(...))SetSwapEndHook stores the swap end hook function. Parameters: - \_: leading realm-call discriminator; callers pass 0. - rlm: propagated realm context; it must be the current realm or the method returns ErrSpoofedRealm before writing. - swapEndHook: callback receiving the current realm and pool path at swap end and returning any hook error. Returns: - err: nil when the callback is stored; ErrSpoofedRealm for a non-current realm, or the underlying KV-store write error.
- OID
- 07abb6…7fed:89
SetSwapEndHook details
SetSwapStartHook
func(hook func(...))SetSwapStartHook stores the swap start hook function. Parameters: - \_: leading realm-call discriminator; callers pass 0. - rlm: propagated realm context; it must be the current realm or the method returns ErrSpoofedRealm before writing. - swapStartHook: callback receiving the current realm, pool path, and block timestamp when a swap starts. Returns: - err: nil when the callback is stored; ErrSpoofedRealm for a non-current realm, or the underlying KV-store write error.
- OID
- 07abb6…7fed:90
SetSwapStartHook details
SetTickCrossHook
func(hook func(...))SetTickCrossHook stores the tick cross hook function. Parameters: - \_: leading realm-call discriminator; callers pass 0. - rlm: propagated realm context; it must be the current realm or the method returns ErrSpoofedRealm before writing. - tickCrossHook: callback receiving the current realm, pool path, crossed tick ID, swap direction, and block timestamp. Returns: - err: nil when the callback is stored; ErrSpoofedRealm for a non-current realm, or the underlying KV-store write error.
- OID
- 07abb6…7fed:91
SetTickCrossHook details
CollectProtocol
func(token0Path string, token1Path string, fee uint32, recipient .uverse.address, amount0Requested string, amount1Requested string) (string, string)CollectProtocol collects protocol fees from a pool. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - token0Path: Path of the first token in the pool pair. - token1Path: Path of the second token in the pool pair. - fee: Fee tier identifying the pool. - recipient: Address receiving the collected protocol fees. - amount0Requested: Decimal token0 protocol-fee amount requested; collection is capped at the available amount. - amount1Requested: Decimal token1 protocol-fee amount requested; collection is capped at the available amount. Returns: - amount0: Token0 protocol fee transferred to recipient, as a decimal string. - amount1: Token1 protocol fee transferred to recipient, as a decimal string. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 07abb6…7fed:92
CollectProtocol details
SetFeeProtocol
func(feeProtocol0 uint8, feeProtocol1 uint8)SetFeeProtocol updates the packed slot0 protocol-fee denominators. Parameters: - feeProtocol: packed token0/token1 protocol-fee denominator configuration.
- OID
- 07abb6…7fed:93
SetFeeProtocol details
Render
func(path string) stringRender delegates web rendering to the active implementation.
- OID
- 07abb6…7fed:94
Render details
domainPath
stringValue
"gno.land/r/gnoswap/pool"
currentAddress
.uverse.addressValue
<gnolang.StringValue>
kvStore
*v1.kvStore- OID
- 07abb6…7fed:121
kvStore details
versionManager
*v1.versionManager- OID
- 07abb6…7fed:125
versionManager details
implementation
*v1.poolV1- OID
- 0fe078…3476:151
implementation details
init.101
func()- OID
- 07abb6…7fed:101
init.101 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...}- OID
- 07abb6…7fed:103
initializeDomainStore details
getImplementation
func() pool.IPoolgetImplementation returns the currently active pool implementation. This function is used by all proxy functions to route calls to the active implementation. If no implementation is set, it panics to prevent invalid state.
- OID
- 07abb6…7fed:104
getImplementation details
updateImplementation
func() .uverse.error- OID
- 07abb6…7fed:105
updateImplementation details
StoreKey
typeStoreKey defines the keys used for storing pool data in the KV store. These keys are prefixed with the domain address to ensure namespace isolation.
Value
pool.StoreKey
StoreKeyPools
pool.StoreKey// Map containing all pools
Value
<gnolang.StringValue>
StoreKeyObservations
pool.StoreKey// poolPath -> observation B+tree
Value
<gnolang.StringValue>
StoreKeyFeeAmountTickSpacing
pool.StoreKey// Fee tier to tick spacing mapping
Value
<gnolang.StringValue>
StoreKeySlot0FeeProtocol
pool.StoreKey// Protocol fee denominator(s)
Value
<gnolang.StringValue>
StoreKeyPoolCreationFee
pool.StoreKey// Pool creation fee amount
Value
<gnolang.StringValue>
StoreKeyPendingProtocolFees
pool.StoreKey// tokenPath -> amount held locally for protocol\_fee
Value
<gnolang.StringValue>
StoreKeyWithdrawalFeeBPS
pool.StoreKey// Withdrawal fee in basis points
Value
<gnolang.StringValue>
StoreKeyUnlocked
pool.StoreKey// Global pool reentrancy lock
Value
<gnolang.StringValue>
StoreKeySwapStartHook
pool.StoreKey// Swap start hook function
Value
<gnolang.StringValue>
StoreKeySwapEndHook
pool.StoreKey// Swap end hook function
Value
<gnolang.StringValue>
StoreKeyTickCrossHook
pool.StoreKey// Tick cross hook function
Value
<gnolang.StringValue>
poolStore
typepoolStore implements the IPoolStore interface for pool domain storage. It provides type-safe access to pool data stored in the underlying KV store.
Value
pool.poolStore
NewPoolStore
func(kvStore v1.KVStore) pool.IPoolStoreNewPoolStore creates a new pool store instance with the provided KV store. This function is used by the upgrade system to create storage instances for each implementation. Parameters: - kvStore: KV store used to persist and retrieve pool-domain state. Returns: - poolStore: an IPoolStore implementation backed by kvStore.
- OID
- 07abb6…7fed:106
NewPoolStore details
IPool
typeIPool interface defines all public methods that must be implemented by pool contract versions. This interface serves as the contract between the proxy layer and implementation versions, ensuring that all versions (v1, v2, v3, etc.) maintain the same public API. This design enables seamless upgrades while maintaining backwards compatibility. When upgrading from v1 to v2, the proxy simply switches the implementation pointer without changing the public interface, ensuring zero downtime and no breaking changes.
Value
pool.IPool
IPoolManager
typeIPoolManager interface defines pool management operations. These methods handle pool creation and fee configuration.
Value
pool.IPoolManager
IPoolPosition
typeIPoolPosition interface defines position management operations. These methods handle liquidity provision and position management.
Value
pool.IPoolPosition
IPoolSwap
typeIPoolSwap interface defines swap and protocol fee operations. These methods handle token swaps and protocol fee management.
Value
pool.IPoolSwap
IPoolOracle
typeIPoolOracle defines the pool's Uniswap V3-aligned oracle surface. Its public methods mirror the relevant Uniswap V3 pool-state, derived-state, and action specifications, adapted for GnoSwap's singleton pool realm: every operation identifies its pool with poolPath, and uint values cross the public boundary using GnoSwap types or decimal strings rather than the EVM ABI. ref: [https://github.com/Uniswap/v3-core/blob/e3589b192d0be27e100cd0daaf6c97204fdb1899/contracts/interfaces/pool/IUniswapV3PoolState.sol#L21-L32](https://github.com/Uniswap/v3-core/blob/e3589b192d0be27e100cd0daaf6c97204fdb1899/contracts/interfaces/pool/IUniswapV3PoolState.sol#L21-L32) ref: [https://github.com/Uniswap/v3-core/blob/e3589b192d0be27e100cd0daaf6c97204fdb1899/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol#L18-L39](https://github.com/Uniswap/v3-core/blob/e3589b192d0be27e100cd0daaf6c97204fdb1899/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol#L18-L39)
Value
pool.IPoolOracle
IPoolGetter
typeIPoolGetter interface defines data retrieval operations. These methods provide read-only access to pool state and data.
Value
pool.IPoolGetter
IPoolStore
typeIPoolStore interface defines the storage abstraction for pool data. This interface provides a clean separation between business logic and storage, allowing different implementations to use the same storage interface. All pool implementations (v1, v2, etc.) use this interface to access and modify pool state, ensuring data consistency across versions.
Value
pool.IPoolStore
CallbackMarker
typeValue
pool.CallbackMarker
NewCallbackMarker
func() *pool.CallbackMarkerNewCallbackMarker allocates a CallbackMarker in the pool realm. Construction must happen here because /r/-declared types can only be allocated in their owning realm (interrealm v2 checkConstructionTime). Callers in other realms (e.g. pool/v1 impl) borrow into pool via borrow rule #1 (function defined in /r/ package). Returns: - marker: New marker value allocated in the pool realm for swap-callback validation.
- OID
- 07abb6…7fed:108
NewCallbackMarker details
RegisterInitializer
func(initializer func(...))RegisterInitializer registers a new pool implementation version. This function is called by each version (v1, v2, etc.) during initialization to register their implementation with the proxy system. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - initializer: Version factory receiving the forwarded discriminator, current realm, and shared IPoolStore; it returns the implementation instance to register and later activate. Security: Only contracts within the domain path can register initializers. Each package path can only register once to prevent duplicate registrations.
- OID
- 07abb6…7fed:110
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl switches the active pool implementation to a different version. This function allows seamless upgrades from one version to another without data migration or downtime. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - packagePath: Full package path of a version previously registered for this pool domain. Security: Only admin or governance can perform upgrades. The new implementation must have been previously registered via RegisterInitializer. The pool must not be locked (see assertPoolUnlocked).
- OID
- 07abb6…7fed:112
UpgradeImpl details
assertPoolUnlocked
func()assertPoolUnlocked panics if the pool's reentrancy lock is currently held. It mirrors poolV1.assertPoolUnlocked (r/gnoswap/pool/v1/lock.gno): read-only, so it is safe to call before the admin/governance authorization check too. HasUnlocked() is false until a swap has ever run, so pools with no swap history are unaffected.
- OID
- 07abb6…7fed:113
assertPoolUnlocked details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation. Returns: - packagePath: Full package path of the active implementation; empty before any version has been registered.
- OID
- 07abb6…7fed:114
GetImplementationPackagePath details
MAX_TICK
int32Value
887272
GetPoolPath
func(token0Path string, token1Path string, fee uint32) stringGetPoolPath generates a unique pool path string based on the token paths and fee tier. Parameters: - token0Path: path of the first token contract; it is reordered with token1Path when needed to form canonical pool order. - token1Path: path of the second token contract; it is reordered with token0Path when it sorts earlier. - fee: pool fee tier encoded as its decimal uint32 value in the path. Returns: - poolPath: canonical token0:token1:fee identifier with token paths in lexicographical order.
- OID
- 07abb6…7fed:115
GetPoolPath details
EncodeTickKey
func(tick int32) stringEncodeTickKey encodes a tick as a fixed-width 4-byte key whose lexicographic order matches the signed numeric order. Parameters: - tick: signed tick index to encode. Returns: - key: fixed-width ordered key whose lexicographical ordering matches the signed numeric ordering of tick.
- OID
- 07abb6…7fed:117
EncodeTickKey details
EncodePositionKey
func(tickLower int32, tickUpper int32) stringEncodePositionKey encodes a position range as two ordered tick keys. Parameters: - tickLower: lower signed tick index of the position range. - tickUpper: upper signed tick index of the position range. Returns: - key: concatenation of the ordered encodings of tickLower and tickUpper.
- OID
- 07abb6…7fed:118
EncodePositionKey details
DecodeTickKey
func(key string) int32DecodeTickKey decodes a fixed-width ordered tick key. Parameters: - key: fixed-width ordered tick key produced by EncodeTickKey. Returns: - tick: signed tick index decoded from key.
- OID
- 07abb6…7fed:119