You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
I have a process of monitoring price in TypeScript:
In Uniswap V3
...
let quotedAmountOut = await quoterContract.callStatic.quoteExactInputSingle(
tokenIn,
tokenOut,
fee,
amountIn.toString(),
0
);
..
I have a Smart Contract:
...
amountOut = swaprouter3.exactInputSingle(
ISwapRouter.ExactInputSingleParams(
{
tokenIn: path[0],
tokenOut: path[1],
fee: fee,
recipient: address(this),
deadline: block.timestamp,
amountIn: amount,
amountOutMinimum: 0,
sqrtPriceLimitX96: 0
})
);
...
return values DO NO MATCH !!
In Uniswap v2:
Typescript:
const amountsOut = await V2Router.getAmountsOut(amountIn, [tokenIn, tokenOut]);
Smart Contract
amountOut = router2.swapExactTokensForTokens(
amount,
0,
path,
address(this), // DESTINO: Contrato
block.timestamp
)[1];
return values YES MATCH !!
Why ?
The text was updated successfully, but these errors were encountered: