/// Open a new position within the given tick range in the specified pool.////// # Arguments////// _ `config` - A reference to the `GlobalConfig` object./// _ `pool` - A mutable reference to the `Pool` object./// _ `tick_lower` - The lower tick index for the pool./// _ `tick_upper` - The upper tick index for the pool.////// # Generic Type Parameters////// _ `CoinTypeA` - The type of the first coin in the pool./// _ `CoinTypeB` - The type of the second coin in the pool.////// # Returns////// \* `Positon` - The new `Position` object that was opened, also means position nft.public fun open_position<CoinTypeA, CoinTypeB>( config:&GlobalConfig, pool:&mutPool<CoinTypeA, CoinTypeB>, tick_lower:u32, tick_upper:u32, ctx:&mutTxContext):Position {}
Example
1. Open position with both coins
If you want to support open_position_with_liquidity_with_all, this method you need to implement by your contract, here the example about it. Firstly, you need to open position and get the position nft Position.
Secondly, you need to add liquidity with fixed coin. If fix_amount_a is true, it means fixed coin a, others means fixed coin b. Finally, you need to repay the receipt when add liquidity.