Skip to content

Local RPC url and chainID are incorrect when creating custom network on MetaMask #34

@platocrat

Description

@platocrat

Summary

Using optimism-integration to create a custom network on MetaMask does not work as expected (as explained in the developer docs).

Explanation of issue

In the developer docs, there is a section with steps to setup the optimism-integration repo. Here's a snapshot of the section I'm referring to:

Screen Shot 2021-03-07 at 7 00 53 PM

Once the containers are running, I tried to connect to either localhost:9545 or localhost:8545, which the docs imply are available to connect. In MetaMask, I try creating a new custom network with the RPC url as http://localhost:9545 and the chainID as 420, but I receive this error instead:

Screen Shot 2021-03-07 at 6 53 50 PM

Steps to Reproduce

  1. Follow the steps under the "[Using the optimism-integration Repo]"(http://community.optimism.io/docs/developers/integration.html#using-the-optimism-integration-repo) to spin up the complete L1/L2 dev environment, and leave the containers running
  2. Try to create a new custom network in MetaMask, using http://localhost:9545 as the "New RPC URL" and 420 as the "Chain ID".
  3. Click "Save"
  4. See the error shown above.

Additional notes

After chatting with @maurelian, he suggested I use http://0.0.0.0:9545, however, when doing so, I get this more helpful error:

Screen Shot 2021-03-07 at 6 55 59 PM

Using that chainID, 31337 lets MetaMask create the custom network, no problem.


@kfichter Wondering if I'm doing something wrong or if there's something missing from the docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions