mint_stake.gno
Creates a new position and stakes it in a single transaction.
MintAndStake
func MintAndStake(
token0 string,
token1 string,
fee uint32,
tickLower int32,
tickUpper int32,
amount0Desired string,
amount1Desired string,
amount0Min string,
amount1Min string,
deadline int64,
) (uint64, string, string, string, string)
Mints and stakes an LP token.
Parameters
token0
string
The path of token0.
token1
string
The path of token1.
fee
uint32
The fee tier of the pool.
tickLower
int32
The lower tick of the price range of the position.
tickUpper
int32
The upper tick of the price range of the position.
amount0Desired
string
The maximum amount of token0 to add and stake.
amount1Desired
string
The maximum amount of token1 to add and stake.
amount0Min
string
The minimum amount of token0 to add and stake.
amount1Min
string
The minimum amount of token1 to add and stake.
deadline
int64
The deadline at which the transaction will expire.
Return Values
positionId
uint64
The ID of the position to be created and staked.
liquidity
string
The liquidity amount of the position.
amount0
string
The amount of token0 to be staked.
amount1
string
The amount of token1 to be staked.
poolPath
string
The path of the pool that the position will be created and staked in.
Last updated
Was this helpful?