Cách thêm RPC mạng tùy chỉnh
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.
Ba chữ đầu RPC là viết tắt của gọi hàm từ xa, là một bộ giao thức cho phép một ứng dụng khách (như MetaMask) tương tác với một chuỗi khối. 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.
Alternatively, you can also search for the network to add in the search bar.
-
Nhấn vào công cụ chọn mạng ở trên cùng màn hình. (Alternatively, you can tap the gear icon to access settings, and then go to 'Networks'.)
-
Ở đây bạn sẽ thấy danh sách các mạng bạn đã thêm vào. 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. Tất cả đã hoàn tất!
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'. This will display a list of networks that you've added already.
- Click 'Add a custom network'.
- A screen will appear where you can enter the details of the network you wish to add. Click 'Save' to add the network.
-
Nhấn vào công cụ chọn mạng ở trên cùng màn hình.
-
Tap on "Add Network".
-
Switch to the "Custom networks" tab.
-
Điền thông tin mạng:
After performing the above steps, you can see the custom network in the network selector.
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
Xin lưu ý rằng chúng tôi không duy trì thông tin mạng trên Chainlist. Hãy chắc chắn các thông tin mạng là chính xác trước khi thêm.
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
-
Truy cập trang web Chainlist tại chainid.network.
-
Firstly, you'll need to connect your MetaMask to the site. Để làm vậy, chọn "Kết nối ví" ở trên cùng bên phải.
When successful, the address of our selected account will replace the 'Connect wallet' button:
- Giờ hãy sử dụng thanh tìm kiếm để tìm mạng bạn muốn kết nối. Sau khi đã tìm được, hãy nhấp vào nút "Thêm chuỗi".
- Bản thân MetaMask bây giờ sẽ bắt đầu hoạt động và hiển thị cho bạn một trình đơn chấp thuận. Nhấp vào "Chấp thuận" để thực hiện.
- Tiếp sau hành động này là một trình đơn hỏi xem bạn có muốn chuyển đổi sang mạng mới ngay lập tức hay không. Xác nhận hay từ chối tùy thuộc vào nhu cầu của bạn; dù bạn chọn cái nào, mạng mới cũng sẽ được thêm vào.
-
Truy cập trang web Chainlist bằng Trình duyệt trong ứng dụng MetaMask.
When you're in the browser, you can either tap the address in the menu bar at the top and navigate to https://chainid.network or hit the magnifying glass in the toolbar at the bottom and search from there.
-
On Chainlist, you need to connect your MetaMask. Your currently selected account will be the one that's automatically connected, though you can easily swap by going back to your wallet view, changing the account, and heading back to Chainlist in the browser to connect.
When your wallet is connected, the selected account address will be displayed where the 'Connect wallet' button was.
-
Tiếp theo, hãy tìm mạng bạn muốn kết nối bằng nút tìm kiếm. Khi bạn tìm thấy mạng đó, hãy chạm vào "Thêm chuỗi":
-
Giờ bạn chỉ cần chấp thuận việc thêm mạng này.
Sau đó sẽ có một tùy chọn tiếp theo để xác nhận bạn muốn chuyển đổi sang mạng mới ngay. Bước này không bắt buộc và bạn có thể dễ dàng thay đổi mạng bất cứ lúc nào.