For the complete documentation index, see llms.txt. This page is also available as Markdown.

getter.gno

GetPositionFeeGrowthInside0LastX128

GetPositionFeeGrowthInside0LastX128 returns the last fee-growth checkpoint inside the position's range for token0.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose token0 fee-growth checkpoint is queried

Return Values

Name
Type
Description

feeGrowthInside0LastX128

string

token0 fee-growth checkpoint, represented as a decimal string

err

error

non-nil when positionId cannot be resolved

source

GetPositionFeeGrowthInside1LastX128

GetPositionFeeGrowthInside1LastX128 returns the last fee-growth checkpoint inside the position's range for token1.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose token1 fee-growth checkpoint is queried

Return Values

Name
Type
Description

feeGrowthInside1LastX128

string

token1 fee-growth checkpoint, represented as a decimal string

err

error

non-nil when positionId cannot be resolved

source

GetPositionFeeGrowthInsideLastX128

GetPositionFeeGrowthInsideLastX128 returns the last fee-growth checkpoints inside the position's range for both tokens.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose fee-growth checkpoints are queried

Return Values

Name
Type
Description

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

source

GetPositionLiquidity

GetPositionLiquidity returns the stored liquidity amount of a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose liquidity is queried

Return Values

Name
Type
Description

liquidity

string

position liquidity, represented as a decimal string

err

error

non-nil when positionId cannot be resolved

source

GetPositionOperator

GetPositionOperator returns the approved operator address for a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose operator is queried

Return Values

Name
Type
Description

operator

address

approved operator address; the zero address means no operator is set

err

error

non-nil when positionId cannot be resolved

source

GetPositionOwner

GetPositionOwner returns the owner address of a position NFT.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose owner is queried

Return Values

Name
Type
Description

owner

address

address that owns the position NFT

err

error

non-nil when the NFT owner lookup fails

source

GetPositionPoolKey

GetPositionPoolKey returns the pool key associated with a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose pool association is queried

Return Values

Name
Type
Description

poolKey

string

canonical pool key used by the position

err

error

non-nil when positionId cannot be resolved

source

GetPositionTickLower

GetPositionTickLower returns the lower tick boundary of a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose lower tick is queried

Return Values

Name
Type
Description

tickLower

int32

lower tick boundary of the position's price range

err

error

non-nil when positionId cannot be resolved

source

GetPositionTickUpper

GetPositionTickUpper returns the upper tick boundary of a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose upper tick is queried

Return Values

Name
Type
Description

tickUpper

int32

upper tick boundary of the position's price range

err

error

non-nil when positionId cannot be resolved

source

GetPositionTicks

GetPositionTicks returns the lower and upper tick boundaries of a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose tick range is queried

Return Values

Name
Type
Description

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

source

GetPositionToken0Balance

GetPositionToken0Balance returns the token0 balance associated with a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID

Return Values

Name
Type
Description

balance

int64

token0 balance

err

error

non-nil when positionId cannot be resolved

source

GetPositionToken1Balance

GetPositionToken1Balance returns the token1 balance associated with a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID

Return Values

Name
Type
Description

balance

int64

token1 balance

err

error

non-nil when positionId cannot be resolved

source

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

Name
Type
Description

positionId

uint64

position NFT token ID

Return Values

Name
Type
Description

balance0

int64

current token0 balance

balance1

int64

current token1 balance

err

error

non-nil when positionId cannot be resolved

source

GetPositionTokensOwed

GetPositionTokensOwed returns the token0 and token1 amounts accrued and owed to a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose accrued token debt is queried

Return Values

Name
Type
Description

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

source

GetPositionTokensOwed0

GetPositionTokensOwed0 returns the token0 amount accrued and owed to a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose token0 debt is queried

Return Values

Name
Type
Description

tokensOwed0

int64

token0 amount currently owed to the position

err

error

non-nil when positionId cannot be resolved

source

GetPositionTokensOwed1

GetPositionTokensOwed1 returns the token1 amount accrued and owed to a position.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose token1 debt is queried

Return Values

Name
Type
Description

tokensOwed1

int64

token1 amount currently owed to the position

err

error

non-nil when positionId cannot be resolved

source

GetPositions

GetPositions returns a read-only view of all positions.

Return Values

Name
Type
Description

positions

*rotree.ReadOnlyTree

read-only tree keyed by decimal position ID; callers paginate with IterateByOffset

source

GetUnclaimedFee

GetUnclaimedFee returns the unclaimed fees for both tokens of a position as decimal strings.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID whose unclaimed fees are queried

Return Values

Name
Type
Description

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

source

IsBurned

IsBurned reports whether the position's empty-position marker is set.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID

Return Values

Name
Type
Description

burned

bool

whether the position's empty-position marker is set

err

error

non-nil when positionId cannot be resolved

source

IsInRange

IsInRange reports whether a position's ticks contain the current pool tick.

Parameters

Name
Type
Description

positionId

uint64

position NFT token ID

Return Values

Name
Type
Description

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

source

Last updated