Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ETH to Coin swap #165

Answered by liquid-8
ars3nicum asked this question in Q&A
Sep 16, 2021 · 2 comments · 2 replies
Discussion options

I am trying to make a test trades (ETH-token) and all my transactions are confirmed, but I didn't get any tokens, meanwhile ETH is decreasing. On Etherscan transaction action is as follows:
Approved GALA For Trade On Uniswap V3: Router

But as i can see for another transactions (not mine) on etherscan they are as follows:

Swap 70.704005372419088903 UNI For 1,832.075137 USDC On Uniswap V3

So looks like transaction is going to V3 Router but the swap does not take place.
Sorry if this is a stupid question, i am just started investigation crypto.

You must be logged in to vote

try
uniswap.make_trade(eth, gala, int(0.0002*10**18))

Replies: 2 comments · 2 replies

Comment options

Post your code and a couple of tx's. Don't forget to replace your private key with ***********

You must be logged in to vote
1 reply
@ars3nicum
Comment options

from uniswap import Uniswap
address = "*****"
private_key = "******"  
version = 3 # I tried V2 as well
provider = "https://mainnet.infura.io/v3/c4de25213bd342ed97074ea3415175e8"  

uniswap = Uniswap(address=address, private_key=private_key, version=version, provider=provider)

eth = "0x0000000000000000000000000000000000000000"
ftm = "0x4E15361FD6b4BB609Fa63C81A2be19d873717870"
gala = "0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA"

uniswap.make_trade(eth, gala, 0.0002*10**18)

https://etherscan.io/tx/0xa1259e018f2d569fc4ed94fc8b6da34f9c2e6317d9a517c80ec03fa025c94eee
https://etherscan.io/tx/0xfe84cb8dc42835937e6924b2987d0c3149a7592246390fc2880d853d21c5bce0
https://etherscan.io/tx/0x4d8dddcc41078029afccf1b3a364f67741bb1250940ff3be6ffc900a5efd2a61

Comment options

try
uniswap.make_trade(eth, gala, int(0.0002*10**18))

You must be logged in to vote
1 reply
@ars3nicum
Comment options

It worked! Thank you!

Answer selected by ars3nicum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.