GetPoolCount
func() intGetPoolCount returns the total number of pools.
- OID
- 07abb6…7fed:3
GetPoolCount details
GetPoolPaths
func(offset int, count int) []stringGetPoolPaths returns a paginated list of pool paths.
- OID
- 07abb6…7fed:5
GetPoolPaths details
ExistsPoolPath
func(poolPath string) boolExistsPoolPath checks if a pool exists at the given path.
- OID
- 07abb6…7fed:6
ExistsPoolPath details
GetBalances
func(poolPath string) (int64, int64)GetBalances returns the balances of the pool.
- OID
- 07abb6…7fed:7
GetBalances details
GetBalanceToken0
func(poolPath string) int64GetBalanceToken0 returns the balance of token0 in the pool.
- OID
- 07abb6…7fed:8
GetBalanceToken0 details
GetBalanceToken1
func(poolPath string) int64GetBalanceToken1 returns the balance of token1 in the pool.
- OID
- 07abb6…7fed:9
GetBalanceToken1 details
GetFee
func(poolPath string) uint32GetFee returns the fee tier of the pool.
- OID
- 07abb6…7fed:10
GetFee details
GetFeeAmountTickSpacings
func() map[uint32]int32GetFeeAmountTickSpacings returns all fee tier to tick spacing mappings.
- OID
- 07abb6…7fed:11
GetFeeAmountTickSpacings details
GetFeeAmountTickSpacing
func(fee uint32) spacing int32GetFeeAmountTickSpacing retrieves the mapping between fee amounts and tick spacing. This mapping determines the tick spacing for each supported fee tier.
- OID
- 07abb6…7fed:12
GetFeeAmountTickSpacing details
GetFeeGrowthGlobal0X128
func(poolPath string) stringGetFeeGrowthGlobal0X128 returns the global fee growth for token0.
- OID
- 07abb6…7fed:13
GetFeeGrowthGlobal0X128 details
GetFeeGrowthGlobal1X128
func(poolPath string) stringGetFeeGrowthGlobal1X128 returns the global fee growth for token1.
- OID
- 07abb6…7fed:14
GetFeeGrowthGlobal1X128 details
GetFeeGrowthGlobalX128
func(poolPath string) (string, string)GetFeeGrowthGlobalX128 returns the global fee growth for both tokens.
- OID
- 07abb6…7fed:15
GetFeeGrowthGlobalX128 details
GetLiquidity
func(poolPath string) stringGetLiquidity returns the current liquidity in the pool.
- OID
- 07abb6…7fed:16
GetLiquidity details
GetObservation
func(poolPath string, secondsAgo int64) (tickCumulative int64, liquidityCumulative string, secondsPerLiquidityCumulativeX128 string, blockTimestamp int64)GetObservation returns observation data for calculating time-weighted averages.
- OID
- 07abb6…7fed:17
GetObservation details
GetPoolCreationFee
func() int64GetPoolCreationFee retrieves the pool creation fee amount.
- OID
- 07abb6…7fed:18
GetPoolCreationFee details
GetPositionFeeGrowthInside0LastX128
func(poolPath string, key string) stringGetPositionFeeGrowthInside0LastX128 returns the last recorded fee growth inside for token0.
- OID
- 07abb6…7fed:19
GetPositionFeeGrowthInside0LastX128 details
GetPositionFeeGrowthInside1LastX128
func(poolPath string, key string) stringGetPositionFeeGrowthInside1LastX128 returns the last recorded fee growth inside for token1.
- OID
- 07abb6…7fed:20
GetPositionFeeGrowthInside1LastX128 details
GetPositionFeeGrowthInsideLastX128
func(poolPath string, key string) (string, string)GetPositionFeeGrowthInsideLastX128 returns the last recorded fee growth inside for both tokens.
- OID
- 07abb6…7fed:21
GetPositionFeeGrowthInsideLastX128 details
GetPoolPositionCount
func(poolPath string) intGetPoolPositionCount returns the number of positions in a pool.
- OID
- 07abb6…7fed:22
GetPoolPositionCount details
GetPoolPositionKeys
func(poolPath string, offset int, count int) []stringGetPoolPositionKeys returns a paginated list of position keys in a pool.
- OID
- 07abb6…7fed:23
GetPoolPositionKeys details
GetPositionLiquidity
func(poolPath string, key string) stringGetPositionLiquidity returns the liquidity of a position.
- OID
- 07abb6…7fed:24
GetPositionLiquidity details
GetPositionTokensOwed0
func(poolPath string, key string) int64GetPositionTokensOwed0 returns the amount of token0 owed to a position.
- OID
- 07abb6…7fed:25
GetPositionTokensOwed0 details
GetPositionTokensOwed1
func(poolPath string, key string) int64GetPositionTokensOwed1 returns the amount of token1 owed to a position.
- OID
- 07abb6…7fed:26
GetPositionTokensOwed1 details
GetPositionTokensOwed
func(poolPath string, key string) (int64, int64)GetPositionTokensOwedInfos returns the amount of tokens owed for both tokens.
- OID
- 07abb6…7fed:27
GetPositionTokensOwed details
GetProtocolFeesToken0
func(poolPath string) int64GetProtocolFeesToken0 returns accumulated protocol fees for token0.
- OID
- 07abb6…7fed:28
GetProtocolFeesToken0 details
GetProtocolFeesToken1
func(poolPath string) int64GetProtocolFeesToken1 returns accumulated protocol fees for token1.
- OID
- 07abb6…7fed:29
GetProtocolFeesToken1 details
GetProtocolFeesTokens
func(poolPath string) (int64, int64)GetProtocolFeesTokens returns the accumulated protocol fees for both tokens.
- OID
- 07abb6…7fed:30
GetProtocolFeesTokens details
GetSlot0FeeProtocol
func(poolPath string) uint8GetSlot0FeeProtocol retrieves the protocol fee percentage for slot0.
- OID
- 07abb6…7fed:31
GetSlot0FeeProtocol details
GetSlot0SqrtPriceX96
func(poolPath string) stringGetSlot0SqrtPriceX96 returns the current sqrt price from slot0.
- OID
- 07abb6…7fed:32
GetSlot0SqrtPriceX96 details
GetSlot0Tick
func(poolPath string) int32GetSlot0Tick returns the current tick from slot0.
- OID
- 07abb6…7fed:33
GetSlot0Tick details
GetSlot0Unlocked
func(poolPath string) boolGetSlot0Unlocked returns the locked status from slot0.
- OID
- 07abb6…7fed:34
GetSlot0Unlocked details
GetTickCumulativeOutside
func(poolPath string, tick int32) int64GetTickCumulativeOutside returns the tick cumulative value outside a tick.
- OID
- 07abb6…7fed:35
GetTickCumulativeOutside details
GetTickFeeGrowthOutside0X128
func(poolPath string, tick int32) stringGetTickFeeGrowthOutside0X128 returns fee growth outside for token0 at a tick.
- OID
- 07abb6…7fed:36
GetTickFeeGrowthOutside0X128 details
GetTickFeeGrowthOutside1X128
func(poolPath string, tick int32) stringGetTickFeeGrowthOutside1X128 returns fee growth outside for token1 at a tick.
- OID
- 07abb6…7fed:37
GetTickFeeGrowthOutside1X128 details
GetTickFeeGrowthOutsideX128
func(poolPath string, tick int32) (string, string)GetTickFeeGrowthOutsideX128 returns fee growth outside for both tokens at a tick.
- OID
- 07abb6…7fed:38
GetTickFeeGrowthOutsideX128 details
GetTickInitialized
func(poolPath string, tick int32) boolGetTickInitialized returns whether a tick is initialized.
- OID
- 07abb6…7fed:39
GetTickInitialized details
GetInitializedTicksInRange
func(poolPath string, tickLower int32, tickUpper int32) []int32GetInitializedTicksInRange returns initialized ticks within the given range.
- OID
- 07abb6…7fed:40
GetInitializedTicksInRange details
GetTickLiquidityGross
func(poolPath string, tick int32) stringGetTickLiquidityGross returns the total liquidity that references a tick.
- OID
- 07abb6…7fed:41
GetTickLiquidityGross details
GetTickLiquidityNet
func(poolPath string, tick int32) stringGetTickLiquidityNet returns the net liquidity change at a tick.
- OID
- 07abb6…7fed:42
GetTickLiquidityNet details
GetTickSecondsOutside
func(poolPath string, tick int32) uint32GetTickSecondsOutside returns seconds spent outside a tick.
- OID
- 07abb6…7fed:43
GetTickSecondsOutside details
GetTickSecondsPerLiquidityOutsideX128
func(poolPath string, tick int32) stringGetTickSecondsPerLiquidityOutsideX128 returns seconds per liquidity outside a tick.
- OID
- 07abb6…7fed:44
GetTickSecondsPerLiquidityOutsideX128 details
GetTickSpacing
func(poolPath string) int32GetTickSpacing returns the tick spacing of the pool.
- OID
- 07abb6…7fed:45
GetTickSpacing details
GetToken0Path
func(poolPath string) stringGetToken0Path returns the path of token0 in the pool.
- OID
- 07abb6…7fed:46
GetToken0Path details
GetToken1Path
func(poolPath string) stringGetToken1Path returns the path of token1 in the pool.
- OID
- 07abb6…7fed:47
GetToken1Path details
GetWithdrawalFee
func() uint64GetWithdrawalFee returns the current withdrawal fee rate.
- OID
- 07abb6…7fed:48
GetWithdrawalFee details
GetTWAP
func(poolPath string, secondsAgo uint32) (int32, string, .uverse.error)GetTWAP returns the time-weighted average price for a pool. Returns arithmetic mean tick and harmonic mean liquidity over the time period.
- OID
- 07abb6…7fed:49
GetTWAP details
GetPool
func(token0Path string, token1Path string, fee uint32) (*pool.Pool, .uverse.error)GetPool returns a copy of the pool for the given token pair and fee tier.
- OID
- 07abb6…7fed:50
GetPool details
GetTickInfo
func(poolPath string, tick int32) (pool.TickInfo, .uverse.error)GetTickInfo returns the tick info for a given tick.
- 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.
- OID
- 07abb6…7fed:52
GetTickBitmaps details
GetPosition
func(poolPath string, key string) (pool.PositionInfo, .uverse.error)GetPosition returns the position info for a given key.
- OID
- 07abb6…7fed:53
GetPosition details
GetObservationState
func(poolPath string) (*pool.ObservationState, .uverse.error)GetObservationState returns the observation state for a given pool path.
- OID
- 07abb6…7fed:54
GetObservationState details
cloneStringSlice
func(src []string) []string- OID
- 07abb6…7fed:55
cloneStringSlice details
cloneInt32Slice
func(src []int32) []int32- OID
- 07abb6…7fed:57
cloneInt32Slice details
cloneFeeAmountTickSpacings
func(src map[uint32]int32) map[uint32]int32- OID
- 07abb6…7fed:58
cloneFeeAmountTickSpacings details
clonePositionInfo
func(src pool.PositionInfo) pool.PositionInfo- OID
- 07abb6…7fed:59
clonePositionInfo details
cloneObservationState
func(src *pool.ObservationState) *pool.ObservationState- OID
- 07abb6…7fed:60
cloneObservationState details
clonePool
func(src *pool.Pool) *pool.Pool- OID
- 07abb6…7fed:61
clonePool details
clonePoolTicks
func(src *v0.BPTree) *v0.BPTree- OID
- 07abb6…7fed:62
clonePoolTicks details
clonePoolTickBitmaps
func(src map[int16]string) map[int16]string- OID
- 07abb6…7fed:63
clonePoolTickBitmaps details
cloneStringInt64Map
func(src map[string]int64) map[string]int64- OID
- 07abb6…7fed:64
cloneStringInt64Map details
NewDefaultPositionInfo
func() pool.PositionInfo- OID
- 07abb6…7fed:65
NewDefaultPositionInfo details
ObservationState
typeObservationState manages the oracle's historical data
Value
pool.ObservationState
Observation
typeValue
pool.Observation
NewObservationState
func(currentTime int64) *pool.ObservationState- OID
- 07abb6…7fed:66
NewObservationState details
NewObservation
func(blockTimestamp int64, tickCumulative int64, liquidityCumulative string, secondsPerLiquidityCumulativeX128 string, initialized bool) *pool.Observation- OID
- 07abb6…7fed:68
NewObservation details
NewDefaultObservation
func() *pool.Observation- OID
- 07abb6…7fed:69
NewDefaultObservation details
Pool
typetype Pool describes a single Pool's state A pool is identificed with a unique key (token0, token1, fee), where token0 \< token1
Value
pool.Pool
NewPool
func(token0Path string, token1Path string, fee uint32, sqrtPriceX96 *uint256.Uint, tickSpacing int32, tick int32, slot0FeeProtocol uint8) *pool.Pool- OID
- 07abb6…7fed:70
NewPool details
NewPoolsTree
func() *v0.BPTree- OID
- 07abb6…7fed:72
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.
- OID
- 07abb6…7fed:73
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.
- OID
- 07abb6…7fed:74
NewPoolPositionsTree details
TokenPair
typeValue
pool.TokenPair
NewTokenPair
func() pool.TokenPair- OID
- 07abb6…7fed:75
NewTokenPair details
Slot0
typeValue
pool.Slot0
NewSlot0
func(sqrtPriceX96 *uint256.Uint, tick int32, feeProtocol uint8, unlocked bool) pool.Slot0- OID
- 07abb6…7fed:76
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.TickInfo- OID
- 07abb6…7fed:77
NewTickInfo details
PositionInfo
typePositionInfo stores liquidity and fee state for a position. Liquidity and fee-growth fields are stored as decimal strings to reduce storage cost, while transferable owed amounts stay as int64 for token transfer boundaries.
Value
pool.PositionInfo
NewPositionInfo
func() pool.PositionInfo- OID
- 07abb6…7fed:78
NewPositionInfo details
NewDefaultFeeAmountTickSpacing
func() map[uint32]int32- OID
- 07abb6…7fed:79
NewDefaultFeeAmountTickSpacing details
CreatePool
func(token0Path string, token1Path string, fee uint32, sqrtPriceX96 string)CreatePool creates a new liquidity pool for a token pair. Parameters: - token0Path: path of the first token - token1Path: path of the second token - fee: pool fee tier - sqrtPriceX96: initial sqrt price (Q64.96 format)
- OID
- 07abb6…7fed:80
CreatePool details
SetPoolCreationFee
func(fee int64)SetPoolCreationFee stores the pool creation fee amount.
- OID
- 07abb6…7fed:82
SetPoolCreationFee details
IncreaseObservationCardinalityNext
func(token0Path string, token1Path string, fee uint32, cardinalityNext uint16)IncreaseObservationCardinalityNext increases the observation cardinality for a pool. Parameters: - token0Path: path of the first token - token1Path: path of the second token - fee: pool fee tier - cardinalityNext: new observation cardinality limit
- OID
- 07abb6…7fed:83
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: - token0Path: path of the first token - token1Path: path of the second token - fee: pool fee tier - tickLower: lower tick boundary - tickUpper: upper tick boundary - liquidityAmount: amount of liquidity to add - positionCaller: caller address for the position Returns: - string: amount of token0 added - string: amount of token1 added
- OID
- 07abb6…7fed:84
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.
- OID
- 07abb6…7fed:85
Burn details
Collect
func(token0Path string, token1Path string, fee uint32, recipient .uverse.address, tickLower int32, tickUpper int32, amount0Requested string, amount1Requested string) (string, string)Collect transfers owed tokens from a position to recipient.
- OID
- 07abb6…7fed:86
Collect details
SetWithdrawalFee
func(fee uint64)SetWithdrawalFee sets the withdrawal fee rate. Parameters: - fee: withdrawal fee in basis points
- OID
- 07abb6…7fed:87
SetWithdrawalFee details
HandleWithdrawalFee
func(token0Path string, amount0 string, token1Path string, amount1 string, positionCaller .uverse.address) (string, string, string, string)HandleWithdrawalFee processes withdrawal fees for a position. Parameters: - token0Path: path of the first token - amount0: amount of token0 to withdraw - token1Path: path of the second token - amount1: amount of token1 to withdraw - positionCaller: caller address for the position Returns: - string: withdrawal fee amount of token0 - string: withdrawal fee amount of token1 - string: net amount of token0 after fees - string: net amount of token1 after fees
- OID
- 07abb6…7fed:88
HandleWithdrawalFee details
Swap
func(token0Path string, token1Path string, fee uint32, recipient .uverse.address, zeroForOne bool, amountSpecified string, sqrtPriceLimitX96 string, payer .uverse.address, swapCallback func(...)) (string, string)Swap executes a token swap in the pool. Parameters: - token0Path: path of the first token - token1Path: path of the second token - fee: pool fee tier - recipient: recipient address for output tokens - zeroForOne: true if swapping token0 for token1 - amountSpecified: amount to swap (positive for exact input, negative for exact output) - sqrtPriceLimitX96: price limit for the swap - payer: address that will pay for the swap - swapCallback: callback function for token transfer, callbackMarker is used to identify the callback Returns: - string: amount of token0 delta - string: amount of token1 delta
- OID
- 07abb6…7fed:89
Swap details
DrySwap
func(token0Path string, token1Path string, fee uint32, zeroForOne bool, amountSpecified string, sqrtPriceLimitX96 string) (string, string, bool)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 - token1Path: path of the second token - fee: pool fee tier - zeroForOne: true if swapping token0 for token1 - amountSpecified: amount to swap - sqrtPriceLimitX96: price limit for the swap Returns: - string: amount of token0 delta - string: amount of token1 delta - bool: swap success status
- OID
- 07abb6…7fed:90
DrySwap details
SetSwapEndHook
func(hook func(...))SetSwapEndHook stores the swap end hook function.
- OID
- 07abb6…7fed:91
SetSwapEndHook details
SetSwapStartHook
func(hook func(...))SetSwapStartHook stores the swap start hook function.
- OID
- 07abb6…7fed:92
SetSwapStartHook details
SetTickCrossHook
func(hook func(...))SetTickCrossHook stores the tick cross hook function.
- OID
- 07abb6…7fed:93
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: - token0Path: path of the first token - token1Path: path of the second token - fee: pool fee tier - recipient: recipient address for fees - amount0Requested: amount of token0 to collect - amount1Requested: amount of token1 to collect Returns: - string: amount of token0 collected - string: amount of token1 collected
- OID
- 07abb6…7fed:94
CollectProtocol details
SetFeeProtocol
func(feeProtocol0 uint8, feeProtocol1 uint8)SetFeeProtocol sets the protocol fee rates for a pool. Parameters: - feeProtocol0: protocol fee rate for token0 - feeProtocol1: protocol fee rate for token1
- OID
- 07abb6…7fed:95
SetFeeProtocol details
ErrSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
domainPath
stringValue
"gno.land/r/gnoswap/pool"
currentAddress
.uverse.addressValue
<gnolang.StringValue>
kvStore
*store.kvStore- OID
- 07abb6…7fed:120
kvStore details
versionManager
*version_manager.versionManager- OID
- 07abb6…7fed:124
versionManager details
implementation
*v1.poolV1- OID
- 0fe078…3476:160
implementation details
init.101
func()- OID
- 07abb6…7fed:101
init.101 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore store.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>
StoreKeyFeeAmountTickSpacing
pool.StoreKey// Fee tier to tick spacing mapping
Value
<gnolang.StringValue>
StoreKeySlot0FeeProtocol
pool.StoreKey// Protocol fee percentage
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 store.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.
- 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
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).
- 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. The initializer function creates a new instance of the implementation using the provided poolStore interface. The stateInitializer function creates the initial state for this version. 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. Security: Only admin or governance can perform upgrades. The new implementation must have been previously registered via RegisterInitializer.
- OID
- 07abb6…7fed:112
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation.
- OID
- 07abb6…7fed:113
GetImplementationPackagePath details
MAX_TICK
int32Value
887272
ENCODED_TICK_OFFSET
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.
- OID
- 07abb6…7fed:114
GetPoolPath details
EncodeTickKey
func(tick int32) stringEncodeTickKey encodes a tick to a string key for the tick tree.
- OID
- 07abb6…7fed:116
EncodeTickKey details
EncodePositionKey
func(tickLower int32, tickUpper int32) stringEncodePositionKey encodes a position range into a fixed-width 20-byte string.
- OID
- 07abb6…7fed:117
EncodePositionKey details
encodeTickKeyToBuffer
func(dst []uint8, tick int32)- OID
- 07abb6…7fed:118
encodeTickKeyToBuffer details
DecodeTickKey
func(s string) int32DecodeTickKey decodes a string key to a tick.
- OID
- 07abb6…7fed:119