Add Polygon Networks to MetaMask Wallet
This guide covers configuring the MetaMask wallet to support both Polygon mainnet and testnet (Amoy) networks.
This process requires the use of the MetaMask browser extension.
Step 1: Open MetaMask Network settings
Navigate to the Settings
tab in MetaMask:
Next, navigate to the Networks
tab and click on Add a network
:
Step 2: Add the Polygon Network Details
Click on Add a network manually
:
Fill in the network configuration for the Polygon network as required and click Save
.
Field Name | Polygon Mainnet | Polygon Testnet (Amoy) |
---|---|---|
Network Name | Polygon | Amoy |
RPC URL | https://polygon-rpc.com | https://polygon-amoy.infura.io/v3/your_infura_api_key |
Public RPC URL | https://rpc-mainnet.matic.network | https://rpc-amoy.polygon.technology/ |
Chain ID | 137 | 80002 |
Currency Symbol | Matic | Matic |
Block Explorer URL | https://polygonscan.com | https://amoy.polygonscan.com |
Note on Public RPC URL
You can use either RPC URL or Public RPC URL from the above table for the 'New RPC Url' field in MetaMask. Note that Public RPC URLs are suited only for testing. They are publicly known and often go down, so it's better to get your own API keys of web3 service provider like infura to interact with the blockchains.
Step 3: Save the Settings
Click the Save
button at the bottom of the screen to add the Polygon network to MetaMask:
How to get API key from Infura
Step 1: Navigate to Infura
Navigate to infura.io.
And Sign up for a free account or log in to your existing account. Infura will automatically generate the My First Key API
key for new users.
Click the API Key.
Step 2: Enable Amoy
Enable AMOY
from list of networks and click SAVE CHANGES
.
Step 3: Copy API Key
Click the icon ( highlighted with red border ), to copy the API Key.
Now that you have the API Key, you can add it into your MetaMask. You can refer to the guide above.