IncreaseLiquidity
IncreaseLiquidity adds liquidity to an existing position.
Parameters:
- cur: current realm context; callers use cross(cur) when crossing into this realm
- positionId: position NFT token ID to increase
- amount0DesiredStr: desired token0 amount, represented as a decimal string
- amount1DesiredStr: desired token1 amount, 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 received the liquidity
- liquidity: liquidity amount added to the position (the delta), represented as a decimal string
- amount0: actual token0 amount added, represented as a decimal string
- amount1: actual token1 amount added, represented as a decimal string
- poolKey: canonical pool key for the position
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 "IncreaseLiquidity" -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 "IncreaseLiquidity" -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