跳至主内容

如何添加自定义网络 RPC

MetaMask can access many more networks than just Ethereum mainnet: you can add any EVM-compatible network directly within your MetaMask, create Solana accounts, and browse non-EVM networks through Snaps.

首字母缩略词 RPC 代表远程过程调用,这是一组协议,可让客户端(例如 MetaMask)与区块链交互。 You can add multiple RPC URLs for a single network and edit the default RPC URL from your list of networks in both Extension and Mobile settings.

备注

Adding a custom RPC URL will disable Smart Transaction capabilities. To re-enable this, you'll need to switch back to the default RPC URL from network settings.

On both Mobile and Extension, you can easily add several networks with just a click. You can find this using the following steps:

  1. Click on the menu in the top right and select 'Networks'.

MetaMask extension locate networks menu

  1. Scroll down until you see the 'Additional networks' section and click 'Add' next to the network you wish to add.

MetaMask extension add network

或者,您也可以在搜索栏中搜索要添加的网络。

MetaMask extension search for network to add

Adding a network manually

If you don’t see a desired network in the list, you can follow these instructions to establish the network connection manually:

  1. Click on the menu in the top right and select 'Networks'. 这将显示您已添加的网络列表。

MetaMask extension locate networks menu

  1. Click 'Add a custom network'.

MetaMask extension add a custom network button

  1. 将出现一个屏幕,您可以在其中输入要添加的网络的详细信息。 点击“保存”以添加网络。

MetaMask extension add a custom network form

Adding or editing RPC URLs

You can add multiple RPC URLs for a single network and edit the default RPC URL from your list of networks in both Extension and Mobile settings.

  1. Click on the menu in the top right and select 'Networks'.

MetaMask extension locate networks menu

  1. Locate the desired network you want to edit and click the 3 dots to edit.

MetaMask extension edit existing network

  1. Select the Default RPC URL dropdown field and click “Add RPC URL”.

MetaMask extension RPC URL dropdown

  1. Enter the URL, nickname, and save your configurations.

You can now toggle between various RPC URLs when you want to switch providers. To delete any RPC URL, follow the same steps above and click on the trash bin icon to delete.

Networks across devices

Adding a network on one device does not mean it will appear on another device when accessing the same account. If you add it on Extension, it will not automatically be added to your MetaMask Mobile app yet, and vice versa.

Custom networks will also need to be re-added if you uninstall the browser extension or mobile app (after which you'd need to restore your wallet using your Secret Recovery Phrase).

Adding via Chainlist

请注意,我们并不维护 Chainlist 上的网络信息。 添加网络之前,请确保网络详情准确无误。

For another way of adding networks to MetaMask, go to chainid.network, where you can connect MetaMask and add networks with a few clicks.

  1. 前往 Chainlist 网站:chainid.network

  2. Firstly, you'll need to connect your MetaMask to the site. 选择右上方的“连接钱包”即可。

Chainlist connect wallet button

成功后,我们所选账户的地址将取代“连接钱包”按钮:

Chainlist connected wallet address button

  1. 现在使用搜索栏查找您要连接的网络。 找到后,点击“添加链”按钮。

Chainlist add chain button

  1. MetaMask 将立即自行操作,显示批准菜单。 点击“批准”以继续。

MetaMask add new network from chainlist approval

  1. 之后会出现一个菜单,询问您是否要立即切换到新网络。 根据需要确认或拒绝;无论您做何选择,都将添加新网络。
Was this helpful?
Connect MetaMask to provide feedback
What is this?
This is a trial feedback system that uses Verax to record your feedback as onchain attestations on Linea Mainnet. When you vote, submit a transaction in your wallet.