Anyone know why I'd be getting an INVALID_TO error when trying to swap from my token into USDT inside the SC? The pair exists (i.e. there's token-USDT liquidity) and the path is correct. Looking at the uniswap router contracts it seems to give that error when you try to swap with a "to" address of one of the pair tokens, yet it works fine if the pair is with WETH. Any suggestions welcome

Jul 31, 2021, 4:06 PM
I’m having a similar issue to this, different pair but same problem. Anyone got any pointers?
Jul 31, 2021, 7:30 PM
check transferFrom result, with uniswap contract USDT dont working
Aug 2, 2021, 2:13 PM
Thanks, I re-read the uniswap contracts in detail, seems you can’t transfer from a pair to one element of the pair address (where the pair isn’t a pair with WETH). So I’ve spun up a separate contract to manage selling token and receiving USDT as it doesn’t have the INVALID_TO issue. No idea why this is a restriction (if anyone does know I’d love to understand why)
Aug 2, 2021, 2:15 PM

© 2024 Draquery.com All rights reserved.