3

I have created a forked mainnet in Ganache which is working well using the CLI. However I would like to have access to the UNISWAP GUI. If I open Uniswap and change my metamask settings to localhost, it doesn't let me do anything as seen in the photo:

enter image description here

Any ideas on how to make this work?

Thanks

0

First of all, you need to specify the chainId that ganache uses. By default ganache uses 1337 for dev purposes, which is not recognised by Uniswap. Change the chainId to 1 (eth mainnet) (see here for a list of chainIds) E.g. if you're using ganache-cli, try: ganache-cli <your options> --chainId 1

Then, Uniswap should recognise this and let you connect the wallet. If not, edit "Localhost 8545" under the Networks settings in Metamask and replace 1337 with the chainId you want to use (e.g. 1)

Hope this helps!

2
  • 1
    Thanks for the answer. Running --chainId 1 on ganache-cli is giving me: Unknown argument: chainId If I try to change it in metamask, it says Not possible and it gives me the default chainId (1337). Any ideas? Apr 4 at 15:08
  • Which ganache-cli version are you using? Maybe try updating the cli, as the chainId option is "only" available since 7 months ago. On 6.12.2 I can successfully run: ganache-cli --chainId 1
    – mmagician
    Apr 5 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.