Reposition
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.
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