Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Minimal Multi-Network MetaMask Using Plugins #95

Description

@danfinlay

MetaMask has been tied to a multi-network single-transaction controller architecture for a long time, and there has been a long running initiative to get us to a place where we can support multiple networks for a long time.

What exactly this will look like has been unclear, but given the context of the plugin system, I would like to suggest a new and simple path:

Ethereum by Default, Test Networks as Plugins

  1. We make MetaMask Controller into a one-network thing.
  2. We bundle the network controller and the transaction controller into a shared plugin we call an "Ethereum network plugin", which can have multiple instances with different chain IDs, providers, and block explorers.
  3. These test networks would render their assets alongside other "main net" assets.
  4. This immediately allows connecting to a test-net via plugin, but using an app key instead of the same account per site.
  5. We add a new permission: Permission to provide connection to [Network with Chain ID X](Replace with network name if known). This permission will forward approved transactions to this plugin for transmission to the blockchain, and will forward other RPC calls with that chain_id to that plugin.
  6. At this point, current dapps can simply add a chain_id parameter to any call and interact with any installed EVM chain.
  7. We can then remove the network menu?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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