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
188 stars 95 forks source link

Invalid from or to address on custom chain? #47

Closed Divide-By-0 closed 2 years ago

Divide-By-0 commented 2 years ago

Both of these addresses definitely exist, but INIT_CODE_HASH on this chan is likely different, so the pair calculation is likely different. Any idea what this error could mean? This is when i make a new UniswapPair and run createFactory on a non-eth chain. I don't have a canonical Multicall address here so I left that blank, is that OK? Or should I deploy my own multicall contract?

joshstevens19 commented 2 years ago

hey if using a custom chain you need to map a custom network

Screenshot at Aug 24 01-24-53

yes you need to deploy a multicall contract if not defined in > https://github.com/joshstevens19/ethereum-multicall

joshstevens19 commented 2 years ago

also you may need to use clonseUniswapContractDetails if you deployed uniswap somewhere else as a fork

Divide-By-0 commented 2 years ago

Yes, I added all of those and deployed my own multi-call contract, and then it passed this step. However, it still says Uniswaperror: excessive input amount, when I try to initiate a trade. Google says I should increase the slippage, but even at 0.80 slippage, it still seems to occur.