Why swapExactTokensForETH works and not swapExactTokensForTokens when swapping Token A to WBNB on Pancake?

68 views Asked by At

In Python using web3.py.

I wrote a code to swap a token:

A (0xc3e8F389C4ACEDB0AFe230d713136bE21D0421Ac)

to

WBNB (0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c)

For some reason, when I call swapExactTokensForETHSupportingFeeOnTransferTokens, the swap go through, but when I call swapExactTokensForTokensSupportingFeeOnTransferTokens, with the same parameters, it does not and raise the error TRANSFER_FROM_FAILED.

Someone can give me an explanation please?

0

There are 0 answers