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

Reposition

func Reposition( cur realm, positionId uint64, tickLower int32, tickUpper int32, amount0DesiredStr string, amount1DesiredStr string, amount0MinStr string, amount1MinStr string, deadline int64, ) (uint64, string, int32, int32, string, string)

Reposition changes the tick range of a position.

Parameters:

  • cur: current realm context; callers use cross(cur) when crossing into this realm
  • positionId: position NFT token ID to reposition
  • tickLower: new lower tick boundary of the position's price range
  • tickUpper: new upper tick boundary of the position's price range
  • amount0DesiredStr: desired token0 amount for the new range, represented as a decimal string
  • amount1DesiredStr: desired token1 amount for the new range, represented as a decimal string
  • amount0MinStr: minimum acceptable token0 amount for slippage protection
  • amount1MinStr: minimum acceptable token1 amount for slippage protection
  • deadline: transaction expiration timestamp

Returns:

  • positionId: position NFT token ID that was repositioned
  • liquidity: new liquidity amount, represented as a decimal string
  • tickLower: new lower tick boundary
  • tickUpper: new upper tick boundary
  • amount0: actual token0 amount added to the new range, represented as a decimal string
  • amount1: actual token1 amount added to the new range, represented as a decimal string

Halt check: reverts while the Position halt scope is active.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/gnoswap/position" -func "Reposition" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/position" -func "Reposition" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://127.0.0.1:26657" call.tx