Introduction to Polygon
Before starting this section, you should have:
- Completed Sections 1–4 of this tutorial
- Basic understanding of EVM wallets and blockchain transactions
- MetaMask or similar wallet extension installed
Learning Objectives
By the end of this section, you will be able to:
- Set up and connect a wallet to the Polygon network (testnet and mainnet)
- Distinguish between native POL tokens and ERC-20 tokens like USDC
- Interact with ERC-20 token contracts on Polygon
- Send USDC transactions on Polygon testnet
- Verify transactions on Polygonscan block explorer
Welcome to Polygon Basics! Over the next three lessons you will assemble a complete transaction workflow on Polygon: create wallets, fund them with test assets, and move both native POL and ERC20 tokens. Each lesson flows step by step so you can focus on the concepts rather than deciphering shorthand.
The Nimiq Wallet supports stablecoins on EVM chains. The concepts you learn here (wallets, providers, POL gas, ERC20) are the foundation for Part 6 where we implement Nimiq‑style gasless transfers with OpenGSN.
Prerequisites & Safety
- Use a fresh test wallet. Don’t reuse mainnet or exchange keys.
- You will add a
PRIVATE_KEYin a.envfile in Lesson 2; no setup is needed yet.- Faucets provide the test tokens you will need later; nothing to do in this introduction.
Terminology
- POL: Polygon’s native token (formerly MATIC). Gas is paid in POL.
- EVM: Ethereum Virtual Machine; the execution environment used by Polygon.
- ERC20: Token standard for fungible tokens (for example, USDC has 6 decimals).
- Provider: An RPC endpoint your code connects to (for example,
https://rpc-amoy.polygon.technology).
Why Polygon?
Polygon is an Ethereum Layer 2 network designed to feel familiar while solving Ethereum’s biggest pain points.
- Same developer experience: It speaks the Ethereum Virtual Machine (EVM), so tools like ethers.js, Hardhat, or MetaMask work without modification.
- Lower transaction costs: Fees are measured in fractions of a cent instead of whole dollars.
- Faster confirmations: Blocks land roughly every two seconds, keeping interactions snappy.
- Ecosystem interoperability: Assets and dApps can bridge between Polygon and Ethereum, so knowledge transfers directly.
Think of Polygon as Ethereum’s faster, more affordable sibling that still shares the family DNA.
Note on Polygon’s Native Token
Polygon’s native token was rebranded from MATIC to POL in 2024.
- On Polygon mainnet: Use POL (contract not applicable; native asset)
- On Polygon testnet (Amoy): Use test POL from the faucet
- In code references: You may see both names in older documentation; they refer to the same asset
This tutorial uses POL throughout.
Meet Polygon Amoy
For this section we use Polygon Amoy, the current Polygon testnet. It mirrors mainnet behavior with valueless test tokens, which makes it ideal for experimentation.
- Network Name: Polygon Amoy Testnet
- Chain ID: 80002
- RPC URL: https://rpc-amoy.polygon.technology
- Block Explorer: https://amoy.polygonscan.com
- Native Token: POL (pays gas fees)
Because test tokens on Amoy are free, you can try ideas, make mistakes, and rerun scripts without worrying about real money.
What You Will Build
By the end of this part, you will have a working toolkit for everyday Polygon development:
Polygon Wallet Setup & Faucets
- Generate an Ethereum-compatible wallet with ethers.js.
- Connect that wallet to Polygon Amoy.
- Collect free POL and USDC from public faucets.
- Read balances programmatically so you can verify funding.
Sending POL Transactions
- Craft and broadcast native POL transfers.
- Inspect gas usage and confirmation receipts.
- Follow the transaction lifecycle on PolygonScan.
ERC20 Tokens & USDC Transfers
- Review the ERC20 interface and why it matters.
- Interact with token contracts through ABIs.
- Send USDC and account for its six decimal places.
Each lesson builds on the previous one, so keep your project files handy as you progress.
Why These Skills Matter
Mastering Polygon translates directly to the broader EVM ecosystem:
- Mainnet Ethereum and Layer 2 networks such as Optimism, Arbitrum, and Base share the same patterns.
- Sidechains like BNB Chain or Avalanche use identical wallet and contract workflows.
- Any project that relies on ethers.js or web3.js expects these fundamentals.
Once you are comfortable on Polygon, you can approach most EVM-based platforms with confidence.
The Demo Script
The code bundled with this lesson is a complete end-to-end walkthrough of everything you will build in Lessons 2-4. The demo runs automatically when you open this lesson—just check the terminal output. Treat it as a living reference:
- Review the terminal to see the final experience in action.
- Copy individual snippets as you implement each step in the subsequent lessons.
- Compare your work against the finished version if you get stuck.
The script demonstrates how to:
- Create a wallet and connect to Polygon Amoy.
- Check POL and USDC balances.
- Send POL to another address.
- Transfer USDC (an ERC20 token) safely.
💡 Heads-up: You will still need faucet funds before the demo shows non-zero balances. Lesson 2 covers that process. Until then, you will see warnings about missing tokens.
What the Demo Shows
- The terminal prints a wallet address and environment details.
- Balances start at zero until you use faucets in Lesson 2.
- You will see warnings about missing tokens; they are expected.
- The editor opens
/index.js. Feel free to skim it; you do not need to change anything in this lesson.
Next Up
Continue to Polygon Wallet Setup & Faucets to create your first Polygon wallet and stock it with testnet tokens.
- npm install
- npm run demo