@@ -28,6 +28,15 @@ export const prepareUniswapV3 = async (deployer: Signer, wzeta: any) => {
2828 const uniswapV3FactoryInstance = await uniswapV3Factory . deploy ( deployOpts ) ;
2929 await uniswapV3FactoryInstance . waitForDeployment ( ) ;
3030
31+ // Ensure common fee tiers are enabled explicitly
32+ await ( uniswapV3FactoryInstance as any ) . enableFeeAmount ( 500 , 10 , deployOpts ) ;
33+ await ( uniswapV3FactoryInstance as any ) . enableFeeAmount ( 3000 , 60 , deployOpts ) ;
34+ await ( uniswapV3FactoryInstance as any ) . enableFeeAmount (
35+ 10000 ,
36+ 200 ,
37+ deployOpts
38+ ) ;
39+
3140 const swapRouter = new ethers . ContractFactory (
3241 SwapRouter . abi ,
3342 SwapRouter . bytecode ,
@@ -189,7 +198,7 @@ export const createUniswapV3Pool = async (
189198 token1 : string ,
190199 fee = 3000 // Default fee tier 0.3%
191200) => {
192- await uniswapV3FactoryInstance . createPool ( token0 , token1 , fee ) ;
201+ await uniswapV3FactoryInstance . createPool ( token0 , token1 , fee , deployOpts ) ;
193202 const poolAddress = await uniswapV3FactoryInstance . getPool (
194203 token0 ,
195204 token1 ,
@@ -204,7 +213,7 @@ export const createUniswapV3Pool = async (
204213 // Initialize the pool with a sqrt price of 1 (equal amounts of both tokens)
205214 // sqrtPriceX96 = sqrt(1) * 2^96
206215 const sqrtPriceX96 = ethers . toBigInt ( "79228162514264337593543950336" ) ;
207- await pool . initialize ( sqrtPriceX96 ) ;
216+ await pool . initialize ( sqrtPriceX96 , deployOpts ) ;
208217
209218 return pool ;
210219} ;
@@ -250,7 +259,7 @@ export const addLiquidityV3 = async (
250259 token1,
251260 } ;
252261
253- const tx = await nonfungiblePositionManager . mint ( params ) ;
262+ const tx = await nonfungiblePositionManager . mint ( params , deployOpts ) ;
254263 const receipt = await tx . wait ( ) ;
255264
256265 const iface = nonfungiblePositionManager . interface ;
0 commit comments