async function quoteExactInputSingle(tokenIn, tokenOut, amountIn, feeAmount, priceLimitX96) { try { // Créer l'objet de paramètres const params = { tokenIn: tokenIn, //WBNB tokenOut: tokenOut, //USDT amountIn: amountIn, //0.05 fee: feeAmount, //500 = 0.05% sqrtPriceLimitX96: priceLimitX96 //0 }; // Appeler quoteExactInputSingle du contrat const quoteResult = await quoter.callStatic.quoteExactInputSingle(params); console.log("Montant de sortie:", quoteResult.amountOut.toString()); console.log("sqrtPriceX96After:", quoteResult.sqrtPriceX96After.toString()); console.log("initializedTicksCrossed:", quoteResult.initializedTicksCrossed.toString()); console.log("Estimation de gaz:", quoteResult.gasEstimate.toString()); return quoteResult; } catch (error) { console.error("Erreur lors de l'appel à quoteExactInputSingle:", error); throw error; } } === quoteExactInputSingle === Résultat de quoteExactInputSingle : Montant de sortie: 27433797341424942705 sqrtPriceX96After: 3380912477887221028916588200 initializedTicksCrossed: 1 Estimation de gaz: 115377 But the amount in the website is not the same, why ? I'm trying to got the same amount given from the website but it is not the same
I put the same slippage on PCSwap (0.05%) and activate multihops like a default setting it was already
I'm seaching for the function to got the same amount, it can use multiple route yes so what is the function to get the same values as the website ?
Before if we do getAmountOut we got the same but actually not...
As you see there is a little diffence : Quoter return 27.4337 Website return 27.4498
I fetch the price with public url but it did not have too much latency and price change, actually it is never the same value check yourself
Sincerely Mike
