Open Hareem-Saad opened 1 year ago
I was having this issue on both Polygon and Mumbai. I created a new pool and then was getting the LOK error trying to mint the first LP position. I ended up resolving it by calling initialize() on the UniswapV3Pool contract. so in this order: -create new pool -initialize the pool -mint new position using NonfungiblePositionManager
Packages & Versions
Code
I am forking polygon mainnet on hardhat then running it locally, The pool created is betweem USDC and TokenA (a token i created)
On
await positionManager.connect(signer).mint
it fails with the string LOK, which I cannot understand because there are no more calls calling to the pool, its just this code which executes line after line.This error could be linked to this issue. When creating the pool, the pool gets created without any issue but I have to then close the node running the polygon mainnet fork to execute the same script again also the code does not initialize the pool (hence it is commented out)