-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call revert exception - method="getAmountsOut(uint256,address[]) #13
Comments
@lucashenning which network are you targeting? Here are the mainnet addresses for the tokens you mentioned: |
Hi @thegostep, Sorry I forgot to mention I'm using ropsten. The swap works in the uniswap UI (on ropsten with the addresses that I posted). |
ah - there is no uniswap pair contract deployed for USDC-DAI on ropsten you can see here: https://ropsten.etherscan.io/address/0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f#readContract you will need to deploy the pair and add liquidity for the the system to work lmk if you have any other qs |
Hm, interesting... I see what you mean, The two addresses that I posted do work in the UI, though. Here's a successful ropsten tx using those addresses: https://ropsten.etherscan.io/tx/0xb77126b28ca32855f467a086b54818c35fa21859dad8b7a33a49dcdd2dd540d4 I'm using these addresses (works in the UI but not in the code):
I must be missing something. Any ideas? |
The package does not currently support routing through a third token |
Thank you! That makes a ton of sense! Any plans on adding this feature? |
definitely - the hold up is that there is no easy way to calculate routes, it requires some kind of path finding algo using the liquidity in each pool - lots of calls! |
@thegostep can you please explain your idea on the path finding algo? Why did you say "using liquidity in each pool" instead of just getting the price? |
First off, thanks for this great helper library! It saves a ton of time and effort when it comes to interacting with the uniswap sdk. I'm trying to swap from USDC to DAI on ropsten and everything is working fine when I submit the transaction manually, however, I'm getting a contract call error from the
getAmountsOut()
function in the uniswap contract.Here are the addresses that I'm using:
This is the error:
Seems like the
getAmountsOut()
function in the uniswap contract is throwing. Any idea what might be causing this issue?The text was updated successfully, but these errors were encountered: