getter.gno

GetPositionCount

func GetPositionCount() int

GetPositionCount returns the total number of positions.

Return Values

Name
Type
Description

count

int

total number of positions


GetPositionIDs

GetPositionIDs returns a paginated list of position IDs.

Parameters

Name
Type
Description

offset

int

starting index for pagination

count

int

number of position IDs to return

Return Values

Name
Type
Description

positionIDs

[]uint64

slice of position IDs


GetPosition

GetPosition returns the position data for a given position ID.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

position

Position

the position data

err

error

non-nil if position not found


IsBurned

IsBurned returns whether a position has been burned.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

burned

bool

true if position has been burned


IsInRange

IsInRange returns whether a position's ticks are within the current price range.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

inRange

bool

true if position is within current price range


GetPositionToken0Balance

GetPositionToken0Balance returns the token0 balance of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

balance

*u256.Uint

token0 balance


GetPositionToken1Balance

GetPositionToken1Balance returns the token1 balance of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

balance

*u256.Uint

token1 balance


GetPositionTokenBalances

GetPositionTokenBalances returns the token balances of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

token0Balance

string

balance of token0

token1Balance

string

balance of token1


GetPositionFeeGrowthInside0LastX128

GetPositionFeeGrowthInside0LastX128 returns the last recorded fee growth inside for token0.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

feeGrowth

*u256.Uint

fee growth inside for token0 in X128 format


GetPositionFeeGrowthInside1LastX128

GetPositionFeeGrowthInside1LastX128 returns the last recorded fee growth inside for token1.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

feeGrowth

*u256.Uint

fee growth inside for token1 in X128 format


GetPositionFeeGrowthInsideLastX128

GetPositionFeeGrowthInsideLastX128 returns the last recorded fee growth inside for both tokens.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

feeGrowth0

*u256.Uint

fee growth inside for token0 in X128 format

feeGrowth1

*u256.Uint

fee growth inside for token1 in X128 format


GetPositionLiquidity

GetPositionLiquidity returns the liquidity amount of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

liquidity

*u256.Uint

liquidity amount of the position


GetPositionOperator

GetPositionOperator returns the operator address of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

operator

address

address approved for spending this position


GetPositionOwner

GetPositionOwner returns the owner address of a position NFT.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

owner

address

address that owns the position NFT


GetPositionPoolKey

GetPositionPoolKey returns the pool key of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

poolKey

string

pool path identifier


GetPositionTickLower

GetPositionTickLower returns the lower tick of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

tickLower

int32

lower tick boundary


GetPositionTickUpper

GetPositionTickUpper returns the upper tick of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

tickUpper

int32

upper tick boundary


GetPositionTicks

GetPositionTicks returns the lower and upper ticks of a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

tickLower

int32

lower tick boundary

tickUpper

int32

upper tick boundary


GetPositionTokensOwed0

GetPositionTokensOwed0 returns the amount of token0 owed to a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

tokensOwed

*u256.Uint

amount of token0 owed


GetPositionTokensOwed1

GetPositionTokensOwed1 returns the amount of token1 owed to a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

tokensOwed

*u256.Uint

amount of token1 owed


GetPositionTokensOwed

GetPositionTokensOwed returns the amount of tokens owed to a position.

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

tokensOwed0

*u256.Uint

amount of token0 owed

tokensOwed1

*u256.Uint

amount of token1 owed


GetUnclaimedFee

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

Parameters

Name
Type
Description

positionId

uint64

ID of the position

Return Values

Name
Type
Description

unclaimedFee0

*u256.Uint

unclaimed fee amount for token0

unclaimedFee1

*u256.Uint

unclaimed fee amount for token1

Last updated