ErrSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
GetPositionCount
func() intGetPositionCount returns the total number of positions.
- OID
- 076232…53a6:3
GetPositionCount details
GetPositionIDs
func(offset int, count int) []uint64GetPositionIDs returns a paginated list of position IDs.
- OID
- 076232…53a6:5
GetPositionIDs details
GetPosition
func(positionId uint64) (position.Position, .uverse.error)GetPosition returns the position data for a given position ID.
- OID
- 076232…53a6:6
GetPosition details
IsBurned
func(positionId uint64) boolIsBurned returns whether a position has been burned.
- OID
- 076232…53a6:7
IsBurned details
IsInRange
func(positionId uint64) boolIsInRange returns whether a position's ticks are within the current price range.
- OID
- 076232…53a6:8
IsInRange details
GetPositionTokenBalances
func(positionId uint64) (int64, int64)GetPositionTokenBalances returns the token0 balance of a position.
- OID
- 076232…53a6:9
GetPositionTokenBalances details
GetPositionToken0Balance
func(positionId uint64) int64- OID
- 076232…53a6:10
GetPositionToken0Balance details
GetPositionToken1Balance
func(positionId uint64) int64- OID
- 076232…53a6:11
GetPositionToken1Balance details
GetPositionFeeGrowthInside0LastX128
func(positionId uint64) stringGetPositionFeeGrowthInside0LastX128 returns the last recorded fee growth inside for token0.
- OID
- 076232…53a6:12
GetPositionFeeGrowthInside0LastX128 details
GetPositionFeeGrowthInside1LastX128
func(positionId uint64) stringGetPositionFeeGrowthInside1LastX128 returns the last recorded fee growth inside for token1.
- OID
- 076232…53a6:13
GetPositionFeeGrowthInside1LastX128 details
GetPositionFeeGrowthInsideLastX128
func(positionId uint64) (string, string)GetPositionFeeGrowthInsideLastX128 returns the last recorded fee growth inside for both tokens.
- OID
- 076232…53a6:14
GetPositionFeeGrowthInsideLastX128 details
GetPositionLiquidity
func(positionId uint64) stringGetPositionLiquidity returns the liquidity amount of a position.
- OID
- 076232…53a6:15
GetPositionLiquidity details
GetPositionOperator
func(positionId uint64) .uverse.address- OID
- 076232…53a6:16
GetPositionOperator details
GetPositionPoolKey
func(positionId uint64) stringGetPositionPoolKey returns the pool key of a position.
- OID
- 076232…53a6:17
GetPositionPoolKey details
GetPositionTickLower
func(positionId uint64) int32GetPositionTickLower returns the lower tick of a position.
- OID
- 076232…53a6:18
GetPositionTickLower details
GetPositionTickUpper
func(positionId uint64) int32GetPositionTickUpper returns the upper tick of a position.
- OID
- 076232…53a6:19
GetPositionTickUpper details
GetPositionTicks
func(positionId uint64) (int32, int32)GetPositionTicks returns the lower and upper ticks of a position.
- OID
- 076232…53a6:20
GetPositionTicks details
GetPositionTokensOwed0
func(positionId uint64) int64GetPositionTokensOwed0 returns the amount of token0 owed to a position.
- OID
- 076232…53a6:21
GetPositionTokensOwed0 details
GetPositionTokensOwed1
func(positionId uint64) int64GetPositionTokensOwed1 returns the amount of token1 owed to a position.
- OID
- 076232…53a6:22
GetPositionTokensOwed1 details
GetPositionTokensOwed
func(positionId uint64) (int64, int64)GetPositionTokensOwed returns the amount of tokens owed to a position.
- OID
- 076232…53a6:23
GetPositionTokensOwed details
GetUnclaimedFee
func(positionId uint64) (string, string)GetUnclaimedFee returns the unclaimed fees for both tokens of a position.
- OID
- 076232…53a6:24
GetUnclaimedFee details
GetPositionOwner
func(positionId uint64) .uverse.address- OID
- 076232…53a6:25
GetPositionOwner details
clonePosition
func(position position.Position) position.Position- OID
- 076232…53a6:26
clonePosition details
cloneUint64Slice
func(src []uint64) []uint64- OID
- 076232…53a6:28
cloneUint64Slice details
Position
typePosition represents a liquidity position in a pool. Each position tracks the amount of liquidity, fee growth, and tokens owed to the position owner. All uint256 fields are stored as decimal strings to reduce realm object overhead.
Value
position.Position
isZeroStr
func(s string) bool- OID
- 076232…53a6:29
isZeroStr details
NewPosition
func(poolKey string, tickLower int32, tickUpper int32, liquidity string, feeGrowthInside0LastX128 string, feeGrowthInside1LastX128 string, tokensOwed0 int64, tokensOwed1 int64, burned bool, operator .uverse.address) *position.Position- OID
- 076232…53a6:31
NewPosition details
NewPositionsTree
func() *v0.BPTreeNewPositionsTree allocates the positions BP-tree under /r/gnoswap/position's realm context (the realm that declares Position).
- OID
- 076232…53a6:32
NewPositionsTree details
Mint
func(token0 string, token1 string, fee uint32, tickLower int32, tickUpper int32, amount0Desired string, amount1Desired string, amount0Min string, amount1Min string, deadline int64, mintTo .uverse.address, referrer string) (uint64, string, string, string)Mint creates a new liquidity position NFT. Parameters: - token0: path of the first token - token1: path of the second token - fee: pool fee tier - tickLower: lower tick boundary - tickUpper: upper tick boundary - amount0Desired: desired amount of token0 - amount1Desired: desired amount of token1 - amount0Min: minimum amount of token0 - amount1Min: minimum amount of token1 - deadline: transaction deadline - mintTo: recipient of the position NFT - referrer: referrer address for reward tracking Returns: - uint64: position ID - string: liquidity amount - string: amount of token0 added - string: amount of token1 added
- OID
- 076232…53a6:33
Mint details
IncreaseLiquidity
func(positionId uint64, amount0DesiredStr string, amount1DesiredStr string, amount0MinStr string, amount1MinStr string, deadline int64) (uint64, string, string, string, string)IncreaseLiquidity adds liquidity to an existing position. Parameters: - positionId: ID of the position - amount0DesiredStr: desired amount of token0 - amount1DesiredStr: desired amount of token1 - amount0MinStr: minimum amount of token0 - amount1MinStr: minimum amount of token1 - deadline: transaction deadline Returns: - uint64: position ID - string: new liquidity amount - string: amount of token0 added - string: amount of token1 added - string: pool path
- OID
- 076232…53a6:35
IncreaseLiquidity details
DecreaseLiquidity
func(positionId uint64, liquidityStr string, amount0MinStr string, amount1MinStr string, deadline int64) (uint64, string, string, string, string, string, string)DecreaseLiquidity removes liquidity from a position. Parameters: - positionId: ID of the position - liquidityStr: amount of liquidity to remove - amount0MinStr: minimum amount of token0 - amount1MinStr: minimum amount of token1 - deadline: transaction deadline Returns: - uint64: position ID - string: removed liquidity amount - string: amount of token0 removed - string: amount of token1 removed - string: pool path - string: net amount of token0 after fees - string: net amount of token1 after fees
- OID
- 076232…53a6:36
DecreaseLiquidity details
Reposition
func(positionId uint64, tickLower int32, tickUpper int32, amount0DesiredStr string, amount1DesiredStr string, amount0MinStr string, amount1MinStr string, deadline int64) (uint64, string, int32, int32, string, string)Reposition changes the tick range of a position. Parameters: - positionId: ID of the position - tickLower: new lower tick boundary - tickUpper: new upper tick boundary - amount0DesiredStr: desired amount of token0 - amount1DesiredStr: desired amount of token1 - amount0MinStr: minimum amount of token0 - amount1MinStr: minimum amount of token1 - deadline: transaction deadline Returns: - uint64: position ID - string: new liquidity amount - int32: new lower tick - int32: new upper tick - string: amount of token0 used - string: amount of token1 used
- OID
- 076232…53a6:37
Reposition details
CollectFee
func(positionId uint64) (uint64, string, string, string, string, string)CollectFee collects accumulated fees from a position. Parameters: - positionId: ID of the position Returns: - uint64: position ID - string: amount of token0 collected - string: amount of token1 collected - string: pool path - string: token0 path - string: token1 path
- OID
- 076232…53a6:38
CollectFee details
SetPositionOperator
func(positionId uint64, operator .uverse.address)SetPositionOperator sets an operator for a position. Parameters: - positionId: ID of the position - operator: address of the operator
- OID
- 076232…53a6:39
SetPositionOperator details
domainPath
stringValue
"gno.land/r/gnoswap/position"
kvStore
*store.kvStore- OID
- 076232…53a6:57
kvStore details
versionManager
*version_manager.versionManager- OID
- 076232…53a6:61
versionManager details
implementation
*v1.positionV1- OID
- 07aca3…f308:45
implementation details
init.39
func()- OID
- 076232…53a6:44
init.39 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore store.KVStore) interface{...}- OID
- 076232…53a6:46
initializeDomainStore details
getImplementation
func() position.IPosition- OID
- 076232…53a6:47
getImplementation details
updateImplementation
func() .uverse.error- OID
- 076232…53a6:48
updateImplementation details
StoreKey
typeValue
position.StoreKey
StoreKeyPositions
position.StoreKey// Positions
Value
<gnolang.StringValue>
StoreKeyPositionNextID
position.StoreKey// Position next ID
Value
<gnolang.StringValue>
positionStore
typeValue
position.positionStore
NewPositionStore
func(kvStore store.KVStore) position.IPositionStoreNewPositionStore creates a new protocol fee store instance with the provided KV store. This function is used by the upgrade system to create storage instances for each implementation.
- OID
- 076232…53a6:49
NewPositionStore details
IPosition
typeValue
position.IPosition
IPositionManager
typeValue
position.IPositionManager
IPositionGetter
typeValue
position.IPositionGetter
IPositionStore
typeValue
position.IPositionStore
RegisterInitializer
func(initializer func(...))RegisterInitializer registers a new position 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 positionStore interface. Security: Only contracts within the domain path can register initializers. Each package path can only register once to prevent duplicate registrations.
- OID
- 076232…53a6:51
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl switches the active position 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
- 076232…53a6:53
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation.
- OID
- 076232…53a6:54