getter.gno
GetPositionFeeGrowthInside0LastX128
GetPositionFeeGrowthInside0LastX128 returns the last fee-growth checkpoint inside the position's range for token0.
Parameters
positionId
uint64
position NFT token ID whose token0 fee-growth checkpoint is queried
Return Values
feeGrowthInside0LastX128
string
token0 fee-growth checkpoint, represented as a decimal string
err
error
non-nil when positionId cannot be resolved
GetPositionFeeGrowthInside1LastX128
GetPositionFeeGrowthInside1LastX128 returns the last fee-growth checkpoint inside the position's range for token1.
Parameters
positionId
uint64
position NFT token ID whose token1 fee-growth checkpoint is queried
Return Values
feeGrowthInside1LastX128
string
token1 fee-growth checkpoint, represented as a decimal string
err
error
non-nil when positionId cannot be resolved
GetPositionFeeGrowthInsideLastX128
GetPositionFeeGrowthInsideLastX128 returns the last fee-growth checkpoints inside the position's range for both tokens.
Parameters
positionId
uint64
position NFT token ID whose fee-growth checkpoints are queried
Return Values
feeGrowthInside0LastX128
string
token0 fee-growth checkpoint, represented as a decimal string
feeGrowthInside1LastX128
string
token1 fee-growth checkpoint, represented as a decimal string
err
error
non-nil when positionId cannot be resolved
GetPositionLiquidity
GetPositionLiquidity returns the stored liquidity amount of a position.
Parameters
positionId
uint64
position NFT token ID whose liquidity is queried
Return Values
liquidity
string
position liquidity, represented as a decimal string
err
error
non-nil when positionId cannot be resolved
GetPositionOperator
GetPositionOperator returns the approved operator address for a position.
Parameters
positionId
uint64
position NFT token ID whose operator is queried
Return Values
operator
address
approved operator address; the zero address means no operator is set
err
error
non-nil when positionId cannot be resolved
GetPositionOwner
GetPositionOwner returns the owner address of a position NFT.
Parameters
positionId
uint64
position NFT token ID whose owner is queried
Return Values
owner
address
address that owns the position NFT
err
error
non-nil when the NFT owner lookup fails
GetPositionPoolKey
GetPositionPoolKey returns the pool key associated with a position.
Parameters
positionId
uint64
position NFT token ID whose pool association is queried
Return Values
poolKey
string
canonical pool key used by the position
err
error
non-nil when positionId cannot be resolved
GetPositionTickLower
GetPositionTickLower returns the lower tick boundary of a position.
Parameters
positionId
uint64
position NFT token ID whose lower tick is queried
Return Values
tickLower
int32
lower tick boundary of the position's price range
err
error
non-nil when positionId cannot be resolved
GetPositionTickUpper
GetPositionTickUpper returns the upper tick boundary of a position.
Parameters
positionId
uint64
position NFT token ID whose upper tick is queried
Return Values
tickUpper
int32
upper tick boundary of the position's price range
err
error
non-nil when positionId cannot be resolved
GetPositionTicks
GetPositionTicks returns the lower and upper tick boundaries of a position.
Parameters
positionId
uint64
position NFT token ID whose tick range is queried
Return Values
tickLower
int32
lower tick boundary of the position's price range
tickUpper
int32
upper tick boundary of the position's price range
err
error
non-nil when positionId cannot be resolved
GetPositionToken0Balance
GetPositionToken0Balance returns the token0 balance associated with a position.
Parameters
positionId
uint64
position NFT token ID
Return Values
balance
int64
token0 balance
err
error
non-nil when positionId cannot be resolved
GetPositionToken1Balance
GetPositionToken1Balance returns the token1 balance associated with a position.
Parameters
positionId
uint64
position NFT token ID
Return Values
balance
int64
token1 balance
err
error
non-nil when positionId cannot be resolved
GetPositionTokenBalances
GetPositionTokenBalances calculates the current token0/token1 balances for a position from its liquidity, tick range, and pool price.
These are derived balances, not permanently stored token amounts.
Parameters
positionId
uint64
position NFT token ID
Return Values
balance0
int64
current token0 balance
balance1
int64
current token1 balance
err
error
non-nil when positionId cannot be resolved
GetPositionTokensOwed
GetPositionTokensOwed returns the token0 and token1 amounts accrued and owed to a position.
Parameters
positionId
uint64
position NFT token ID whose accrued token debt is queried
Return Values
tokensOwed0
int64
token0 amount currently owed to the position
tokensOwed1
int64
token1 amount currently owed to the position
err
error
non-nil when positionId cannot be resolved
GetPositionTokensOwed0
GetPositionTokensOwed0 returns the token0 amount accrued and owed to a position.
Parameters
positionId
uint64
position NFT token ID whose token0 debt is queried
Return Values
tokensOwed0
int64
token0 amount currently owed to the position
err
error
non-nil when positionId cannot be resolved
GetPositionTokensOwed1
GetPositionTokensOwed1 returns the token1 amount accrued and owed to a position.
Parameters
positionId
uint64
position NFT token ID whose token1 debt is queried
Return Values
tokensOwed1
int64
token1 amount currently owed to the position
err
error
non-nil when positionId cannot be resolved
GetPositions
GetPositions returns a read-only view of all positions.
Return Values
positions
*rotree.ReadOnlyTree
read-only tree keyed by decimal position ID; callers paginate with IterateByOffset
GetUnclaimedFee
GetUnclaimedFee returns the unclaimed fees for both tokens of a position as decimal strings.
Parameters
positionId
uint64
position NFT token ID whose unclaimed fees are queried
Return Values
fee0
string
unclaimed token0 fee amount, represented as a decimal string
fee1
string
unclaimed token1 fee amount, represented as a decimal string
err
error
non-nil when positionId or the associated pool fee-growth data cannot be resolved
IsBurned
IsBurned reports whether the position's empty-position marker is set.
Parameters
positionId
uint64
position NFT token ID
Return Values
burned
bool
whether the position's empty-position marker is set
err
error
non-nil when positionId cannot be resolved
IsInRange
IsInRange reports whether a position's ticks contain the current pool tick.
Parameters
positionId
uint64
position NFT token ID
Return Values
inRange
bool
whether the position is currently in range
err
error
non-nil when positionId cannot be resolved or the associated pool tick cannot be read
Last updated