Polygon zkEVM — zk Rollup with Full EVM Equivalence
Polygon zkEVM RPC
With Dwellir, you get access to our global Polygon zkEVM network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Why Build on Polygon zkEVM?
Polygon zkEVM delivers an Ethereum-equivalent developer experience secured by zero-knowledge proofs. Deploy Solidity contracts without modification and inherit Ethereum mainnet security with significantly lower fees.
⚙️ Bytecode-Level EVM Equivalence
- Works with existing Solidity contracts, tooling, and libraries
- No need to recompile or rewrite for a custom VM
- Supports the full Ethereum RPC surface area and opcodes
🔐 Ethereum-Level Security with zk Proofs
- Validity proofs posted to Ethereum mainnet
- Fast finality on L2, trust-minimized settlement on L1
- Permissionless prover network roadmap
🚀 Scalable & Cost Efficient
- Typical gas fees measured in cents
- Execution integrity enforced by ZK validity proofs
- Compatible with EIP-1559 fee markets
Quick Start
🔗 RPC Endpoints
https://api-polygon-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY
Quick Connect:
curl -X POST https://api-polygon-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
- Mainnet Chain ID: 1101 (0x44D)
- Testnet (Cardona) Chain ID: 1442 (0x5A2)
- Native Token: ETH (bridged)
- Average Block Time: ~2 seconds
Installation & Setup
- ethers.js v6
- web3.js
- viem
- web3.py
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-polygon-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY');
const { chainId } = await provider.getNetwork();
console.log('Polygon zkEVM chain ID:', chainId); // 1101n
const gasPrice = await provider.getGasPrice();
console.log('Current gas price (wei):', gasPrice.toString());
import Web3 from 'web3';
const web3 = new Web3('https://api-polygon-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY');
const latest = await web3.eth.getBlockNumber();
console.log('Latest Polygon zkEVM block:', latest);
const balance = await web3.eth.getBalance('0x000000000000000000000000000000000000dead');
console.log('Balance:', web3.utils.fromWei(balance, 'ether'), 'ETH');
import { createPublicClient, defineChain, http } from 'viem';
const polygonZkEvm = defineChain({
id: 1101,
name: 'Polygon zkEVM',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://api-polygon-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY'] }
}
});
const client = createPublicClient({ chain: polygonZkEvm, transport: http() });
const block = await client.getBlock({ blockTag: 'latest' });
console.log('Block gas used:', block.gasUsed);
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://api-polygon-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY'))
assert w3.is_connected()
print('Chain ID:', w3.eth.chain_id)
tx_count = w3.eth.get_transaction_count('0x0000000000000000000000000000000000000000')
print('Nonce:', tx_count)
Available JSON-RPC Methods
Polygon zkEVM is EVM-equivalent, so the same Ethereum JSON-RPC surface applies. Method guides will be added here—meanwhile, reference the standard Ethereum docs via the dropdown below.
Available JSON-RPC Methods
📊 Reading Blockchain Data
Query blocks, transactions, and account states
📤 Sending Transactions
Submit and manage transactions
📝 Smart Contract Interaction
Call and interact with smart contracts
🔧 Node & Network Info
Query node status and network information
Ready to ship zk-verified dApps on Polygon zkEVM?
Get your API key →Network Architecture
- zk Rollup: Batches of L2 transactions are proven via zero-knowledge validity proofs and posted to Ethereum.
- Sequencer: Aggregates transactions, provides instant L2 finality, and publishes batches to L1.
- Bridge Contract: Handles deposits/withdrawals between Ethereum and Polygon zkEVM through smart contracts.
- Prover: Generates zk-SNARK proofs for each batch to verify computation integrity on Ethereum.
Bridging Assets
- Official Bridge: bridge.zkevm-rpc.com
- Deposit Flow: Users deposit ETH or ERC-20 tokens on Ethereum; assets are credited on Polygon zkEVM after inclusion in a batch.
- Withdrawal Flow: Users initiate L2 withdrawals, proofs are generated, and funds are released on Ethereum after the challenge period.
Tooling & Ecosystem
- Explorer: zkevm.polygonscan.com
- Testnet Explorer: cardona-zkevm.polygonscan.com
- Bridge UI: bridge.zkevm-rpc.com
- Node Docs: docs.polygon.technology/zkEVM
- Faucet (Cardona): faucet.polygon.technology
Best Practices
- Monitor Finality — Treat L2 confirmations as instant for UX, but wait for L1 finalization for large transfers.
- Handle Fee Volatility — Gas is denominated in ETH; fetch
eth_maxPriorityFeePerGas
andeth_feeHistory
to set fees dynamically. - Use Deterministic Deployments — Because zkEVM preserves Ethereum semantics, CREATE2 works identically for predictable addresses.
- Plan for Withdrawals — Communicate the typical withdrawal finality window (~60 minutes once proven) to end users.
Resources & Support
Build with confidence on Polygon zkEVM using Dwellir's globally distributed infrastructure.