Logo
RPC Assistant

Polygon Amoy Testnet RPC: Endpoints, Chain Settings, and How to Connect

Summary

Polygon Amoy is the official testnet for Polygon PoS, replacing the deprecated Mumbai network. This article provides the chain settings, public RPC endpoints, and practical guidance for connecting your dApp or wallet, plus tips for choosing a reliable RPC provider for development and testing.

Quick reference: Polygon Amoy chain settings

Before you connect, here are the essential network details for Polygon Amoy. These are the values you'll need when adding the network to a wallet or configuring your dApp.

SettingValue
Network NamePolygon Amoy Testnet
RPC URLhttps://polygon-amoy.drpc.org (public) or your provider's endpoint
Chain ID80002
Currency SymbolPOL
Block Explorerhttps://amoy.polygonscan.com
FaucetPolygon Faucet
Parent ChainEthereum Sepolia

Note: Public RPC endpoints are often rate-limited and may not be suitable for production or heavy testing. For reliable access, consider a dedicated RPC provider like OnFinality.

Why Polygon Amoy matters for developers

Polygon Amoy is the official testnet for Polygon PoS, launched in early 2024 to replace the deprecated Mumbai testnet. It uses Ethereum's Sepolia testnet as its root chain, aligning with Ethereum's testnet strategy. For developers, Amoy provides a low-stakes environment to deploy and test smart contracts, dApps, and infrastructure before going to mainnet.

Because Amoy mirrors Polygon PoS mainnet (chain ID 137), you can test your code with confidence, knowing that the behavior will be similar in production. This is especially important for applications that rely on Polygon-specific features like fast block times (2-3 seconds) and low transaction costs.

How to connect to Polygon Amoy

Connecting to Polygon Amoy is straightforward. You can add it to a wallet like MetaMask or configure your dApp's RPC client. Here are the common methods.

Add to MetaMask

  1. Open MetaMask and click the network dropdown at the top.
  2. Click "Add network" or "Add a network manually."
  3. Enter the following details:
    • Network Name: Polygon Amoy Testnet
    • New RPC URL: https://polygon-amoy.drpc.org (or your provider's endpoint)
    • Chain ID: 80002
    • Currency Symbol: POL
    • Block Explorer URL: https://amoy.polygonscan.com
  4. Click "Save."

Alternatively, you can use a one-click button from services like ChainList, but manual entry is just as easy.

Configure your dApp with ethers.js or viem

If you're building a dApp, you'll need to set the RPC URL and chain ID in your code. Here's an example using ethers.js:

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://polygon-amoy.drpc.org");
const wallet = new ethers.Wallet("YOUR_PRIVATE_KEY", provider);

// Check connection
const network = await provider.getNetwork();
console.log("Connected to chain ID:", network.chainId); // Should be 80002

And with viem:

import { createPublicClient, http } from 'viem';
import { polygonAmoy } from 'viem/chains';

const client = createPublicClient({
  chain: polygonAmoy,
  transport: http('https://polygon-amoy.drpc.org')
});

const blockNumber = await client.getBlockNumber();
console.log("Current block:", blockNumber);

Testing your RPC endpoint

Once you have an RPC URL, you can test it with a simple JSON-RPC call using curl:

curl -X POST https://polygon-amoy.drpc.org \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

A successful response will look like:

{"jsonrpc":"2.0","id":1,"result":"0x2a3f4b"}

The result is the latest block number in hexadecimal. If you get an error, check your endpoint and network connectivity.

Choosing the right RPC provider for Amoy

Public RPC endpoints are convenient for quick tests, but they often have rate limits and can be unreliable under load. For serious development, you should consider a managed RPC provider. Here's a quick comparison to help you decide:

Provider TypeProsCons
Public RPC (e.g., dRPC, publicnode)Free, no signupRate limits, potential downtime, no SLA
Managed RPC (e.g., OnFinality, Alchemy)Higher rate limits, reliable, additional features (archive, WebSockets)Requires API key, may have costs
Dedicated Node (e.g., OnFinality dedicated)Full control, no shared limits, custom configurationMore expensive, requires maintenance

For most development and testing, a managed RPC provider offers the best balance of reliability and cost. OnFinality provides RPC endpoints for Polygon Amoy with generous free tier options and scalable plans. You can check RPC pricing for details.

Common pitfalls and troubleshooting

Even with the right endpoint, you might run into issues. Here are some common problems and how to fix them:

  • Incorrect Chain ID: Make sure you're using 80002 for Amoy, not 137 (mainnet) or 80001 (Mumbai).
  • Rate limiting: If you get 429 errors, you're hitting rate limits. Switch to a provider with higher limits or get an API key.
  • Outdated endpoints: Some old Mumbai endpoints may still be listed online. Always use the official Amoy endpoints from the Polygon docs.
  • Faucet issues: If you can't get test POL, check the Polygon faucet and ensure you're on the correct network.
  • WebSocket connection failures: If you need real-time updates, use the WSS endpoint (e.g., wss://polygon-amoy.drpc.org). Some providers may not support WebSockets on free tiers.

Key Takeaways

  • Polygon Amoy is the official testnet for Polygon PoS, using Sepolia as its root chain.
  • Chain ID is 80002, and the native token is POL.
  • Public RPC endpoints are available but may be rate-limited; consider a managed provider for reliable access.
  • Always test your RPC connection with a simple JSON-RPC call before building on top of it.
  • For production-grade infrastructure, explore OnFinality's RPC services and supported networks.

Frequently Asked Questions

What is the difference between Polygon Amoy and Mumbai?

Amoy is the successor to Mumbai, which was deprecated alongside Goerli. Amoy uses Sepolia as its root chain, while Mumbai used Goerli. Amoy is now the primary testnet for Polygon PoS.

Can I use the same code for Amoy and Polygon mainnet?

Yes, since Amoy is designed to mirror mainnet, most code will work with just a change in the RPC URL and chain ID. However, always test thoroughly as there may be minor differences.

How do I get test POL on Amoy?

Use the official Polygon faucet. You'll need to connect your wallet and request test tokens.

Is there a WebSocket endpoint for Amoy?

Yes, many providers offer WSS endpoints, such as wss://polygon-amoy.drpc.org. Check with your provider for availability.

What should I do if my RPC requests are failing?

First, verify your endpoint and chain ID. Then check for rate limits or network issues. If problems persist, try a different provider or contact your RPC provider's support.

Does OnFinality support Polygon Amoy?

Yes, OnFinality provides public and private RPC endpoints for Polygon Amoy. You can find more details on the Polygon network page.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started