getter.gno
GetPositionCount
func GetPositionCount() int
GetPositionCount returns the total number of positions.
Return Values
count
int
total number of positions
GetPositionIDs
GetPositionIDs returns a paginated list of position IDs.
Parameters
offset
int
starting index for pagination
count
int
number of position IDs to return
Return Values
positionIDs
[]uint64
slice of position IDs
GetPosition
GetPosition returns the position data for a given position ID.
Parameters
positionId
uint64
ID of the position
Return Values
position
Position
the position data
err
error
non-nil if position not found
IsBurned
IsBurned returns whether a position has been burned.
Parameters
positionId
uint64
ID of the position
Return Values
burned
bool
true if position has been burned
IsInRange
IsInRange returns whether a position's ticks are within the current price range.
Parameters
positionId
uint64
ID of the position
Return Values
inRange
bool
true if position is within current price range
GetPositionToken0Balance
GetPositionToken0Balance returns the token0 balance of a position.
Parameters
positionId
uint64
ID of the position
Return Values
balance
*u256.Uint
token0 balance
GetPositionToken1Balance
GetPositionToken1Balance returns the token1 balance of a position.
Parameters
positionId
uint64
ID of the position
Return Values
balance
*u256.Uint
token1 balance
GetPositionTokenBalances
GetPositionTokenBalances returns the token balances of a position.
Parameters
positionId
uint64
ID of the position
Return Values
token0Balance
string
balance of token0
token1Balance
string
balance of token1
GetPositionFeeGrowthInside0LastX128
GetPositionFeeGrowthInside0LastX128 returns the last recorded fee growth inside for token0.
Parameters
positionId
uint64
ID of the position
Return Values
feeGrowth
*u256.Uint
fee growth inside for token0 in X128 format
GetPositionFeeGrowthInside1LastX128
GetPositionFeeGrowthInside1LastX128 returns the last recorded fee growth inside for token1.
Parameters
positionId
uint64
ID of the position
Return Values
feeGrowth
*u256.Uint
fee growth inside for token1 in X128 format
GetPositionFeeGrowthInsideLastX128
GetPositionFeeGrowthInsideLastX128 returns the last recorded fee growth inside for both tokens.
Parameters
positionId
uint64
ID of the position
Return Values
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
positionId
uint64
ID of the position
Return Values
liquidity
*u256.Uint
liquidity amount of the position
GetPositionOperator
GetPositionOperator returns the operator address of a position.
Parameters
positionId
uint64
ID of the position
Return Values
operator
address
address approved for spending this position
GetPositionOwner
GetPositionOwner returns the owner address of a position NFT.
Parameters
positionId
uint64
ID of the position
Return Values
owner
address
address that owns the position NFT
GetPositionPoolKey
GetPositionPoolKey returns the pool key of a position.
Parameters
positionId
uint64
ID of the position
Return Values
poolKey
string
pool path identifier
GetPositionTickLower
GetPositionTickLower returns the lower tick of a position.
Parameters
positionId
uint64
ID of the position
Return Values
tickLower
int32
lower tick boundary
GetPositionTickUpper
GetPositionTickUpper returns the upper tick of a position.
Parameters
positionId
uint64
ID of the position
Return Values
tickUpper
int32
upper tick boundary
GetPositionTicks
GetPositionTicks returns the lower and upper ticks of a position.
Parameters
positionId
uint64
ID of the position
Return Values
tickLower
int32
lower tick boundary
tickUpper
int32
upper tick boundary
GetPositionTokensOwed0
GetPositionTokensOwed0 returns the amount of token0 owed to a position.
Parameters
positionId
uint64
ID of the position
Return Values
tokensOwed
*u256.Uint
amount of token0 owed
GetPositionTokensOwed1
GetPositionTokensOwed1 returns the amount of token1 owed to a position.
Parameters
positionId
uint64
ID of the position
Return Values
tokensOwed
*u256.Uint
amount of token1 owed
GetPositionTokensOwed
GetPositionTokensOwed returns the amount of tokens owed to a position.
Parameters
positionId
uint64
ID of the position
Return Values
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
positionId
uint64
ID of the position
Return Values
unclaimedFee0
*u256.Uint
unclaimed fee amount for token0
unclaimedFee1
*u256.Uint
unclaimed fee amount for token1
Last updated