Replies: 1 comment 10 replies
-
Hello @blnkoff ! Check this tutorial, it explains how to swap 2 tokens. Just replace the bought token (usdt in the tuto) with weth and add an unwrap command at the end of the chain. Also make sure to adapt the web3.py methods if you use a recent version. |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I want to write code that interacts with the Uniswap universal router. I have written a code for swapping from ETH to a token. (But I haven't checked it yet). How I can write the same code for swapping from token to ETH? I think code will be almost the same as
swapEth
, but with little changes. What I need to change?Beta Was this translation helpful? Give feedback.
All reactions