Pular para conteúdo principal

Como adicionar uma RPC a uma rede personalizada

Este artigo precisa ser traduzido?

MetaMask can access many more networks than just Ethereum mainnet: you can add any EVM-compatible network directly within your wallet and browse Snaps for additional non-EVM interoperability.

O acrônimo RPC, do inglês “remote procedure call”, quer dizer “chamada de procedimento remoto”, um conjunto de protocolos que permitem que um cliente (como a MetaMask) interaja com uma blockchain. 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.

observação

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 the network dropdown selector.

On both Mobile and Extension, you can easily add several prominent networks with just a click. Elas incluem:

  • Arbitrum.
  • Avalanche
  • BNB Chain/BSC
  • Base
  • Optimism
  • Polygon
  • zkSync Era

You can find this using the following steps:

From the homepage of your wallet, click on the network selector in the top left. Scroll down until you see the 'Additional networks' section. Alternatively, you can also search for the network to add in the search bar.

Tap the "Add" button next to the network to add it to your MetaMask instance.

MetaMask additional networks
modal

Network switching

MetaMask is in the process of improving the networking switching experience. As of v12.0, you will no longer have to manually switch between networks while connected to multiple dapps at the same time. This feature is currently available in Extension only.

Adicionando uma rede manualmente

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

  1. Clique no botão seletor de rede. Isso exibirá uma lista de redes que você já adicionou.

  2. Click "Add custom network":

    MetaMask add network
extension

  3. A screen will appear where you can enter the details of the network you wish to add. Click "Save" to add the network.

    MetaMask additional networks
modal

Os detalhes dos campos acima podem ser encontrados em nossos perfis de rede, documentação (ou seja, documentação do desenvolvedor) ou guias de instruções para cada rede. Por exemplo:

Depois de seguir os passos acima, a rede personalizada será exibida da próxima vez que acessar o seletor de rede.

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 the network icon in the top left of your wallet to show the list of enabled networks.
  2. Locate the desired network you want to edit and click the 3 dots to edit.

MetaMask edit existing network
RPC

  1. Select the Default RPC URL dropdown field and click “Add RPC URL”.
  2. Enter the URL, nickname, and save your configurations.

MetaMask add RPC URL

You can now toggle between various RPC URLs directly from the network drop-down selector 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.

Adicionando via Chainlist

Para uma forma fácil de adicionar redes à MetaMask, acesse chainid.network, onde é possível conectar a MetaMask e adicionar redes com apenas alguns cliques. Consulte nosso guia para obter mais informações.

Além disso, observe que adicionar uma rede em um dispositivo não significa que ela será exibida em outro dispositivo ao acessar a mesma conta. If you add it on Extension, it will not automatically be added to your MetaMask Mobile app yet, and vice versa.

As redes personalizadas também precisarão ser adicionadas novamente se você desinstalar a extensão de navegador ou o app (depois disso será preciso restaurar sua carteira usando a frase de recuperação secreta).