Develops on Polygon's multi-chain ecosystem: PoS sidechain, zkEVM rollup, AggLayer interop, POL token migration, and bridging.
Ships in polygon. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build on Polygon's multi-chain ecosystem: PoS sidechain for low-cost EVM transactions, zkEVM for Ethereum-equivalent ZK rollups, and AggLayer for unified cross-chain interop.
# viem for TypeScript interaction
npm install viem
# Foundry for Solidity deployment
curl -L https://foundry.paradigm.xyz | bash
foundryup
# .env
PRIVATE_KEY=your_private_key_here
POLYGONSCAN_API_KEY=your_polygonscan_key
POLYGON_RPC_URL=https://polygon-rpc.com
ZKEVM_RPC_URL=https://zkevm-rpc.com
| Property | Value |
|---|---|
| Chain ID | 137 |
| Currency | POL (18 decimals) |
| EVM Version | Shanghai |
| Block Time | ~2 seconds |
| Consensus | PoS + Heimdall (Tendermint BFT) |
| Checkpointing | Every ~30 min to Ethereum |
| Block Gas Limit | 30M |
| URL | Provider | Notes |
|---|---|---|
https://polygon-rpc.com | Polygon Labs | Default public |
https://rpc.ankr.com/polygon | Ankr | Public, rate limited |
https://polygon.llamarpc.com | LlamaNodes | Public |
https://polygon-mainnet.g.alchemy.com/v2/<KEY> | Alchemy | Authenticated |
https://polygon-mainnet.infura.io/v3/<KEY> | Infura | Authenticated |
| Explorer | URL |
|---|---|
| Polygonscan | https://polygonscan.com |
| Blockscout | https://polygon.blockscout.com |
| OKLink | https://www.oklink.com/polygon |
| Property | Value |
|---|---|
| Chain ID | 1101 |
| Currency | ETH (18 decimals) |
| ZK Type | Type-2 ZK-EVM |
| Block Time | Variable (~5-10 seconds) |
| Proof Time | ~30 min to finalize on L1 |
| Sequencer | Centralized (Polygon Labs) |
| URL | Provider | Notes |
|---|---|---|
https://zkevm-rpc.com | Polygon Labs | Default public |
https://rpc.ankr.com/polygon_zkevm | Ankr | Public |
https://polygonzkevm-mainnet.g.alchemy.com/v2/<KEY> | Alchemy | Authenticated |
| Explorer | URL |
|---|---|
| zkEVM Explorer | https://zkevm.polygonscan.com |
| Blockscout | https://zkevm.blockscout.com |
| Network | Chain ID | Currency | Faucet |
|---|---|---|---|
| Amoy (PoS testnet) | 80002 | POL | https://faucet.polygon.technology |
| Cardona (zkEVM testnet) | 2442 | ETH | https://faucet.polygon.technology |
| Network | URL |
|---|---|
| Amoy | https://rpc-amoy.polygon.technology |
| Cardona | https://rpc.cardona.zkevm-rpc.com |
# Deploy to Polygon PoS mainnet
forge create src/MyContract.sol:MyContract \
--rpc-url https://polygon-rpc.com \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
--verifier-url https://api.polygonscan.com/api \
--etherscan-api-key $POLYGONSCAN_API_KEY
# Deploy to Amoy testnet
forge create src/MyContract.sol:MyContract \
--rpc-url https://rpc-amoy.polygon.technology \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
--verifier-url https://api-amoy.polygonscan.com/api \
--etherscan-api-key $POLYGONSCAN_API_KEY
# Deploy to zkEVM mainnet
forge create src/MyContract.sol:MyContract \
--rpc-url https://zkevm-rpc.com \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
--verifier-url https://api-zkevm.polygonscan.com/api \
--etherscan-api-key $POLYGONSCAN_API_KEY
// hardhat.config.ts
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
polygon: {
url: process.env.POLYGON_RPC_URL || "https://polygon-rpc.com",
accounts: [process.env.PRIVATE_KEY!],
chainId: 137,
},
amoy: {
url: "https://rpc-amoy.polygon.technology",
accounts: [process.env.PRIVATE_KEY!],
chainId: 80002,
},
zkevm: {
url: process.env.ZKEVM_RPC_URL || "https://zkevm-rpc.com",
accounts: [process.env.PRIVATE_KEY!],
chainId: 1101,
},
cardona: {
url: "https://rpc.cardona.zkevm-rpc.com",
accounts: [process.env.PRIVATE_KEY!],
chainId: 2442,
},
},
etherscan: {
apiKey: {
polygon: process.env.POLYGONSCAN_API_KEY!,
polygonAmoy: process.env.POLYGONSCAN_API_KEY!,
polygonZkEVM: process.env.POLYGONSCAN_API_KEY!,
},
},
};
export default config;
# Verify on Polygonscan (PoS)
forge verify-contract <ADDRESS> src/MyContract.sol:MyContract \
--chain-id 137 \
--verifier-url https://api.polygonscan.com/api \
--etherscan-api-key $POLYGONSCAN_API_KEY
# Verify on zkEVM explorer
forge verify-contract <ADDRESS> src/MyContract.sol:MyContract \
--chain-id 1101 \
--verifier-url https://api-zkevm.polygonscan.com/api \
--etherscan-api-key $POLYGONSCAN_API_KEY
Polygon PoS is a commit chain (sidechain) with its own validator set:
RootChain contract every ~30 minutes. This provides data availability, NOT execution validity.ValidatorShare contracts.| Contract | Address | Purpose |
|---|---|---|
| RootChain | 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287 | Checkpoint submission |
| StateSender | 0x28e4F3a7f651294B9564800b2D01f35189A5bFbE | L1 -> L2 state sync |
| StakeManager | 0x5e3Ef299fDDf15eAa0432E6e66473ace8c13D908 | Validator staking |
| RootChainManager | 0xA0c68C638235ee32657e8f720a23ceC1bFc77C77 | Bridge deposits |
| POL Token | 0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6 | Native token (Ethereum) |
| MATIC Token | 0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0 | Legacy token (Ethereum) |
Last verified: 2025-12-01
| Contract | Address | Purpose |
|---|---|---|
| ChildChainManager | 0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa | Bridge withdrawals |
| WPOL (Wrapped POL) | 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270 | Wrapped native token |
| WETH | 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619 | Wrapped Ether |
| USDC | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 | Native USDC |
| USDC.e | 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 | Bridged USDC |
Last verified: 2025-12-01
Polygon zkEVM is a Type-2 ZK-EVM rollup. It aims for full EVM equivalence, meaning standard Solidity contracts deploy without modification in most cases.
PolygonZkEVM contract.| State | Meaning | Time |
|---|---|---|
| Trusted | Sequencer included it | Seconds |
| Virtual | Batch posted to L1 | Minutes |
| Consolidated | ZK proof verified on L1 | ~30 min to hours |
zkEVM targets full EVM equivalence but some edge cases differ:
DIFFICULTY / PREVRANDAO opcode returns 0 (no randomness source like Ethereum beacon chain)SELFDESTRUCT is disabled (per EIP-6049 deprecation)ecAdd, ecMul, ecPairing behave identically; modexp may have higher gas costsBLOCKHASH only returns hashes for the last 256 blocks (same as Ethereum spec, but be aware proof timing may affect behavior)Gas on zkEVM is paid in ETH. The cost includes:
import { createPublicClient, http } from "viem";
import { polygonZkEvm } from "viem/chains";
const zkEvmClient = createPublicClient({
chain: polygonZkEvm,
transport: http("https://zkevm-rpc.com"),
});
const gasPrice = await zkEvmClient.getGasPrice();
const estimatedGas = await zkEvmClient.estimateGas({
account: "0xYourAddress",
to: "0xRecipient",
value: 0n,
data: "0x...",
});
const totalCostWei = gasPrice * estimatedGas;
POL replaced MATIC as Polygon's native token via a migration contract on Ethereum.
The migration is 1:1. Call the migration contract on Ethereum:
import { createWalletClient, http, parseAbi } from "viem";
import { mainnet } from "viem/chains";
// Migration contract on Ethereum
// Converts MATIC -> POL at 1:1 ratio
const MIGRATION_CONTRACT = "0x29e7DF7b6c1264C3F63e2E7bB27143EeB8A05fe3" as const;
const migrationAbi = parseAbi([
"function migrate(uint256 amount) external",
"function unmigrate(uint256 amount) external",
]);
const MATIC_TOKEN = "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0" as const;
const POL_TOKEN = "0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6" as const;
// Step 1: Approve MATIC spend
// Step 2: Call migrate()
POL is staked on Ethereum via the StakeManager contract. Delegators use ValidatorShare contracts:
import { parseAbi } from "viem";
const validatorShareAbi = parseAbi([
"function buyVoucher(uint256 _amount, uint256 _minSharesToMint) external returns (uint256)",
"function sellVoucher_new(uint256 claimAmount, uint256 maximumSharesToBurn) external",
"function restake() external returns (uint256, uint256)",
"function withdrawRewards() external",
"function getLiquidRewards(address user) external view returns (uint256)",
"function getTotalStake(address user) external view returns (uint256, uint256)",
]);
AggLayer (Aggregation Layer) is Polygon's vision for unifying multiple chains under a single ZK-proven interop layer.
networkId.┌──────────────────────────────────────────────┐
│ Ethereum │
│ ┌─────────────────────────────────────────┐ │
│ │ Unified Bridge Contract │ │
│ │ (shared by all AggLayer chains) │ │
│ └─────────────────────────────────────────┘ │
│ ▲ ▲ ▲ │
│ Proofs│ Proofs│ Proofs│ │
│ │ │ │ │
│ ┌──────┴──────────────┴─────────────┴──────┐ │
│ │ AggLayer │ │
│ │ (pessimistic proof verification) │ │
│ └──────┬──────────────┬─────────────┬──────┘ │
└─────────┼──────────────┼─────────────┼────────┘
│ │ │
┌──────┴──┐ ┌──────┴──┐ ┌─────┴───┐
│ PoS │ │ zkEVM │ │ CDK │
│ Chain │ │ Chain │ │ Chain │
└─────────┘ └─────────┘ └──────────┘
The PoS bridge uses RootChainManager (Ethereum) and ChildChainManager (Polygon PoS).
Deposit (Ethereum -> Polygon PoS):
RootChainManager's ERC20PredicateRootChainManager.depositFor(user, rootToken, depositData)Withdraw (Polygon PoS -> Ethereum):
0x0 or call burn function)RootChainManager.exit(burnTxProof) on Ethereumimport { createWalletClient, http, parseAbi, encodePacked } from "viem";
import { mainnet, polygon } from "viem/chains";
const ROOT_CHAIN_MANAGER = "0xA0c68C638235ee32657e8f720a23ceC1bFc77C77" as const;
const ERC20_PREDICATE = "0x40ec5B33f54e0E8A33A975908C5BA1c14e5BbbDf" as const;
const rootChainManagerAbi = parseAbi([
"function depositFor(address user, address rootToken, bytes calldata depositData) external",
"function exit(bytes calldata inputData) external",
]);
// depositData is ABI-encoded amount
// encodePacked would be wrong here -- use encodeAbiParameters
import { encodeAbiParameters, parseAbiParameters } from "viem";
const depositData = encodeAbiParameters(
parseAbiParameters("uint256"),
[1000000n] // amount in token's smallest unit
);
The zkEVM uses the LxLy bridge contract (also used by AggLayer chains).
Bridge Asset (L1 -> zkEVM):
const ZKEVM_BRIDGE = "0x2a3DD3EB832aF982ec71669E178424b10Dca2EDe" as const;
const bridgeAbi = parseAbi([
"function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes calldata permitData) external payable",
"function claimAsset(bytes32[32] calldata smtProofLocalExitRoot, bytes32[32] calldata smtProofRollupExitRoot, uint256 globalIndex, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes calldata metadata) external",
]);
// networkId 0 = Ethereum mainnet
// networkId 1 = Polygon zkEVM mainnet
Claiming on Destination:
After the bridge transaction is included and proof is generated, call claimAsset on the destination chain with the Merkle proof from the bridge API.
// Polygon PoS bridge API
const POS_BRIDGE_API = "https://proof-generator.polygon.technology/api/v1";
// Check if checkpoint included (for PoS withdrawals)
const checkpointStatus = await fetch(
`${POS_BRIDGE_API}/matic/block-included/${blockNumber}?networkType=mainnet`
);
// zkEVM bridge API
const ZKEVM_BRIDGE_API = "https://bridge-api.zkevm-rpc.com";
// Get bridge deposit status
const depositStatus = await fetch(
`${ZKEVM_BRIDGE_API}/bridges/${depositAddress}?offset=0&limit=25`
);
// Get Merkle proof for claiming
const merkleProof = await fetch(
`${ZKEVM_BRIDGE_API}/merkle-proof?deposit_cnt=${depositCount}&net_id=${networkId}`
);
import { createPublicClient, http } from "viem";
import { polygon } from "viem/chains";
const posClient = createPublicClient({
chain: polygon,
transport: http("https://polygon-rpc.com"),
});
const gasPrice = await posClient.getGasPrice();
const block = await posClient.getBlock();
// block.baseFeePerGas gives current base fee
| Protocol | Category | Notes |
|---|---|---|
| QuickSwap | DEX | Largest Polygon-native DEX, UniV3-style |
| Aave V3 | Lending | Major lending market on Polygon |
| Uniswap V3 | DEX | Deployed on PoS |
| Balancer | DEX | Multi-token pools |
| Curve | DEX | Stablecoin DEX |
| 0x / Matcha | Aggregator | DEX aggregation |
| Polymarket | Prediction | Largest prediction market (on PoS) |
| Service | Purpose |
|---|---|
| Polygonscan | Block explorer and verification |
| The Graph | Subgraph indexing (PoS + zkEVM) |
| Chainlink | Oracle feeds on PoS and zkEVM |
| Gelato | Automation and relaying |
| Polygon CDK | Chain Development Kit for custom chains |
| Feature | Polygon PoS | Polygon zkEVM | Ethereum |
|---|---|---|---|
| Chain ID | 137 | 1101 | 1 |
| Gas Token | POL | ETH | ETH |
| Consensus | Tendermint BFT | ZK rollup | PoS (Casper) |
| Block Time | ~2s | ~5-10s | ~12s |
| Finality | ~30 min (checkpoint) | ~30 min (proof) | ~13 min |
| Security Model | Own validators | Ethereum (ZK proof) | Native |
| EVM Compat | Full | Type-2 ZK-EVM | Native |
| Gas Cost | Very low | Low-medium | High |
| Decentralization | ~100 validators | Centralized sequencer | ~900k validators |
import { defineChain } from "viem";
// Polygon PoS (built into viem)
import { polygon } from "viem/chains";
// Polygon zkEVM (built into viem)
import { polygonZkEvm } from "viem/chains";
// Amoy testnet (built into viem)
import { polygonAmoy } from "viem/chains";
// Cardona testnet (may need manual definition)
const polygonZkEvmCardona = defineChain({
id: 2442,
name: "Polygon zkEVM Cardona",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.cardona.zkevm-rpc.com"] },
},
blockExplorers: {
default: { name: "Blockscout", url: "https://cardona-zkevm.polygonscan.com" },
},
testnet: true,
});
polygon/
├── SKILL.md # This file
├── examples/
│ ├── deploy-contract/ # Deployment to PoS and zkEVM
│ ├── bridge-tokens/ # PoS bridge and LxLy bridge
│ ├── zkevm-patterns/ # zkEVM-specific patterns
│ └── pol-staking/ # POL staking and delegation
├── resources/
│ ├── contract-addresses.md # All key addresses
│ └── error-codes.md # Common errors
├── docs/
│ └── troubleshooting.md # Common issues and fixes
└── templates/
└── polygon-client.ts # Starter template
docs/troubleshooting.md (opens in a new tab)examples/bridge-tokens/README.md (opens in a new tab)examples/deploy-contract/README.md (opens in a new tab)examples/pol-staking/README.md (opens in a new tab)examples/zkevm-patterns/README.md (opens in a new tab)resources/contract-addresses.md (opens in a new tab)resources/error-codes.md (opens in a new tab)templates/polygon-client.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 plugins ship this exact skill · first indexed Jul 19, 2026
Other plugins' skills for the same job
/polygon:polygonfrom polygon
npx claudepluginhub naruto11eth/cryptoskills --plugin polygon