create the contract instance using ethers.js
uniSwapRouterV3 = new ethers.Contract(uniSwapRouterAddress, RouterAbi.abi, ethersProvider.getSigner());
create the params object:
const params = {
tokenIn: address,
tokenOut: address,
fee: poolFee,
recipient: userAddress,
deadline: Math.floor(Date.now() / 1000) + 900,
amountIn: amountInToWei,
amountOutMinimum: amountOutMin, (or just leave it 0)
sqrtPriceLimitX96: 0
}
and than the transaction:
const tx = await uniSwapRouterV3.exactInputSingle(params);
This is working and will return the sent transaction.
If you want to get the receipt just wait for some confirmations.
const receipt = await tx.wait([confirms = 1]);
positional argument(s) of type (<class 'list'>,)