I am trying to get amountsOut
quote while swapping the USDT to USDC on polygon mainnet and getting a weird error even after doing the exact things that need to be done
await window.ethereum.enable();
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
const quickswap = new Contract("0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", quickswapabi, signer);
const path = ["0xc2132d05d31c914a87c6611c10748aeb04b58e8f", "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"];
const amountIn = ethers.utils.parseUnits("1", 6);
const amountOut = await quickswap.getAmountsOut(amountIn, path);
While using this code I am getting this error
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="getAmountsOut(uint256,address[])", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
I also tried to pass the value as a string and int but still its not working and giving this error