0

I'm working on solidity code that uses pancakeswapV3 quoter contract to call quoteExactInputSingle. Here is the code snippet

function AnalyseTnx(address tokenPath0,address tokenPath1,uint256 amtIn)external returns (uint256)
    {
        IQuoter quoter;
        quoter=IQuoter(0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997);       
        return quoter.quoteExactInputSingle(tokenPath0, tokenPath1, 100, amtIn, 0);
     }

the arguments i passed are

tokenPath0=0x55d398326f99059fF775485246999027B3197955
tokenPath1=0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
amtIn=100000000000000000000000

but when i test using hardhat it results

 Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="Transaction reverted without a reason string"

i double checked that the pool for the pair is exist with 500 fee. Please help

1 Answer 1

0

Looks like you have misplaced arguments. Fourth argument is fee and it is uint24, you pass amtIn there which is bigger

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.