如何添加自定义网络 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.
Adding a popular network
On both Mobile and Extension, you can easily add several networks with just a click. You can find this using the following steps:
- Extension
- Mobile
- Click on the menu in the top right and select 'Networks'.
- Scroll down until you see the 'Additional networks' section and click 'Add' next to the network you wish to add.
或者,您也可以在搜索栏中搜索要添加的网络。
-
点击屏幕顶部的网络选择器。 (或者,您可以点击齿轮图标访问设置,然后转到“网络”。)
-
您将在此处看到已经添加的网络列表。 Tap the "Add Network" button at the bottom of the screen.
-
You should now see a list of networks you can add under the "Popular" tab, as shown below.
-
When you choose to add one of them, you'll be prompted to confirm your selection and then get the option to switch immediately to that network. 全部完成!
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:
- Extension
- Mobile
- Click on the menu in the top right and select 'Networks'. 这将显示您已添加的网络列表。
- Click 'Add a custom network'.
- 将出现一个屏幕,您可以在其中输入要添加的网络的详细信息。 点击“保存”以添加网络。
-
点击屏幕顶部的网络选择器。
-
Tap on "Add Network".
-
Switch to the "Custom networks" tab.
-
填写网络详细信息:
执行上述步骤后,您将能够在网络选择器中看到自定义网络。
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.
- Extension
- Mobile
- Click on the menu in the top right and select 'Networks'.
- Locate the desired network you want to edit and click the 3 dots to edit.
- Select the Default RPC URL dropdown field and click “Add RPC URL”.
- Enter the URL, nickname, and save your configurations.
- Tap the network selector at the top in the middle of your MetaMask to show the list of enabled networks
- Click the 3 dots by the network you want to edit
- Select the Default RPC URL downtown field and click “Add RPC URL”
- Enter the URL, nickname, and click “Add URL” to 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.
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.
- Extension
- Mobile
-
前往 Chainlist 网站:chainid.network。
-
Firstly, you'll need to connect your MetaMask to the site. 选择右上方的“连接钱包”即可。
成功后,我们所选账户的地址将取代“连接钱包”按钮:
- 现在使用搜索栏查找您要连接的网络。 找到后,点击“添加链”按钮。
- MetaMask 将立即自行操作,显示批准菜单。 点击“批准”以继续。
- 之后会出现一个菜单,询问您是否要立即切换到新网络。 根据需要确认或拒绝;无论您做何选择,都将添加新网络。
-
使用 MetaMask 应用内浏览器,前往链列表网站。
在浏览器中,点击顶部菜单栏中的地址,导航至 https://chainid.network/,或点击底部工具栏中的放大镜,然后搜索。
-
On Chainlist, you need to connect your MetaMask. 您当前选择的账户将是自动连接的账户,不过您可以返回钱包视图,改变账户,然后返回浏览器中的 Chainlist 进行连接,便可轻松兑换。
钱包连接后,“连接钱包”按钮所在位置将显示所选账户地址。
-
接下来,通过搜索找到您要连接的网络。 找到网络后,点击“添加链”:
-
现在您只需要批准添加网络。
然后会有一个后续选项,确认您是否要立即切换到新的网络。 这一步是可选的,您可以随时轻松地更改网络。