joshstevens19 / simple-uniswap-sdk

Uniswap SDK which handles the routes automatically for you, changes in trade quotes reactive subscriptions, exposure to formatted easy to understand information, bringing back the best trade quotes automatically, generating transactions for you and much more.
MIT License
189 stars 94 forks source link

not working on goerli test network? #3

Closed ctrngk closed 3 years ago

ctrngk commented 3 years ago

const uniswapPair = new UniswapPair({ fromTokenContractAddress: '0xf74a5ca65e4552cff0f13b116113ccb493c580c5', toTokenContractAddress: '0x2ac3c1d3e24b45c6c310534bc2dd84b5ed576335', chainId: ChainId.GÖRLI, ... }) which returns

UniswapError: invalid from or to contract tokens

Those goerli tokens are from https://explorer.bitquery.io/goerli/tokens which should be valid

joshstevens19 commented 3 years ago

Hey thanks for raising it, I have now made this support goerli just so you know your query will now return

UnhandledPromiseRejectionWarning: UniswapError: No routes found for 0xf74a5ca65E4552CfF0f13b116113cCb493c580C5 > 0x2aC3c1d3e24b45c6C310534Bc2Dd84B5ed576335 < but that's a normal error from the lib it can not found any route paths to take you so make sure the tokens you are querying all have pools to weth!

simple-uniswap-sdk@2.2.0 holds the fix