How to get a MegaETH RPC endpoint

TL;DR
MegaETH RPC endpoints power real-time applications on MegaETH’s high-throughput L2. With ~10 ms mini-blocks and the Realtime API, infrastructure must handle low-latency queries, rapid event streams, and reliable transaction delivery.

A MegaETH RPC endpoint connects your application to MegaETH’s real-time sequencer. While it uses the standard Ethereum JSON-RPC interface, MegaETH’s ~10 ms blocks and Realtime API require infrastructure optimized for high-frequency queries and streaming workloads.
What is a MegaETH RPC endpoint
A MegaETH RPC endpoint is your application’s gateway to the MegaETH network. It uses the same JSON-RPC interface as Ethereum (eth_call, eth_getBalance, eth_sendRawTransaction) but connects to MegaETH’s real-time sequencer — an Ethereum Layer 2 capable of processing up to 100,000 transactions per second with 10ms mini-block intervals. That speed advantage places unique demands on RPC infrastructure that standard Ethereum tooling was never built to handle.
Every user-facing blockchain action in your product depends on it:
- Reading wallet balances and contract state
- Estimating gas with MegaETH’s custom gas model
- Broadcasting signed transactions via the Realtime API
- Monitoring contract events in real time using
eth_getLogsand filter subscriptions
That is why endpoint quality directly determines user experience. At 10ms block intervals, a single slow RPC query costs you hundreds of missed mini-blocks. If your endpoint is unstable, real-time applications fail in ways that are invisible on slower chains but immediately apparent on MegaETH.
How MegaETH RPC differs from Ethereum RPC
MegaETH runs on top of Ethereum as an L2 rollup, which means the JSON-RPC interface is familiar — but the operating environment is fundamentally different. The table below maps the key distinctions that affect provider selection.
| What | MegaETH | Ethereum |
| Block model | Mini blocks every 10ms + EVM blocks every 1s | ~12 second blocks |
| Throughput | Up to 100,000 TPS | ~15–30 TPS (L1) |
| Gas token | ETH (native, bridged from L1) | ETH |
| Architecture | Ethereum L2 rollup (OP Stack based) | Ethereum L1 |
| Finality | L2 soft finality in ~1s; L1 settlement via Ethereum | ~12 minutes (probabilistic) |
| debug/trace | Unavailable on public endpoints | Generally available |
| Realtime API | Yes — realtime_sendRawTransaction + streaming | No |
| Gas estimation | Use on-chain estimation; local sim may fail | Local simulation reliable |
This is exactly why provider selection for MegaETH must account for Realtime API support, low-latency streaming, and correct gas estimation behavior — not just raw RPS limits.
MegaETH RPC endpoint options
Choosing the right endpoint is a reliability and latency decision. You are balancing convenience, cost, and operational risk at a speed that magnifies every infrastructure gap.
Public vs Private MegaETH RPC endpoints
Official public MegaETH endpoints:
- Mainnet:
https://mainnet.megaeth.com/rpc - Testnet:
https://carrot.megaeth.com/rpc - Rate limits: Dynamic CU + bandwidth limits per user (see MegaETH RPC docs)
- Critical limitation: debug/trace methods are unavailable on all public endpoints
📖 The full RPC method availability list — including restrictions on gas limits and block ranges — is documented in the official MegaETH RPC docs at docs.megaeth.com/rpc.
| Feature | Public RPC | Private RPC (managed provider) |
| Access | Free and open | Authenticated, restricted access |
| Resources | Shared infrastructure | Dedicated or isolated resources |
| Performance | Variable, rate-limited | Stable, high throughput |
| debug/trace | Unavailable | Provider-dependent — verify before committing |
| Realtime API | Available at public endpoint | Provider-dependent |
| WebSocket stability | Limited guarantees | Reliable long-lived connections |
| Best use case | Development and testing | Production workloads |
Public RPC endpoints are suitable for testing and prototyping. For production workloads — especially high-frequency trading, DeFi bots, or real-time analytics — use a managed infrastructure provider with predictable rate limits.
Full node vs Archive MegaETH node
Your data requirements should drive this decision. MegaETH’s 10ms block cadence produces significantly more state than slower chains, which affects archive storage costs and query latency.
| Full node access | Archive node access |
| Current state queries | Historical analytics and backfills |
| Standard wallet and dApp interactions | Explorer-grade products |
| Transaction submission and broadcasting | Deep event backfills via eth_getLogs with wide block ranges |
| Real-time event monitoring | Compliance, reporting, and audit |
| Long-range debugging (where trace methods are available) |
If your product depends on historical state queries or event backfills spanning more than recent blocks, validate archive availability explicitly before launch. MegaETH’s block density means archive nodes carry more data than equivalent Ethereum archives.
HTTPS vs WebSockets
Transport choice has a larger impact on MegaETH than on slower chains because block frequency amplifies the cost of every round trip.
| Feature | HTTPS | WebSocket |
| Model | Request/response | Persistent connection |
| Complexity | Simple to operate | Requires reconnect and heartbeat logic |
| Best for | Standard reads and writes | Real-time streams and subscriptions |
| Latency profile | Per-request overhead | Lower for high-frequency updates |
| Missed event risk | Poll-based, predictable | Requires backfill logic on reconnect |
In practice, most teams use HTTPS for standard contract reads and transaction submission, then layer in WebSocket subscriptions for real-time event delivery. On MegaETH specifically, test WebSocket stability under burst traffic early — mini-block rates generate subscription pressure that is orders of magnitude higher than Ethereum mainnet.
How to get a private MegaETH RPC endpoint with Chainstack

- Log in to the Chainstack console (or create an account)
- Create a new project
- Select MegaETH as your blockchain protocol
- Choose network: MegaETH Mainnet (MegaETH Testnet only for Dedicated Nodes)
- Deploy the node
- Open Access/Credentials and copy your HTTPS and WebSocket endpoints
- Run a quick connectivity check before wiring it into production code
Connect from your application (ethers.js)
const { ethers } = require("ethers");
var urlInfo = {
url: "YOUR_CHAINSTACK_ENDPOINT",
};
var provider = new ethers.providers.JsonRpcProvider(urlInfo, NETWORK_ID);
provider.getBlockNumber().then(console.log);- NETWORK_ID — MegaETH network ID:
- Mainnet:
4326 - Testnet:
6342
- Mainnet:
This confirms your application can connect and read live chain data before integrating more complex logic. Note that MegaETH’s custom gas model means you should always use on-chain gas estimation via the RPC rather than relying on local EVM simulation — some toolchains may throw “intrinsic gas too low” errors without this adjustment.
📖 For a full list of MegaETH-compatible tools including MetaMask, Hardhat, ethers.js, viem, and Foundry, see the Chainstack MegaETH tooling documentation.
Using the Realtime API
MegaETH exposes a custom realtime_sendRawTransaction method on top of standard JSON-RPC. This enables sub-second transaction confirmation paths that are not possible on standard Ethereum endpoints. Check provider availability for this method before building latency-critical flows — it may not be present on all third-party endpoints.
📖 For more information on the MegaETH Realtime API, see the official documentation.
Using Chainlist

Chainlist can quickly add MegaETH to wallets like MetaMask or Rabby by auto-filling the correct RPC URL and chain parameters. This is useful for wallet configuration and end-user onboarding.
Chainlist is not an infrastructure provider. For production applications, always replace any public or community RPC URL from Chainlist with your managed endpoint before launch. Public endpoints obtained through Chainlist carry no uptime guarantees and may not support archive queries or the Realtime API.
Chainstack pricing for MegaETH RPC
Chainstack uses request-unit-based pricing, which is easier to forecast than compute-unit models — especially important on MegaETH, where high TPS can amplify compute-weighted billing unpredictably.
| Plan | Cost | Requests/Month | RPS | Overage (per 1M extra) |
| Developer | $0 | 3M (~25 RPS) | ~25 | $20 |
| Growth | $49 | 20M | ~250 | $15 |
| Pro | $199 | 80M | ~400 | $12.5 |
| Business | $349 | 140M | ~600 | $10 |
| Enterprise | From $990 | 400M+ | Custom | From $5 |
Advanced options:
- Unlimited Node add-on: Flat monthly pricing for unmetered usage within RPS tier
- Dedicated Nodes: From $0.50/hour (+ storage) for isolated high-performance workloads
How to estimate monthly cost
- Forecast average and peak requests per day
- Convert to monthly request units
- Add 20–30% buffer for burst spikes — MegaETH’s high TPS means traffic patterns are more volatile than Ethereum
- Verify that your RPS tier matches peak traffic — 10ms blocks can generate 100x more requests than equivalent Ethereum workloads
- Compare shared tier vs dedicated economics at projected scale
For MegaETH specifically: if your application is latency-critical (trading bots, real-time DeFi, or on-chain gaming), throughput tiers and overage policy matter more than base plan price.
Production readiness checklist
Before launch, validate these controls:
- Primary and fallback RPC provider configured
- Request timeout policy set (MegaETH’s fast blocks mean stale responses age out quickly)
- Retry logic with exponential backoff implemented
- Chain ID validated at startup via
eth_chainId(0x10e6 for mainnet) - Gas estimation routed through RPC, not local simulation
- Credentials stored in environment variables or a secrets manager — never hardcoded
- Monitoring for latency, error rate, and throttling (429 responses)
- Alerts for sustained degradation
eth_getLogsaccess confirmed and block range limits understood- debug/trace method availability verified with provider if needed
These controls prevent the most common RPC incidents in production on MegaETH. The gas model difference is the most frequently missed item for teams migrating from Ethereum.
Troubleshooting common MegaETH RPC issues
| Issue | Likely Cause | How to Fix |
| 429 Too Many Requests | CU or bandwidth limit exceeded on shared endpoint | Move to managed endpoint, reduce polling frequency, batch requests where possible |
| Wrong chain ID returned | Endpoint pointed to wrong network | Validate eth_chainId at startup; fail fast on mismatch |
| “intrinsic gas too low” error | Local gas estimation bypassing MegaEVM | Force on-chain estimation via the RPC; avoid local simulation for gas |
| debug/trace methods return errors | Methods unavailable on public endpoints | Switch to a managed provider with confirmed debug support, or redesign without trace |
| WebSocket disconnects frequently | Mini-block rate overwhelms connection keepalive settings | Add reconnect logic, heartbeat handling, and missed-event backfill on reconnect |
| High latency on real-time flows | Using HTTPS polling instead of WebSocket subscriptions | Switch time-critical paths to WebSocket; use Realtime API for tx submission |
| Realtime API method not found | Provider does not expose realtime_sendRawTransaction | Verify provider supports Realtime API; fall back to eth_sendRawTransaction |
Conclusion
MegaETH’s real-time architecture makes RPC provider selection far more critical than on standard Ethereum L1 or L2 chains. At 10ms block intervals and up to 100,000 TPS, infrastructure gaps that are invisible on slower networks become immediate application failures.
Your provider must support burst traffic, reliable event delivery via eth_getLogs, stable WebSocket connections, correct gas estimation, and ideally the Realtime API for latency-sensitive transaction flows — not just basic JSON-RPC uptime.
Use public endpoints for prototyping, then migrate to managed infrastructure with confirmed MegaETH support and SLA-backed reliability before production launch.
Start with Chainstack, validate your query and gas estimation patterns in staging, then scale to dedicated infrastructure as traffic grows.
FAQ
Yes. MegaETH is EVM-compatible, so ethers.js, web3.js, Hardhat, and MetaMask all work. Point them at a MegaETH RPC endpoint instead of Ethereum. The one significant exception is gas estimation — always use on-chain estimation through the RPC, as local simulation tools may not correctly model MegaEVM’s gas behavior.
The JSON-RPC interface is the same, but MegaETH has 10ms mini-blocks (vs ~12s Ethereum), a unique gas model, unavailable debug and trace methods on public endpoints, and an additional realtime_sendRawTransaction method for ultra-low-latency transaction submission.
Most teams use ethers.js or web3.js. Any SDK supporting the Ethereum JSON-RPC standard works with MegaETH. Configure the provider URL to point to your MegaETH endpoint and set gas estimation to use RPC rather than local simulation.
Yes. MetaMask supports MegaETH as a custom network (Chain ID 4326, native token ETH). Chainlist can add it automatically. For production dApps, wire your frontend to a managed RPC endpoint rather than the public endpoint.
Usually no. Public endpoints have dynamic rate limits, no debug/trace access, no uptime guarantees, and no Realtime API guarantees. Production applications — especially those that need real-time performance — require managed infrastructure.
Track p95/p99 latency, failure rate, 429 responses, WebSocket reconnect frequency, and block lag. For real-time or event-heavy applications, monitor eth_getLogs delivery latency, missed mini-block windows, and gas estimation error rates.




