Hello! Help me please. I don`t understand how calculate exact output amount of tokens. I try calculate output amount with "getAmountsOut" function in PancakeRouter contract, but I receive "Insufficient output amount" error always. I execute this function in Remix IDE and this function work, but it does not work in my python dApp. I do not quite understand the mechanism for calculating tokens to perform functions: "swapExactEthForTokens" and "swapExactTokensForETH"

Sep 3, 2021, 1:17 PM
read methods getAmountIn and getAmountOut in UniswapLibrary bro
Sep 3, 2021, 2:23 PM
Check the path that you give
Just put zero for minAmountOut for now untill you fully understand how stuff works
Sep 3, 2021, 2:57 PM

© 2024 Draquery.com All rights reserved.