Skip to main content

How to Index MegaEth Data Using Envio

Author:Jordyn LaurierJordyn Laurier··7 min read
Cover Image How to Index MegaEth Data Using Envio
TL;DR
  • MegaETH is a high-performance EVM chain with sub-millisecond block times and 100,000+ TPS, purpose-built for real-time applications that demand scale and speed.
  • Envio supports MegaETH with HyperIndex (full GraphQL indexing), HyperSync (up to 10,000x faster than RPC for historical data), and HyperRPC (standard RPC proxy backed by HyperSync).
  • Oracle Wars, built in under two hours using Envio HyperIndex on MegaETH, demonstrates how quickly developers can build real-time monitoring tools on high-throughput chains.

Envio supports developers and data analysts building on MegaETH with a performant real-time indexing stack designed for high-throughput environments. Get fast, reliable access to both real-time and historical data without the usual bottlenecks.

MegaETH combines sub-millisecond block times with support for over 100,000 transactions per second, built for next-generation applications that demand scale, speed, and reliability. In this blog, we walk through how to index, sync, and query millions of events on MegaETH using Envio.

What is MegaETH?

MegaETH is a high-performance EVM chain purpose-built for real-time applications. It combines sub-millisecond block times with over 100,000 transactions per second, giving developers a foundation to build real-time, responsive, production-grade apps.

Unlike other chains that trade off EVM compatibility for speed, MegaETH keeps your Solidity code, dev tools, and mental models intact. You get Ethereum's programming experience with significantly reduced latency. Whether you are powering data analytics, an onchain game, or a reactive dashboard, MegaETH ensures your stack stays responsive.

Key features

  • Mini Blocks + EVM Blocks: Fast mini-blocks (~10 ms) combined with full EVM block finality offer real-time latency and standard blockchain guarantees.
  • High-Throughput Sequencing + Parallel Execution: MegaETH achieves high TPS through a centralized sequencer architecture and parallel execution across node types.
  • Realtime API Access: The Realtime API surfaces mini-block data via standard JSON-RPC methods, allowing near-instant visibility into state and transaction outcomes.
  • EigenDA-Powered Data Availability: By integrating EigenDA, MegaETH enables scalable, secure data access without burdening Ethereum's onchain storage.
  • Full EVM Support: MegaETH supports Solidity, EIP-1559, EIP-7702, large contract sizes, and existing Ethereum tooling out of the box.

These core features make MegaETH a robust environment for building real-time DeFi, high-frequency trading bots, streaming onchain gaming, and on-demand NFT mints.

How to index data on MegaETH

HyperIndex

A full-featured blockchain indexing framework that transforms onchain events into structured, queryable databases with GraphQL APIs. It offers MegaETH developers a complete indexing solution with schema management and event handling, making data on MegaETH easily accessible and developer-friendly.

Learn more

HyperSync

A high-performance data retrieval layer that gives developers unprecedented access to data on MegaETH. It directly replaces traditional RPC endpoints for raw block data, delivering up to 10,000x faster data access. HyperSync enables rapid and cost-effective retrieval of both real-time and historical blockchain data and can be used directly for custom data pipelines and specialized applications.

Learn more

HyperRPC

A local RPC proxy that supercharges blockchain data access by mapping standard RPC requests to HyperSync's ultra-fast data engine. HyperRPC accepts typical RPC calls and translates them into HyperSync queries, dramatically reducing query time and eliminating the bottlenecks of traditional RPC endpoints.

Learn more

MegaETH moves fast, and your indexing stack should too. Envio gives you the infrastructure to match that speed, so you can build applications that are responsive, reliable, and ready for scale.

Additional features for MegaETH indexers built using Envio

Envio offers a range of advanced capabilities that make it easy to build rich, flexible data pipelines on MegaETH:

  • Flexible language support: Configure your event handling in JavaScript, TypeScript, or ReScript.
  • No-code quickstart: Autogenerate the key boilerplate for an entire indexer project based on single or multiple smart contracts. Deploy within minutes.
  • Multichain support: Aggregate data across multiple networks into a single database and query everything through a unified GraphQL API.
  • Join onchain and off-chain data: Connect indexed blockchain data with off-chain data to create a flexible API that goes beyond simple onchain event logs, such as integrating external NFT metadata.
  • Factory contracts: Automatically register and process events emitted by all child contracts created by a specified factory or dynamic contract.
  • Hosted service: The simplest way to deploy production-ready indexers on MegaETH. A managed service platform for building, hosting, and querying Envio's Indexers with guaranteed uptime and performance service level agreements.

Existing use cases on MegaETH utilizing Envio

Oracle Wars

orcale wars megaeth

Oracle Wars is an experimental dashboard built with Envio's HyperIndex that visualizes real-time oracle behavior on MegaETH. It showcases how push-based oracles like RedStone Bolt behave under live market conditions by tracking heartbeat intervals, deviation thresholds, and latency patterns. The project helps developers understand how oracles operate in volatile environments and the potential risks of delayed or unexpected updates. Built in under two hours, Oracle Wars demonstrates how Envio enables rapid development of real-time monitoring tools on high-throughput chains like MegaETH.

Take a deeper dive in the full Oracle Wars blog.

This is just one of many examples of what Envio is powering in the MegaETH ecosystem. For more, explore the Envio Explorer.

Relevant resources

Frequently asked questions

Does Envio support MegaETH mainnet and testnet?

Yes. Envio HyperSync and HyperIndex support both MegaETH mainnet and testnet. You configure the network in your config.yaml using the appropriate chain ID, and the indexer handles data retrieval automatically.

How fast is HyperSync on MegaETH compared to standard RPC?

HyperSync can deliver up to 10,000x faster historical data retrieval than standard RPC on MegaETH by bypassing the JSON-RPC layer entirely. This means syncing large datasets that would take hours via RPC completes in minutes.

Can I index MegaETH alongside other chains in a single Envio indexer?

Yes. Add MegaETH and any other EVM chains to the networks section of your config.yaml. The indexer processes all chains and exposes a single GraphQL endpoint for all data, making cross-chain queries straightforward from one deployment.

How does Envio handle MegaETH's mini-block architecture?

Envio's HyperSync is designed for high-throughput chains and handles MegaETH's high block frequency efficiently. For indexing purposes, HyperIndex processes full EVM blocks. If you need mini-block granularity, use the MegaETH Realtime API alongside HyperSync for full-block historical data.

Is Envio better than The Graph for MegaETH indexing?

The Graph does not natively support MegaETH. Envio has dedicated HyperSync support for MegaETH and provides the full HyperIndex framework for building GraphQL APIs on MegaETH data. Envio's single-config multichain approach also makes it easier to combine MegaETH data with other EVM chains in one indexer.

Build With Envio

Envio is the fastest independently benchmarked EVM blockchain indexer for querying real-time and historical data. If you are building onchain and need indexing that keeps up with your chain, check out the docs, run the benchmarks yourself, and come talk to us about your data needs.

Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.

Subscribe to our newsletter 💌

Website | X | Discord | Telegram | GitHub | YouTube | Reddit