Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

position package

Function

NewPosition

func NewPosition( poolKey string, tickLower int32, tickUpper int32, liquidity string, feeGrowthInside0LastX128, feeGrowthInside1LastX128 string, tokensOwed0, tokensOwed1 int64, burned bool, operator address, ) *Position

NewPosition constructs a position from its persisted pool, range, liquidity, fee-growth, owed-token, marker, and operator values.

Parameters:

  • poolKey: pool key encoding the position's token pair and fee tier
  • tickLower: lower tick boundary of the position's range
  • tickUpper: upper tick boundary of the position's range
  • liquidity: decimal string representing the position's liquidity
  • feeGrowthInside0LastX128: decimal-encoded Q128 token0 fee-growth checkpoint
  • feeGrowthInside1LastX128: decimal-encoded Q128 token1 fee-growth checkpoint
  • tokensOwed0: accrued token0 amount awaiting collection, in token units
  • tokensOwed1: accrued token1 amount awaiting collection, in token units
  • burned: empty-position marker to store
  • operator: approved operator address; the empty address means no operator

Returns:

  • position: pointer to a position initialized with all supplied values

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/position.NewPosition(,,,,,,,,,)"

Result