<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Envio</title>
    <description>The latest articles on DEV Community by Envio (@envio).</description>
    <link>https://dev.to/envio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1208820%2F6d83bf5b-2025-4bab-a10e-7b023a7813c2.png</url>
      <title>DEV Community: Envio</title>
      <link>https://dev.to/envio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/envio"/>
    <language>en</language>
    <item>
      <title>Indexing and Reorgs</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:42:41 +0000</pubDate>
      <link>https://dev.to/envio/indexing-and-reorgs-432d</link>
      <guid>https://dev.to/envio/indexing-and-reorgs-432d</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhzk9knyg0q666r0pglaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhzk9knyg0q666r0pglaz.png" alt="Indexing and Reorgs" width="799" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: &lt;a href="https://x.com/DenhamPreen" rel="noopener noreferrer"&gt;Denham Preen&lt;/a&gt;, Co-Founder at Envio&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chain reorganizations (reorgs) affect any indexer processing data near the chain head. Stateful indexers (those using updates and deletes) require rollback logic. Stateless ones (create-only) just need orphaned entities deleted.&lt;/li&gt;
&lt;li&gt;Multichain indexers face additional complexity: a reorg on one chain may require rolling back state that was affected by events from other chains.&lt;/li&gt;
&lt;li&gt;Envio handles reorg detection and rollback automatically, so developers do not need to implement rollback logic themselves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we unpack the implications of chain reorganizations on consuming and aggregating onchain data, considerations in a multichain environment, and how to design for them.&lt;/p&gt;

&lt;p&gt;We assume you have a strong understanding of what a chain reorganization is. If you want a refresher, skip to the &lt;a href="https://docs.envio.dev/blog/indexing-and-reorgs#what-are-chain-reorgs" rel="noopener noreferrer"&gt;bottom&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Handling reorgs is only important if you are indexing at the head, or handling data within the range of the head and the network's finalized block.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Chain reorgs and independent data
&lt;/h2&gt;

&lt;p&gt;Independent data is data that &lt;strong&gt;does not require the previous state in order to process the current state&lt;/strong&gt;. In an indexer, this means only "create" operations. If the only CRUD operations your handlers perform are writing entities, your indexer is handling stateless data, and handling reorgs is straightforward: delete all entities from orphaned blocks and re-ingest them with the canonical block's data. This is possible because stateless data allows for parallel processing.&lt;/p&gt;

&lt;p&gt;In practice, we usually need to perform some aggregation on data to turn it into meaningful information. In that context, our indexer is dealing with stateful data.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Side tangent: Stateless indexing can be handled incredibly fast by parallelization, such as indexers like &lt;a href="https://flair.dev" rel="noopener noreferrer"&gt;Flair&lt;/a&gt; that achieve impressive speed with only RPC.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Chain reorgs and stateful data
&lt;/h2&gt;

&lt;p&gt;Stateful data is data that &lt;strong&gt;depends on the previous state&lt;/strong&gt; (think update and delete operations) in order to process the current state. When handling stateful data, your indexer needs to account for the current state of entities, and reorgs become notably more complex.&lt;/p&gt;

&lt;p&gt;During a chain reorg, rather than simply replacing orphaned data, you need to &lt;strong&gt;revert previous operations or changes&lt;/strong&gt; and ensure that the entity state is rolled back correctly. This requires tracking the history of changes to each entity so that when a reorg occurs, you can accurately undo or adjust state based on the adopted canonical chain's data.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: We can periodically prune the entity history, retaining only the changes relevant to unfinalized blocks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Reorgs and multichain indexing
&lt;/h2&gt;

&lt;p&gt;When it comes to multichain indexing, we face additional complexity because we process events from multiple sources that interact and update the same entity state. When one chain undergoes a reorg, we need to roll back the state to a known correct point and reprocess any events from all chains that affected the state after the reorg on the affected chain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reorgs in the wild
&lt;/h2&gt;

&lt;p&gt;In practice, different networks exhibit varying levels of exposure to reorgs based on their design. Some networks, like Base and the &lt;a href="https://x.com/ShivanshuMadan/status/1811492866818212024" rel="noopener noreferrer"&gt;OP stack&lt;/a&gt;, are largely reorg-resistant with block finality occurring at the head, though &lt;a href="https://optimistic.etherscan.io/blocks_forked" rel="noopener noreferrer"&gt;exceptions&lt;/a&gt; do exist. On the other hand, networks like Polygon frequently experience deeper reorgs, where forked chains can extend over 10 blocks deep. One notable instance involved a reorg of &lt;a href="https://forum.polygon.technology/t/157-block-reorg-at-block-height-39599624/11388" rel="noopener noreferrer"&gt;157 blocks&lt;/a&gt;. Both &lt;a href="https://etherscan.io/blocks_forked" rel="noopener noreferrer"&gt;Etherscan&lt;/a&gt; and &lt;a href="https://gnosis.blockscout.com/blocks?tab=reorgs" rel="noopener noreferrer"&gt;Blockscout&lt;/a&gt; provide data on reorg occurrences. According to Ethereum Mainnet Etherscan, roughly 1% of blocks undergo reorgs, meaning that, assuming a 50/50 chance of a transaction being included in either the orphaned or canonical chain, about 1 in 200 transactions is likely to be in a reorged block.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Reorgs are a crucial consideration in blockchain indexing. Understanding their implications and designing with flexibility allows you to properly account for them in your indexer. Envio handles reorg detection and state rollback automatically, so developers building on HyperIndex get correct data at the head without needing to implement rollback logic themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are chain reorgs?
&lt;/h2&gt;

&lt;p&gt;In order to understand reorgs, let's break down the fundamental concepts and build up to a definition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fundamental concepts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block&lt;/li&gt;
&lt;li&gt;Chain&lt;/li&gt;
&lt;li&gt;Miners&lt;/li&gt;
&lt;li&gt;Chain fork&lt;/li&gt;
&lt;li&gt;Orphaned chain&lt;/li&gt;
&lt;li&gt;Canonical chain&lt;/li&gt;
&lt;li&gt;Block finality&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Block
&lt;/h3&gt;

&lt;p&gt;A container that stores transactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chain
&lt;/h3&gt;

&lt;p&gt;A series of sequential blocks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Miners
&lt;/h3&gt;

&lt;p&gt;Actors that try to submit the next valid block.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chain fork
&lt;/h3&gt;

&lt;p&gt;A chain fork occurs when more than one miner submits a valid block at the same time, causing a split where two valid chains exist simultaneously.&lt;/p&gt;

&lt;h3&gt;
  
  
  Orphaned chain and canonical chain
&lt;/h3&gt;

&lt;p&gt;When a chain forks, eventually one chain becomes accepted as the valid chain, known as the canonical chain. The forked chain that is not accepted becomes the orphaned chain. Orphaned blocks cease to exist, and transactions that occurred in those blocks cease to exist as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Orphaned chain&lt;/strong&gt;: The forked chain that is dropped&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canonical chain&lt;/strong&gt;: The chain adopted as the valid chain&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Info: We do not know which fork will be orphaned and which will become canonical until after the fact.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Block finality
&lt;/h3&gt;

&lt;p&gt;The minimum number of blocks needed to confirm that blocks will not become part of an orphaned chain.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Info: Block finality is the reason bridges and centralized exchanges require a confirmation delay after a transaction is confirmed, to ensure blocks will not become orphaned.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Reorg
&lt;/h3&gt;

&lt;p&gt;A reorg is a set of events that results in a chain rolling back to a previous point in time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does every blockchain indexer need to handle reorgs?
&lt;/h3&gt;

&lt;p&gt;Not necessarily. If your indexer only processes finalized blocks (past the finality threshold), reorgs are not a concern. Reorg handling is only important if you are indexing at the head or within the range between the head and the network's finalized block.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between stateless and stateful indexing in the context of reorgs?
&lt;/h3&gt;

&lt;p&gt;A stateless indexer only creates new entities. On a reorg, you delete orphaned entities and re-ingest from the canonical chain. A stateful indexer also updates and deletes entities based on previous state, which requires tracking the history of changes so that state can be accurately rolled back when a reorg occurs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which networks experience the most frequent or deepest reorgs?
&lt;/h3&gt;

&lt;p&gt;Polygon is known for frequent and sometimes deep reorgs (a 157-block reorg has been recorded). Base and OP stack chains are largely reorg-resistant due to single-slot finality. Ethereum mainnet sees roughly 1% of blocks affected by reorgs. Networks with faster block times and probabilistic finality tend to have more reorg activity.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does Envio handle reorgs automatically?
&lt;/h3&gt;

&lt;p&gt;Envio HyperIndex tracks entity state history for all unfinalized blocks. When a reorg is detected, it rolls back entity state to the correct point and reprocesses events from the canonical chain. This happens automatically and does not require any custom rollback logic in your event handlers.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do reorgs affect multichain indexers?
&lt;/h3&gt;

&lt;p&gt;In a multichain indexer, events from multiple chains may update the same entity. If one chain reorgs, any state changes that depended on post-reorg events from that chain must also be rolled back and reprocessed, even if those changes involved events from other chains. This makes multichain reorg handling significantly more complex than single-chain reorg handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Blockchain Indexer For Application Backends</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:42:35 +0000</pubDate>
      <link>https://dev.to/envio/blockchain-indexer-for-application-backends-11mb</link>
      <guid>https://dev.to/envio/blockchain-indexer-for-application-backends-11mb</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv8z9gwou0q9cvmd4bqrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv8z9gwou0q9cvmd4bqrk.png" alt="Blockchain Indexer For Application Backends" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blockchain indexers sit between the chain and your application backend, transforming raw events into structured, queryable data your app can depend on.&lt;/li&gt;
&lt;li&gt;Without an indexer, backends must reconstruct state from history, handle reorgs, and translate raw logs. This complexity compounds as projects scale.&lt;/li&gt;
&lt;li&gt;Envio handles this with a single &lt;code&gt;config.yaml&lt;/code&gt;, TypeScript event handlers, HyperSync for fast historical sync, and a hosted GraphQL API that works across multiple chains.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A blockchain indexer is rarely the end product. For most teams, it is a core part of the backend that sits between the blockchain and their application.&lt;/p&gt;

&lt;p&gt;This post covers how developers actually use a blockchain indexer in practice, the problems it solves at the backend layer, and how Envio fits into that workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a blockchain indexer
&lt;/h2&gt;

&lt;p&gt;A blockchain indexer is a specialised tool that ingests raw blockchain data and transforms it into structured data that application backends can query efficiently.&lt;/p&gt;

&lt;p&gt;Rather than querying blocks, transactions, or logs directly through RPC on every request, developers define how blockchain events should be processed and stored. The indexer applies this logic consistently as new data is produced and as historical data is processed.&lt;/p&gt;

&lt;p&gt;The result is a reliable, queryable data layer built from onchain activity.&lt;/p&gt;

&lt;h2&gt;
  
  
  How blockchain indexers work
&lt;/h2&gt;

&lt;p&gt;In practice, a blockchain indexer follows a simple model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read blockchain data: blocks, transactions, and event logs&lt;/li&gt;
&lt;li&gt;Apply developer-defined logic to the data&lt;/li&gt;
&lt;li&gt;Store the results as structured entities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This logic is deterministic and repeatable. Given the same inputs, the indexer produces the same outputs, which makes indexed data predictable and safe to depend on in application backends.&lt;/p&gt;

&lt;h2&gt;
  
  
  The backend problem blockchain apps run into
&lt;/h2&gt;

&lt;p&gt;Application backends need structured state. Blockchains expose raw data. When applications rely directly on RPC endpoints, backend logic quickly becomes responsible for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reconstructing state from historical events&lt;/li&gt;
&lt;li&gt;Tracking contract changes over time&lt;/li&gt;
&lt;li&gt;Handling retries, partial failures, and reorgs&lt;/li&gt;
&lt;li&gt;Translating low-level logs into usable application data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a project scales, this logic becomes difficult to manage and expensive to maintain. Blockchain indexers absorb this complexity by transforming onchain events into structured, queryable data that backends can depend on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What role a blockchain indexer plays
&lt;/h2&gt;

&lt;p&gt;Rather than serving as an analytics layer, a blockchain indexer functions as backend infrastructure. It continuously processes blockchain data and maintains an up-to-date representation of application state that backends can query directly.&lt;/p&gt;

&lt;p&gt;In practice, this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Indexing contract events once instead of repeatedly&lt;/li&gt;
&lt;li&gt;Converting raw logs into structured entities&lt;/li&gt;
&lt;li&gt;Persisting derived state that applications can rely on&lt;/li&gt;
&lt;li&gt;Keeping blockchain-specific logic out of application code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation makes backends simpler, more predictable, and easier to scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the indexed data gets used
&lt;/h2&gt;

&lt;p&gt;Once data is indexed, application backends can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Serve APIs backed by indexed blockchain state&lt;/li&gt;
&lt;li&gt;Power user interfaces with pre-processed data&lt;/li&gt;
&lt;li&gt;Track contract state without rescanning history&lt;/li&gt;
&lt;li&gt;Build features that depend on event-driven updates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because the indexing logic is deterministic and versioned, teams can evolve their schema and handlers without rewriting application logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  When a blockchain indexer becomes necessary
&lt;/h2&gt;

&lt;p&gt;Most teams reach for a blockchain indexer when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application logic depends on more than the latest block&lt;/li&gt;
&lt;li&gt;The application needs access to real-time and historical onchain data&lt;/li&gt;
&lt;li&gt;Data needs to be queried frequently or predictably&lt;/li&gt;
&lt;li&gt;The application spans multiple networks and needs a unified data layer&lt;/li&gt;
&lt;li&gt;Backend reliability becomes a priority&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At that point, indexing once and querying structured data becomes the simplest approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a blockchain indexer with Envio
&lt;/h2&gt;

&lt;p&gt;Envio is designed around a developer-first indexing workflow. Developers define the contracts and events relevant to their application, write deterministic event handlers that map blockchain data into entities, and run the indexer locally to develop and validate logic. The same indexing code runs in hosted environments without changes.&lt;/p&gt;

&lt;p&gt;Other indexers like The Graph require separate subgraph deployments per chain and charge query fees through a decentralized network. With Envio, all chains are configured in a single &lt;code&gt;config.yaml&lt;/code&gt; and exposed through one GraphQL endpoint, with no per-chain deployment overhead.&lt;/p&gt;

&lt;p&gt;As projects scale, Envio provides capabilities that support more advanced indexing and production requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript-first:&lt;/strong&gt; Write event handling logic in JavaScript or TypeScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://docs.envio.dev/docs/HyperSync/overview" rel="noopener noreferrer"&gt;HyperSync&lt;/a&gt;:&lt;/strong&gt; A high-performance data retrieval layer that delivers up to 2000x faster historical sync than standard RPC. HyperSync is used automatically for all supported networks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No-code quickstart:&lt;/strong&gt; Autogenerate a complete indexer project from a single contract address or ABI using &lt;code&gt;pnpx envio init&lt;/code&gt;. Deploy within minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multichain indexing:&lt;/strong&gt; Aggregate data across multiple networks into a single database. Query everything through a unified GraphQL API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Onchain and offchain data:&lt;/strong&gt; Combine indexed onchain events with offchain sources such as NFT metadata, token prices from aggregators, or current chain state via RPC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Factory contract support:&lt;/strong&gt; Automatically register and process events from child contracts created by a factory or dynamic contract.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;Hosted service&lt;/a&gt;:&lt;/strong&gt; A managed hosting platform for building, hosting, and querying Envio indexers, with 99.99% uptime SLA and GitHub-based auto-deploy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a backend data layer that remains consistent and reliable across development and production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Envio is designed to start small and scale as requirements grow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Index single or multiple contracts&lt;/li&gt;
&lt;li&gt;Map a small set of events into entities&lt;/li&gt;
&lt;li&gt;Run the indexer locally during development with &lt;code&gt;pnpm dev&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Expand the schema and handlers as application requirements grow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For many applications, a blockchain indexer becomes a core part of the backend. Envio supports this workflow from early development through production using the same indexing code across environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What does a blockchain indexer do in an application backend?
&lt;/h3&gt;

&lt;p&gt;A blockchain indexer reads raw onchain events, applies developer-defined logic, and stores the results as structured entities in a database. Application backends query this database directly instead of hitting RPC endpoints on every request.&lt;/p&gt;

&lt;h3&gt;
  
  
  When should I use a blockchain indexer instead of direct RPC calls?
&lt;/h3&gt;

&lt;p&gt;When your application needs historical data, depends on multiple events across contracts or chains, or needs to serve data at scale. Direct RPC calls force the backend to reconstruct state on every query and cannot efficiently handle historical lookups or cross-chain aggregation.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does Envio differ from The Graph for backend indexing?
&lt;/h3&gt;

&lt;p&gt;The Graph requires a separate subgraph per chain and charges query fees through a decentralized network. Envio uses a single &lt;code&gt;config.yaml&lt;/code&gt; for all chains, a single GraphQL endpoint, and TypeScript handlers with no per-query fees. HyperSync also makes historical sync orders of magnitude faster than The Graph's RPC-based approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Envio support multichain backends?
&lt;/h3&gt;

&lt;p&gt;Yes. All networks are defined in one &lt;code&gt;config.yaml&lt;/code&gt;. Envio processes events from each chain in parallel and writes them to a shared database. Your GraphQL API reflects the combined state of all configured chains through a single endpoint.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I run Envio locally during development?
&lt;/h3&gt;

&lt;p&gt;Yes. Running &lt;code&gt;pnpm dev&lt;/code&gt; spins up the full stack locally using Docker, including the database and GraphQL API. The same handler logic runs locally and in production without modification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Exploring Real-time Oracle Behavior and Push Based Feeds</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:42:29 +0000</pubDate>
      <link>https://dev.to/envio/exploring-real-time-oracle-behavior-and-push-based-feeds-2a4p</link>
      <guid>https://dev.to/envio/exploring-real-time-oracle-behavior-and-push-based-feeds-2a4p</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvchrrezd4wn0rtx29aex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvchrrezd4wn0rtx29aex.png" alt="Exploring Real-time Oracle Behavior and Push Based Feeds" width="800" height="713"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Co-authors: &lt;a href="https://x.com/j_o_r_d_y_s" rel="noopener noreferrer"&gt;Jordyn Laurier&lt;/a&gt;, Head of Marketing, and &lt;a href="https://x.com/jonjonclark" rel="noopener noreferrer"&gt;Jonjon Clark&lt;/a&gt;, Co-Founder at Envio&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Oracle Wars is a live dashboard that visualizes real-time oracle behavior on MegaETH, built with Envio HyperIndex in under two hours.&lt;/li&gt;
&lt;li&gt;Push oracles use heartbeat intervals and deviation thresholds to trigger updates. A 0.5% deviation threshold does not mean consecutive onchain prices only differ by 0.5%.&lt;/li&gt;
&lt;li&gt;HyperIndex makes building real-time monitoring tools for high-throughput chains like MegaETH straightforward, with no RPC rate limit concerns.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oracles are the connection between blockchains and real-world data, enabling smart contracts to interact with off-chain events like asset prices, market rates, or real-time sports scores. Visualizing how they behave in practice offers a new level of clarity for developers building onchain apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.oraclewars.xyz/" rel="noopener noreferrer"&gt;Oracle Wars&lt;/a&gt; is a live feed of onchain oracle data that shows how different providers behave in real time. It helps developers visualize and better understand how oracles function under different market conditions, so they can design more reliable and secure smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please note&lt;/strong&gt;: The multi-oracle comparison dashboard shown in earlier versions is no longer live on the site. Oracle Wars currently displays live ETH/USD price oracle updates from the &lt;a href="https://blog.redstone.finance/2025/04/08/introducing-redstone-bolt-the-fastest-blockchain-oracle-to-date/" rel="noopener noreferrer"&gt;Redstone Bolt&lt;/a&gt; oracle feed on MegaETH. Oracle Wars remains an educational and experimental tool for surfacing real-time data from various oracle providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a blockchain oracle?
&lt;/h2&gt;

&lt;p&gt;In simple terms, oracles allow smart contracts to react to external data sources. Whether it is the latest price of an asset or the outcome of a sporting event, oracles are how the blockchain sees the world.&lt;/p&gt;

&lt;p&gt;Over time, oracle architectures have evolved, giving rise to push-based oracles, pull-based oracles, and many more. Each design has trade-offs. This post focuses on push oracles and how they behave from a data perspective.&lt;/p&gt;

&lt;h3&gt;
  
  
  Push oracles in practice
&lt;/h3&gt;

&lt;p&gt;A push oracle periodically pushes data onto the blockchain. Your contract reads that data and responds accordingly, whether it is executing a trade, adjusting a loan-to-value ratio, or triggering another onchain action.&lt;/p&gt;

&lt;p&gt;Most push oracles use two primary mechanisms:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Heartbeat intervals&lt;/strong&gt;: Regular updates (e.g., every 24 hours)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deviation thresholds&lt;/strong&gt;: Immediate updates when data shifts significantly (e.g., 0.5% price movement)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Visualizing real-time oracle activity with Oracle Wars
&lt;/h2&gt;

&lt;p&gt;Wonder what happens in live conditions during periods of high volatility? That is where Oracle Wars came in. The earlier version of the dashboard showed a live comparison between price feeds from different oracle providers such as &lt;a href="https://chain.link/" rel="noopener noreferrer"&gt;Chainlink&lt;/a&gt; and &lt;a href="https://www.redstone.finance/" rel="noopener noreferrer"&gt;RedStone&lt;/a&gt;. Oracle Wars now focuses on Redstone Bolt ETH/USD updates on MegaETH, but the patterns below still apply to the earlier multi-oracle view.&lt;/p&gt;

&lt;p&gt;You will notice that updates are not always evenly spaced. That is the deviation threshold kicking in: when markets get volatile, updates come in fast. When things are calm, fewer updates appear. This is a valuable pattern to observe if you are designing a protocol that depends on accurate and real-time data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the limitations of deviation thresholds in push oracles
&lt;/h2&gt;

&lt;p&gt;Oracle Wars also shows the maximum deviation between any two consecutive price points over 24 hours. Every DeFi protocol relies on timely and accurate price data, and large shifts between updates can lead to exploit risk, broken assumptions, or cascading failures. This metric gives developers a real-world view of how much price movement can actually occur between updates, even when using well-known oracle providers.&lt;/p&gt;

&lt;p&gt;This brings us to a common misunderstanding: deviation thresholds are not strict limits.&lt;/p&gt;

&lt;p&gt;Take Chainlink and RedStone, for instance. Both use a 0.5% deviation threshold for price feeds. That should mean the oracle updates whenever the price moves more than 0.5%. But here is the catch:&lt;/p&gt;

&lt;p&gt;A 0.5% deviation threshold does not mean consecutive onchain prices will only differ by 0.5%.&lt;/p&gt;

&lt;p&gt;In practice, you might see larger deviations. Over 24 hours alone, Oracle Wars recorded deviations of around 0.67% for both providers. This does not mean the oracles were broken. It means they are working as designed. The threshold is more of a trigger condition than a strict upper bound.&lt;/p&gt;

&lt;p&gt;If you are competing in security audits on platforms like Sherlock, Code4rena, or CodeHawks, these edge cases are worth thinking through. Your protocol logic needs to account for potentially higher-than-expected changes, especially in volatile markets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is a super-fast push oracle now better than a pull oracle?
&lt;/h2&gt;

&lt;p&gt;With the advent of high-speed chains like MegaETH and Monad, we are starting to see ultra-fast push oracles that update data with each block. This near-instantaneous data feed challenges traditional push oracles, offering freshness comparable to pull oracles, provided transaction costs remain manageable.&lt;/p&gt;

&lt;p&gt;On Oracle Wars, you can observe how these super-fast push oracles behave in real time, with feeds like the ETH/USD price on MegaETH. The data is continuously updated, providing a new level of insight into how push oracles might evolve to rival the responsiveness of pull models.&lt;/p&gt;

&lt;p&gt;One aspect that remains intriguing is the frequent occurrence of multiple price updates at the same timestamp. This raises questions about whether these oracles are pushing multiple updates within the same block and the rationale behind this granularity.&lt;/p&gt;

&lt;p&gt;While Redstone's Bolt push oracle is an exciting development, it is still early days. It will be interesting to see how other oracle providers and chains approach the super-fast push model. The key question remains: can ultra-fast push oracles maintain the freshness and reliability of pull oracles without significant cost overhead?&lt;/p&gt;

&lt;h2&gt;
  
  
  Oracle Wars: powered by Envio's HyperIndex
&lt;/h2&gt;

&lt;p&gt;Oracle Wars was built in under two hours using Envio's HyperIndex, which made indexing real-time oracle data smooth and straightforward. No custom RPC infrastructure was needed, and no rate limit concerns applied.&lt;/p&gt;

&lt;p&gt;If you are building dashboards, simulations, or monitoring tools, it is worth checking out. Need help getting started? Feel free to reach out in our Discord or on Telegram.&lt;/p&gt;

&lt;h3&gt;
  
  
  Helpful resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/contract-import" rel="noopener noreferrer"&gt;HyperIndex Quickstart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/configuration-file" rel="noopener noreferrer"&gt;Guides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/example-uniswap-v4-multi-chain-indexer" rel="noopener noreferrer"&gt;Examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/enviodev/hyperindex" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Background posts on X that kicked this off:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://x.com/jonjonclark/status/1890426833088246054" rel="noopener noreferrer"&gt;Thinking through oracles with data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/jonjonclark/status/1892208677815300350" rel="noopener noreferrer"&gt;Understanding the Limitations of Deviation Thresholds in Push Oracles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/jonjonclark/status/1903109614318575809" rel="noopener noreferrer"&gt;How Much Latency Do High-Frequency Oracle Push Feeds Actually Have?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/jonjonclark/status/1909635483182789020" rel="noopener noreferrer"&gt;Is a super-fast push oracle now better than a pull oracle?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the difference between a push oracle and a pull oracle?
&lt;/h3&gt;

&lt;p&gt;A push oracle periodically writes updated data directly to the blockchain. A pull oracle does not write data proactively. Instead, it allows consumers to request data on demand, usually with a small fee. Pull oracles can offer fresher data per request, but push oracles are simpler to integrate since the data is already onchain when your contract needs it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why can the actual price deviation between oracle updates exceed the stated deviation threshold?
&lt;/h3&gt;

&lt;p&gt;Deviation thresholds are trigger conditions, not strict caps. When the threshold is set at 0.5%, the oracle updates whenever the price moves 0.5% from the last onchain price. However, by the time the update transaction is confirmed, the actual market price may have moved further. During high volatility, you can observe deviations larger than the configured threshold.&lt;/p&gt;

&lt;h3&gt;
  
  
  How was Oracle Wars built so quickly using Envio?
&lt;/h3&gt;

&lt;p&gt;Oracle Wars was built in under two hours because Envio HyperIndex handles all data ingestion, storage, and GraphQL API generation automatically. The developer only needed to define the oracle contract's ABI, configure the events of interest in &lt;code&gt;config.yaml&lt;/code&gt;, and write event handlers to store price updates. Envio handles the rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can HyperIndex handle the data throughput of high-frequency oracle feeds on MegaETH?
&lt;/h3&gt;

&lt;p&gt;Yes. HyperIndex is designed for high-throughput chains and uses HyperSync as its data retrieval layer, which bypasses RPC entirely for historical data and keeps up with real-time blocks efficiently. Oracle Wars on MegaETH demonstrates this with continuous ETH/USD price streaming at sub-millisecond block times.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I use Oracle Wars for production smart contract design decisions?
&lt;/h3&gt;

&lt;p&gt;Oracle Wars is an educational and experimental tool, not a production monitoring service. It is useful for understanding how push oracles behave under real market conditions and for informing your protocol design. For production systems, use the oracle provider's official documentation and run your own analysis of historical deviation data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Optimizing Blockchain Indexers on AWS</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:42:01 +0000</pubDate>
      <link>https://dev.to/envio/optimizing-blockchain-indexers-on-aws-23c9</link>
      <guid>https://dev.to/envio/optimizing-blockchain-indexers-on-aws-23c9</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl6orslzebaayy9gi5zxb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl6orslzebaayy9gi5zxb.png" alt="Optimizing Blockchain Indexers on AWS" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running blockchain indexers on AWS has three main cost drivers: networking (NAT Gateway, cross-AZ data transfer), compute (instance sizing, spot instances), and storage (RDS vs Aurora I/O-Optimized).&lt;/li&gt;
&lt;li&gt;Practical strategies like single-AZ deployment, Bottlerocket OS, and Aurora I/O-Optimized can cut costs significantly without sacrificing reliability.&lt;/li&gt;
&lt;li&gt;These are the same optimizations Envio uses internally to power its Hosted Service, so teams using Envio Cloud get these benefits without configuring them manually.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When running any application on cloud infrastructure, one of the first questions that comes up is: where did all the money go? In the &lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;AWS&lt;/a&gt; ecosystem, expenses like hidden EC2 charges, complex data transfer costs, or the confusing &lt;a href="https://aws.amazon.com/rds/aurora/pricing/" rel="noopener noreferrer"&gt;Aurora pricing model&lt;/a&gt; can quickly add up.&lt;/p&gt;

&lt;p&gt;Whether you are running Envio's &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;HyperIndex&lt;/a&gt; on your own AWS setup or are curious about how Envio optimizes cloud resources to deliver its Hosted Service, this guide walks through practical techniques to maximize your blockchain indexer's performance while keeping costs as low as possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges of running indexers on AWS
&lt;/h2&gt;

&lt;p&gt;Understanding these challenges helps you prepare and optimize your setup effectively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost management&lt;/strong&gt;: Navigating AWS pricing is complex. Hidden charges, especially for data transfer and compute, can lead to unexpected bills if not carefully monitored.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configuration complexity&lt;/strong&gt;: Setting up an efficient architecture requires a solid understanding of AWS services. Misconfigurations lead to increased costs and reduced reliability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance tuning&lt;/strong&gt;: Indexers handle fluctuating workloads. Balancing performance with cost-effectiveness requires constant monitoring and adjustments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High availability&lt;/strong&gt;: Achieving true high availability without significant costs requires careful trade-offs between cost and redundancy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data management&lt;/strong&gt;: As indexers scale, managing large volumes of data efficiently becomes critical for maintaining performance while keeping costs low.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The costs of running an indexer
&lt;/h2&gt;

&lt;p&gt;The cost of running an indexer breaks down into three key areas:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Networking
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Avoid NAT Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the core of every indexer is fetching data from external sources (like HyperSync or an RPC provider) and indexing it into a storage layer (PostgreSQL). If you are running your indexer in an AWS private subnet, network traffic passes through a NAT Gateway, costing $0.045/GB (US-East) for both requests and responses.&lt;/p&gt;

&lt;p&gt;Think of a NAT Gateway as a hotel doorman: it handles your packages and ensures your privacy, but it comes at a cost. If you have carefully assessed your security needs and set up proper security groups, running your indexer in a public subnet is a perfectly acceptable option. In that case, you can bypass the NAT Gateway entirely and use an Internet Gateway, allowing communication with the outside world without the added cost of NAT traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transferring data within a region&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When deploying an indexer in &lt;a href="https://kubernetes.io/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt; (EKS) or on an EC2 instance, it is easy for your indexer and storage layer to end up in different availability zones (AZs). AWS charges $0.01/GB (US-East) for data transferred between AZs, both in and out. To minimize costs, deploy both your indexer and storage layer within the same AZ.&lt;/p&gt;

&lt;p&gt;You might wonder: does this compromise high availability? Somewhat. If one AZ goes down, both your indexer and storage layer go down together. But since these two components are tightly coupled, if one fails the other is effectively unusable anyway.&lt;/p&gt;

&lt;p&gt;For true HA with low costs, consider AWS Aurora. Aurora replicates data across multiple AZs at no extra cost (baked into Aurora's pricing), and your indexer can connect to an Aurora instance within its own AZ. If one AZ fails, your indexer can redeploy in another AZ where another Aurora instance is ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Compute
&lt;/h3&gt;

&lt;p&gt;Figuring out the right amount of compute power for your indexer requires balancing two distinct phases. When first deployed, your indexer processes historical data. Once caught up, it only needs to handle real-time indexing. The compute resources required for these two stages are quite different: historical indexing demands more resources while real-time indexing requires less.&lt;/p&gt;

&lt;p&gt;To optimize costs, use different EC2 instance types for each stage. Start with a larger, more powerful instance to process historical data as quickly as possible, then switch to a smaller, cheaper instance once you are caught up. Since AWS charges by the hour, find the smallest instance that can sync historical data quickly enough, then downsize for real-time indexing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spot instances&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/ec2/spot/" rel="noopener noreferrer"&gt;Spot instances&lt;/a&gt; can save up to 90% on EC2 costs. They are unused EC2 capacity offered at a discount but can be terminated when AWS needs the capacity. For HyperIndex indexers, which are stateless by nature, this is less of an issue since moving an indexer from one instance to another is straightforward. If staying close to real-time is critical, the interruptions of spot instances may be a headache.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Bottlerocket OS for EC2 instances&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One way to minimize downtime when using spot instances, especially if running your indexer in &lt;a href="https://aws.amazon.com/eks/" rel="noopener noreferrer"&gt;EKS&lt;/a&gt;, is to use &lt;a href="https://aws.amazon.com/bottlerocket/" rel="noopener noreferrer"&gt;Bottlerocket OS&lt;/a&gt; for your EC2 instances. Bottlerocket is a lightweight, container-optimized operating system that boots up much faster than Ubuntu or Amazon Linux. By using Bottlerocket, you can significantly cut downtime when a spot instance gets replaced. Since it is lightweight, more of your resources are dedicated to the indexer itself.&lt;/p&gt;

&lt;p&gt;Tip: when using spot instances with tools like EKS and Karpenter, specify as many EC2 instance types as possible. If one type runs out of spot capacity, Karpenter can try another before falling back to an on-demand instance.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Storage
&lt;/h3&gt;

&lt;p&gt;When hosting indexers on AWS, your primary options for PostgreSQL are AWS RDS and Aurora.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IOPS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Indexers are high-IOPS applications that handle a relentless stream of inserts and updates, meaning they need a storage solution that can support high IOPS. Serverless options will not cut it for indexers, as they cannot manage the constant load.&lt;/p&gt;

&lt;p&gt;For indexers on Aurora, Aurora I/O-Optimized is worth considering. Released in May 2023, this configuration eliminates IOPS charges, allowing you to avoid significant I/O costs that can make up 50% of expenses on standard Aurora. By switching to Aurora I/O-Optimized, you effectively get unlimited IOPS. The higher storage costs are offset by the elimination of per-IOPS billing, making it a more predictable and potentially cheaper option for high-I/O workloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Storage requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With RDS, you provision storage upfront, which can lead to over-provisioning. Aurora offers a pay-as-you-go storage option that scales automatically as your data grows. This flexibility can result in significant savings, especially when dealing with historical indexing or unpredictable storage growth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A key component of Aurora is its separation of compute and storage. Unlike RDS, where storage is tightly coupled with compute, Aurora allows you to scale these independently. This is particularly useful when your indexer's compute and storage requirements fluctuate at different stages of the indexing process.&lt;/p&gt;

&lt;p&gt;In short: since indexers are high-I/O applications that scale up and down over time, Aurora I/O-Optimized can provide significant cost savings while delivering the performance you need. RDS remains a more affordable option for smaller indexers or a more hands-on approach to storage management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Running indexers on AWS does not have to be expensive. By understanding the key cost drivers in networking, compute, and storage and using the right AWS tools and configurations, you can significantly reduce your cloud bill while maintaining high performance. Whether you are optimizing your network with a single-AZ setup or taking advantage of spot instances for compute savings, there is always a smart way to balance performance and cost.&lt;/p&gt;

&lt;p&gt;These are the same optimizations Envio uses to power its Hosted Service. Teams using Envio Cloud get these benefits automatically, without needing to configure them manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AWS?
&lt;/h2&gt;

&lt;p&gt;AWS (Amazon Web Services) is a cloud computing platform providing on-demand services including computing power, storage, and networking. It allows businesses to scale their infrastructure without owning physical servers, offering flexibility and cost efficiency. Whether you are running a simple website or a complex application like a blockchain indexer, AWS helps you manage resources while paying only for what you use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Should I run my blockchain indexer in a public or private AWS subnet?
&lt;/h3&gt;

&lt;p&gt;For most indexers, a public subnet with well-configured security groups is a perfectly acceptable and cost-effective option. It avoids NAT Gateway charges ($0.045/GB) while still maintaining security through security groups. Private subnets add privacy but add cost and complexity that may not be justified for an indexer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Aurora always cheaper than RDS for blockchain indexers?
&lt;/h3&gt;

&lt;p&gt;Not always, but for high-IOPS indexers Aurora I/O-Optimized is typically more cost-effective. Standard Aurora and RDS charge per I/O operation, which adds up fast for indexers doing constant inserts and updates. Aurora I/O-Optimized eliminates per-IOPS billing in favor of higher storage costs, which is usually a net win for indexing workloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use spot instances for a production blockchain indexer?
&lt;/h3&gt;

&lt;p&gt;Yes, with caveats. HyperIndex indexers are stateless, so recovering from a spot termination is straightforward. If you need to stay as close to real-time as possible, spot interruptions may cause brief gaps. Using Bottlerocket OS and specifying multiple instance types in Karpenter minimizes downtime when instances are replaced.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does Envio's hosted service compare to self-managing on AWS?
&lt;/h3&gt;

&lt;p&gt;Envio's Hosted Service applies the same optimizations described in this post (single-AZ networking, Aurora I/O-Optimized, Bottlerocket OS on EKS) internally. Self-managing on AWS gives you more control but requires engineering time to configure and maintain these optimizations yourself. For most teams, the hosted service is faster and cheaper to operate.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the biggest hidden cost when running indexers on AWS?
&lt;/h3&gt;

&lt;p&gt;NAT Gateway charges and cross-AZ data transfer fees are the most commonly overlooked costs. A single indexer processing large volumes of HyperSync data through a NAT Gateway can generate hundreds of dollars per month in transfer fees. Deploying in a public subnet or consolidating your indexer and database in the same AZ eliminates most of this cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How Envio Simplifies Data Retrieval for Multichain dApps</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:41:55 +0000</pubDate>
      <link>https://dev.to/envio/how-envio-simplifies-data-retrieval-for-multichain-dapps-4d7d</link>
      <guid>https://dev.to/envio/how-envio-simplifies-data-retrieval-for-multichain-dapps-4d7d</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy1gf9rexcjpcstapuap6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy1gf9rexcjpcstapuap6.png" alt="How Envio Simplifies Data Retrieval for Multichain dApps" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploying a dApp across multiple chains creates a fragmented data problem. Each chain has its own events, its own state, and no native way to query across them together.&lt;/li&gt;
&lt;li&gt;Envio HyperIndex solves this with a single indexer instance that reads events from multiple networks and exposes everything through one GraphQL endpoint.&lt;/li&gt;
&lt;li&gt;Configuration is a single &lt;code&gt;config.yaml&lt;/code&gt; file. No separate deployments, no cross-service data joins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The multichain future is already here. Protocols like &lt;a href="https://app.uniswap.org/" rel="noopener noreferrer"&gt;Uniswap&lt;/a&gt;, &lt;a href="https://aave.com/" rel="noopener noreferrer"&gt;Aave&lt;/a&gt;, and &lt;a href="https://compound.finance/" rel="noopener noreferrer"&gt;Compound&lt;/a&gt; are deployed across Ethereum, Arbitrum, Optimism, Base, Polygon, and more. Reaching users on multiple chains means accepting the data fragmentation that comes with it.&lt;/p&gt;

&lt;p&gt;For developers, this fragmentation is a real infrastructure problem. Traditional indexing approaches require a separate indexer and database per chain. Aggregating that data in your frontend means either stitching together multiple API calls or building additional backend logic to consolidate it. Both approaches add complexity and maintenance overhead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Multichain Data Problem
&lt;/h2&gt;

&lt;p&gt;When a dApp is deployed across multiple chains, every interaction that matters (swaps, transfers, liquidations, mints) is emitted as an event on each respective chain. There is no native cross-chain view of this data.&lt;/p&gt;

&lt;p&gt;The conventional approach requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One indexer deployment per chain&lt;/li&gt;
&lt;li&gt;One database per chain&lt;/li&gt;
&lt;li&gt;Custom aggregation logic in the frontend or a separate backend layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This compounds quickly. A protocol on five chains needs five indexer deployments to maintain, five databases to keep in sync, and aggregation logic that breaks every time a new chain is added.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multichain Indexing with Envio HyperIndex
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;Envio HyperIndex&lt;/a&gt; handles multichain indexing from a single indexer instance. All networks are defined in one &lt;code&gt;config.yaml&lt;/code&gt;. All indexed data lands in one database. Everything is queryable through one GraphQL endpoint.&lt;/p&gt;

&lt;p&gt;Other indexers require a separate subgraph or pipeline per chain. With Envio, adding a new chain is a config change, not a new deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: Greeter Contract on Polygon and Linea
&lt;/h2&gt;

&lt;p&gt;The following example walks through a multichain Greeter indexer that listens for &lt;code&gt;NewGreeting&lt;/code&gt; events from contracts deployed on both Polygon and Linea.&lt;/p&gt;

&lt;h3&gt;
  
  
  config.yaml
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Greeter&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Greeter indexer&lt;/span&gt;
&lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;137&lt;/span&gt; &lt;span class="c1"&gt;# Polygon&lt;/span&gt;
    &lt;span class="na"&gt;start_block&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45336336&lt;/span&gt;
    &lt;span class="na"&gt;contracts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Greeter&lt;/span&gt;
        &lt;span class="na"&gt;abi_file_path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./abis/greeter-abi.json&lt;/span&gt;
        &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./src/EventHandlers.ts&lt;/span&gt;
        &lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NewGreeting&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;59144&lt;/span&gt; &lt;span class="c1"&gt;# Linea&lt;/span&gt;
    &lt;span class="na"&gt;start_block&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;367801&lt;/span&gt;
    &lt;span class="na"&gt;contracts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Greeter&lt;/span&gt;
        &lt;span class="na"&gt;abi_file_path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./abis/greeter-abi.json&lt;/span&gt;
        &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./src/EventHandlers.ts&lt;/span&gt;
        &lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NewGreeting&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both networks share the same handler and ABI. Adding a third chain means adding another network block. The handler logic stays unchanged.&lt;/p&gt;

&lt;h3&gt;
  
  
  schema.graphql
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;greetings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;!]!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;latestGreeting&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;numberOfGreetings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Event handler
&lt;/h3&gt;

&lt;p&gt;A single TypeScript handler processes &lt;code&gt;NewGreeting&lt;/code&gt; events from both chains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Greeter&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;generated&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Greeter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NewGreeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;currentUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

  &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;latestGreeting&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;numberOfGreetings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;currentUser&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;numberOfGreetings&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;greetings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...(&lt;/span&gt;&lt;span class="nx"&gt;currentUser&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;greetings&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;[]),&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The handler runs identically for events from any network in the config. Chain-specific context (like &lt;code&gt;event.chainId&lt;/code&gt;) is available if you need it for cross-chain logic.&lt;/p&gt;

&lt;p&gt;For the full multichain indexing documentation, see the &lt;a href="https://docs.envio.dev/docs/HyperIndex/multichain-indexing" rel="noopener noreferrer"&gt;Envio docs&lt;/a&gt;. For a more complex multichain example, see the &lt;a href="https://docs.envio.dev/docs/HyperIndex/example-uniswap-v4-multi-chain-indexer" rel="noopener noreferrer"&gt;Uniswap V4 Multichain Indexer&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How does Envio handle events from multiple chains in one indexer?
&lt;/h3&gt;

&lt;p&gt;All networks are defined in a single &lt;code&gt;config.yaml&lt;/code&gt;. HyperIndex processes events from each network in parallel and writes them to a shared database. Your GraphQL API reflects the combined state of all indexed chains.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need separate deployments for each chain?
&lt;/h3&gt;

&lt;p&gt;No. A single HyperIndex instance handles all configured networks. One deployment, one database, one GraphQL endpoint.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can the same handler logic run across different chains?
&lt;/h3&gt;

&lt;p&gt;Yes. A single handler function processes matching events from all networks in your config. If you need to apply chain-specific logic, &lt;code&gt;event.chainId&lt;/code&gt; is available in the handler context.&lt;/p&gt;

&lt;h3&gt;
  
  
  How many chains does Envio support?
&lt;/h3&gt;

&lt;p&gt;HyperSync natively supports 80+ EVM chains. Any supported chain can be added to your &lt;code&gt;config.yaml&lt;/code&gt;. For chains not yet covered by HyperSync, you can fall back to an RPC endpoint without changing your handler code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I see a full multichain indexing example?
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.envio.dev/docs/greeter-tutorial" rel="noopener noreferrer"&gt;Greeter tutorial&lt;/a&gt; in the Envio docs walks through multichain indexing step by step. The &lt;a href="https://docs.envio.dev/docs/HyperIndex/example-uniswap-v4-multi-chain-indexer" rel="noopener noreferrer"&gt;Uniswap V4 Multichain Indexer&lt;/a&gt; is a more complex real-world example covering many chains.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Dedicated Hosting for Blockchain Indexers</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:41:50 +0000</pubDate>
      <link>https://dev.to/envio/dedicated-hosting-for-blockchain-indexers-2192</link>
      <guid>https://dev.to/envio/dedicated-hosting-for-blockchain-indexers-2192</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyms2zp7ryk299tzijxl1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyms2zp7ryk299tzijxl1.png" alt="Dedicated Hosting for Blockchain Indexers" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running a blockchain indexer in production requires a database, a GraphQL API layer, uptime monitoring, and infrastructure that scales with your data.&lt;/li&gt;
&lt;li&gt;Envio Cloud handles all of this as a managed service, so teams can focus on handler logic rather than infrastructure.&lt;/li&gt;
&lt;li&gt;Self-hosting via Docker is also supported for teams that want full infrastructure control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deploying a blockchain indexer locally is straightforward. Keeping one running reliably in production is a different problem. You need a database, a GraphQL API layer, uptime guarantees, and a deployment process that does not require manual intervention every time your handler logic changes.&lt;/p&gt;

&lt;p&gt;This article covers what a dedicated hosted indexer service provides, how Envio Cloud works, and how to decide between managed hosting and self-hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Hosted Indexer Service Provides
&lt;/h2&gt;

&lt;p&gt;A hosted indexer service takes your indexer configuration, schema, and handler code and runs the full stack for you. This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database&lt;/strong&gt;: Storing indexed events and entity tables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GraphQL API&lt;/strong&gt;: Auto-generated from your schema via Hasura, queryable by your frontend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uptime&lt;/strong&gt;: The service monitors availability and handles restarts automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Syncing from your repository so new versions deploy without manual steps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without a hosted service, each of these components needs to be provisioned, maintained, and scaled independently. For teams focused on building a product rather than managing infrastructure, this is significant overhead.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Envio Cloud Works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;Envio Cloud&lt;/a&gt; is the managed hosting option for HyperIndex. It runs on AWS infrastructure with Kubernetes orchestration and Hasura for the GraphQL layer.&lt;/p&gt;

&lt;p&gt;Deployment is integrated with GitHub. An Envio GitHub bot monitors your repository and triggers new deployments when changes land in your specified branch. There is no manual deploy step once the integration is configured.&lt;/p&gt;

&lt;p&gt;The stack Envio Cloud manages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS&lt;/strong&gt;: Cloud infrastructure and compute&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kubernetes&lt;/strong&gt;: Container orchestration and scaling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hasura&lt;/strong&gt;: Real-time GraphQL API generation from your schema&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HyperSync&lt;/strong&gt;: The data engine powering historical sync, up to 2000x faster than standard RPC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For local development, the full stack runs with a single &lt;code&gt;pnpm dev&lt;/code&gt; command using Docker Desktop. The same handler logic runs locally and in production without modification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managed Hosting vs Self-Hosting
&lt;/h2&gt;

&lt;p&gt;HyperIndex supports both options:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Envio Cloud&lt;/th&gt;
&lt;th&gt;Self-hosted (Docker)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure setup&lt;/td&gt;
&lt;td&gt;Handled by Envio&lt;/td&gt;
&lt;td&gt;You manage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uptime monitoring&lt;/td&gt;
&lt;td&gt;Included&lt;/td&gt;
&lt;td&gt;You manage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;GitHub bot auto-deploy&lt;/td&gt;
&lt;td&gt;Manual or custom CI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Free tier and paid plans&lt;/td&gt;
&lt;td&gt;Your infrastructure costs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control&lt;/td&gt;
&lt;td&gt;Standard configuration&lt;/td&gt;
&lt;td&gt;Full control&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For most teams, Envio Cloud is the faster path to production. For teams with specific compliance requirements or existing infrastructure preferences, self-hosting via Docker gives full control without changing any handler code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Deploy to Envio Cloud from the &lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;hosted service docs&lt;/a&gt;. If you do not have an indexer yet, the contract import quickstart generates a working indexer from any deployed contract address in under 5 minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx envio init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What infrastructure does Envio Cloud run on?
&lt;/h3&gt;

&lt;p&gt;Envio Cloud uses AWS for compute, Kubernetes for orchestration, and Hasura for the GraphQL API layer. HyperSync powers historical data retrieval for all supported networks.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does deployment work with Envio Cloud?
&lt;/h3&gt;

&lt;p&gt;Envio Cloud integrates with GitHub via a bot that monitors your repository. When changes land in your configured branch, a new deployment is triggered automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I self-host HyperIndex instead of using Envio Cloud?
&lt;/h3&gt;

&lt;p&gt;Yes. HyperIndex can be self-hosted using Docker. The same handler logic and schema work identically in both environments. See the &lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;hosting docs&lt;/a&gt; for setup instructions.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is included in the free tier?
&lt;/h3&gt;

&lt;p&gt;See the &lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;Envio Cloud docs&lt;/a&gt; for current plan details and limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Envio Cloud support multichain indexers?
&lt;/h3&gt;

&lt;p&gt;Yes. A single HyperIndex instance can index multiple networks and all data is queryable through one GraphQL endpoint, whether hosted on Envio Cloud or self-hosted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Agentic Blockchain Indexing with Envio Cloud</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:41:21 +0000</pubDate>
      <link>https://dev.to/envio/agentic-blockchain-indexing-with-envio-cloud-36bj</link>
      <guid>https://dev.to/envio/agentic-blockchain-indexing-with-envio-cloud-36bj</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe47msswfxxnispozdx1y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe47msswfxxnispozdx1y.png" alt="Agentic Blockchain Indexing with Envio Cloud" width="799" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Envio HyperIndex and the &lt;code&gt;envio-cloud&lt;/code&gt; CLI enable end-to-end agentic deployment of blockchain indexers with no manual config.&lt;/li&gt;
&lt;li&gt;An AI agent scaffolded, configured, pushed to GitHub, and deployed a wstETH indexer on Monad Mainnet from a single prompt.&lt;/li&gt;
&lt;li&gt;400,000 events indexed in approximately 20 seconds.&lt;/li&gt;
&lt;li&gt;Every step is CLI-driven and scriptable, with JSON output for downstream agent logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agentic development works best when an AI agent can take a single prompt and run with it, end-to-end, without handing back to a human at every step. For blockchain indexing, that's exactly what we've built at Envio.&lt;/p&gt;

&lt;p&gt;With the Envio Cloud CLI (&lt;code&gt;envio-cloud&lt;/code&gt;) and HyperIndex, an agent can scaffold a production-ready indexer, configure it for any EVM-compatible chain, push it to GitHub, and deploy it to Envio Cloud, without a human ever touching a config file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The result: 400,000 events indexed in ~20 seconds&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is HyperIndex?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;HyperIndex&lt;/a&gt; is Envio's high-performance blockchain indexing framework. It's designed to make indexing fast to build and even faster to run, with support for EVM-compatible networks and a developer experience built around real workflows.&lt;/p&gt;

&lt;p&gt;HyperIndex is the default indexing framework for agentic development with the Envio Cloud CLI tool and comprehensive Claude skills. That means when an AI agent needs to spin up a blockchain data pipeline, HyperIndex is the go-to solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Envio Cloud CLI: &lt;code&gt;envio-cloud&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.npmjs.com/package/envio-cloud" rel="noopener noreferrer"&gt;envio-cloud&lt;/a&gt; CLI is the command-line interface for Envio Cloud, the managed infrastructure layer that runs your HyperIndex indexers in production.&lt;/p&gt;

&lt;p&gt;With it you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authenticate via GitHub (&lt;code&gt;envio-cloud login&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Register a new indexer pointing to your GitHub repo (&lt;code&gt;envio-cloud indexer add&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Monitor sync progress and deployment status in real-time (&lt;code&gt;envio-cloud deployment status&lt;/code&gt;, &lt;code&gt;envio-cloud deployment metrics&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Promote deployments to production (&lt;code&gt;envio-cloud deployment promote&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Pull JSON output for any command (&lt;code&gt;-o json&lt;/code&gt;), making it fully scriptable and agent-friendly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;No dashboard required. Everything that matters is exposed through the CLI.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  End-to-End: Agentic deployment of a wstETH indexer on Monad
&lt;/h2&gt;

&lt;p&gt;Here's the full workflow an agent ran to deploy a live ERC20 indexer for wstETH on &lt;a href="https://www.monad.xyz" rel="noopener noreferrer"&gt;Monad&lt;/a&gt; Mainnet, start to finish.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Scaffold the indexer
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx envio init template &lt;span class="nt"&gt;-t&lt;/span&gt; erc20 &lt;span class="nt"&gt;-l&lt;/span&gt; typescript &lt;span class="nt"&gt;-d&lt;/span&gt; ./my-indexer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;envio&lt;/code&gt; CLI scaffolds a TypeScript ERC20 indexer template. No API token is needed at this stage as authentication is handled through the hosted service at deployment time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Configure for Monad
&lt;/h3&gt;

&lt;p&gt;The agent edits &lt;code&gt;config.yaml&lt;/code&gt; to target the wstETH contract on Monad Mainnet (chain ID 143, contract address &lt;code&gt;0x10Aeaf63194db8d453d4D85a06E5eFE1dd0b5417, start_block: 0&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Then runs codegen and a type check to confirm everything is clean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm codegen
pnpm tsc &lt;span class="nt"&gt;--noEmit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: the ERC20 template test file references a different contract address and network, so any resulting type errors need to be fixed before the type check passes.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Push to GitHub
&lt;/h3&gt;

&lt;p&gt;Create a public repo and push:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh repo create wsteth-monad-indexer-demo &lt;span class="nt"&gt;--public&lt;/span&gt;
git init &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git add &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"init"&lt;/span&gt;
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the push fails because your GitHub token lacks permission to push workflow files (like &lt;code&gt;.github/workflows/test.yaml&lt;/code&gt;), refresh auth with workflow scope:&lt;br&gt;
&lt;code&gt;gh auth refresh -s workflow&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Envio Cloud deploys from the &lt;code&gt;envio&lt;/code&gt; branch by default, so create and push it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; envio &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin envio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Connect the Envio GitHub Bot
&lt;/h3&gt;

&lt;p&gt;The Envio GitHub App must have access to the repo before deployments will trigger. If the repo is not already linked, visit:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/apps/envio-deployments/installations/select_target" rel="noopener noreferrer"&gt;https://github.com/apps/envio-deployments/installations/select_target&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then grant the bot access to the &lt;code&gt;wsteth-monad-indexer-demo&lt;/code&gt; repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Deploy
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx envio-cloud login
pnpx envio-cloud indexer add
  &lt;span class="nt"&gt;--name&lt;/span&gt; wsteth-monad-indexer-demo
  &lt;span class="nt"&gt;--repo&lt;/span&gt; wsteth-monad-indexer-demo
  &lt;span class="nt"&gt;--description&lt;/span&gt; &lt;span class="s2"&gt;"wstETH ERC20 indexer on Monad"&lt;/span&gt;
  &lt;span class="nt"&gt;--branch&lt;/span&gt; envio
  &lt;span class="nt"&gt;--skip-repo-check&lt;/span&gt;
  &lt;span class="nt"&gt;--yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: Verify
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx envio-cloud indexer get wsteth-monad-indexer-demo &lt;span class="o"&gt;{&lt;/span&gt;org&lt;span class="o"&gt;}&lt;/span&gt;
pnpx envio-cloud deployment status wsteth-monad-indexer-demo &amp;lt;commit-hash&amp;gt; &lt;span class="o"&gt;{&lt;/span&gt;org&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once synced, the indexer is viewable in the browser at &lt;code&gt;https://envio.dev/app/{org}/{indexer-name}/{commit-hash}.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Check the live deployment from this demo here:&lt;br&gt;
&lt;a href="https://envio.dev/app/denhampreen/wsteth-monad-indexer-demo/5d55d35" rel="noopener noreferrer"&gt;https://envio.dev/app/denhampreen/wsteth-monad-indexer-demo/5d55d35&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;400,000 events indexed. ~20 seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;See the full walkthrough on &lt;a href="https://www.loom.com/share/09cdac43b18f4143ad78b18c8c8a492b" rel="noopener noreferrer"&gt;Loom&lt;/a&gt;, covering the complete agent driven workflow from scaffold to deployment.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why this matters for agentic development
&lt;/h2&gt;

&lt;p&gt;The blockchain data layer has historically been one of the friction points in agentic workflows. Spinning up an indexer meant reading docs, manually editing configs, managing infrastructure, and waiting for sync.&lt;/p&gt;

&lt;p&gt;HyperIndex and the &lt;code&gt;envio-cloud&lt;/code&gt; CLI change that equation. Every step in the workflow above is scriptable, CLI-driven, and designed to be executed by an agent without human intervention. The JSON output flag (&lt;code&gt;-o json&lt;/code&gt;) makes it straightforward to pipe deployment status into downstream logic. The GitHub-native deployment flow means agents that can commit code can deploy indexers.&lt;/p&gt;

&lt;p&gt;This is what it looks like in practice for HyperIndex to be the default indexing framework for agentic development.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Install the Envio Cloud CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; envio-cloud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Scaffold your first indexer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx envio init template &lt;span class="nt"&gt;-t&lt;/span&gt; erc20 &lt;span class="nt"&gt;-l&lt;/span&gt; typescript &lt;span class="nt"&gt;-d&lt;/span&gt; ./my-indexer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whether you're building on Monad, Ethereum, or any other EVM compatible network, Envio enables agent driven indexing from first prompt to live deployment. The GitHub-native deployment flow means agents that can commit code can deploy indexers in minutes.&lt;/p&gt;

&lt;p&gt;Be sure to check out our &lt;a href="https://docs.envio.dev/blog/envio-docs-mcp-server" rel="noopener noreferrer"&gt;Envio Docs MCP Server&lt;/a&gt; for AI-assisted indexer development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is agentic blockchain indexing?
&lt;/h3&gt;

&lt;p&gt;Agentic blockchain indexing is the process of using an AI agent to scaffold, configure, and deploy a blockchain indexer without manual human intervention. With Envio HyperIndex and the envio-cloud CLI, an agent can go from a single prompt to a live production indexer in minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the envio-cloud CLI?
&lt;/h3&gt;

&lt;p&gt;The envio-cloud CLI is the command-line interface for Envio Cloud, the managed infrastructure layer that runs HyperIndex indexers in production. It supports login, indexer registration, deployment monitoring, and promotion, all scriptable with JSON output via the &lt;code&gt;-o json&lt;/code&gt; flag.&lt;/p&gt;

&lt;h3&gt;
  
  
  How fast is Envio HyperIndex for historical sync?
&lt;/h3&gt;

&lt;p&gt;In independent benchmarks run by Sentio, HyperIndex completed the Uniswap V2 Factory sync in 8 seconds, 142x faster than The Graph and 15x faster than the nearest competitor (Subsquid). In the agentic deployment demo, 400,000 wstETH events on Monad Mainnet were indexed in approximately 20 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which chains does Envio support for agentic indexing?
&lt;/h3&gt;

&lt;p&gt;Envio supports any EVM-compatible chain. HyperSync natively covers 80+ EVM chains for maximum speed, including Ethereum, Base, Arbitrum, Optimism, Polygon, and Monad. Any EVM chain without native HyperSync support can be indexed via standard RPC.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I get started with agentic indexing on Envio?
&lt;/h3&gt;

&lt;p&gt;Install the Envio Cloud CLI with &lt;code&gt;npm install -g envio-cloud&lt;/code&gt;, then scaffold your first indexer with &lt;code&gt;pnpx envio init template -t erc20 -l typescript -d ./my-indexer&lt;/code&gt;. Push to GitHub and deploy with the envio-cloud CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Envio Cloud
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;Envio Cloud&lt;/a&gt; is a managed environment for running HyperIndex indexers in production.&lt;/p&gt;

&lt;p&gt;It handles infrastructure, scaling, and monitoring, so indexers can run reliably without managing operational overhead. Multiple plans are available, from free development environments to dedicated production deployments, each with features such as static endpoints, built in alerts, and production ready infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;Envio is the fastest independently benchmarked EVM blockchain indexer for querying real-time and historical data (&lt;a href="https://github.com/enviodev/open-indexer-benchmark" rel="noopener noreferrer"&gt;Sentio benchmark, May 2025&lt;/a&gt;). If you are building onchain and need indexing that keeps up with your chain, check out the &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Envio Now Supports 70+ Blockchains</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:41:14 +0000</pubDate>
      <link>https://dev.to/envio/envio-now-supports-70-blockchains-44jc</link>
      <guid>https://dev.to/envio/envio-now-supports-70-blockchains-44jc</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx0mr9zg1j95t4yyr03rq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx0mr9zg1j95t4yyr03rq.png" alt="Envio Now Supports 70+ Blockchains" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Envio's HyperSync now supports over 70 EVM-compatible networks plus Fuel, providing reliable real-time data access at speeds up to 2000x faster than standard RPC.&lt;/li&gt;
&lt;li&gt;HyperIndex adds full multichain indexing with a single config.yaml and a single GraphQL endpoint, making it structurally simpler than The Graph or Goldsky for cross-chain data.&lt;/li&gt;
&lt;li&gt;If your network is not yet supported, you can request HyperSync support directly in the Envio Discord.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Envio's HyperSync supports over 70 EVM-compatible networks along with Fuel, providing reliable real-time data access across the Web3 ecosystem. This milestone advances the goal of making decentralized data more efficient and accessible for developers and analysts building across multiple blockchains.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is HyperSync?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperSync/overview" rel="noopener noreferrer"&gt;HyperSync&lt;/a&gt; is Envio's advanced data node, built in Rust to dramatically speed up blockchain data retrieval. It operates as a real-time, high-speed query layer, offering a low-level API compatible with Python, Rust, Node.js, and Go. With HyperSync, you can query millions of events in seconds, delivering sync speeds up to 2000x faster than traditional RPC methods.&lt;/p&gt;

&lt;p&gt;HyperSync is well suited for performance-heavy applications like block explorers, data analytics platforms, and blockchain bridges. Traditional syncing methods can be slow and resource-intensive, especially across multiple networks. HyperSync optimizes these processes with intelligent caching and efficient data retrieval, giving you faster access to both real-time and historical blockchain data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multichain indexing support
&lt;/h2&gt;

&lt;p&gt;Envio HyperIndex provides multichain indexing support, enabling you to efficiently index and query multiple blockchains with a single indexer. This eliminates redundant tools, streamlines workflows, and ensures high performance at scale.&lt;/p&gt;

&lt;p&gt;Unlike The Graph (which requires a separate subgraph per chain with separate endpoints) or Goldsky (which requires separate pipelines per chain), Envio uses a single &lt;code&gt;config.yaml&lt;/code&gt; to define all networks and exposes a single GraphQL endpoint. This makes cross-chain data access significantly simpler to build and maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Supported networks
&lt;/h2&gt;

&lt;p&gt;Envio supports any EVM chain and Fuel with an expanding list of networks, including &lt;a href="https://arbitrum.io/" rel="noopener noreferrer"&gt;Arbitrum&lt;/a&gt;, &lt;a href="https://www.base.org/" rel="noopener noreferrer"&gt;Base&lt;/a&gt;, &lt;a href="https://blast.io/en" rel="noopener noreferrer"&gt;Blast&lt;/a&gt;, &lt;a href="https://celo.org/" rel="noopener noreferrer"&gt;Celo&lt;/a&gt;, &lt;a href="https://www.chiliz.com/" rel="noopener noreferrer"&gt;Chiliz&lt;/a&gt;, &lt;a href="https://citrea.xyz/" rel="noopener noreferrer"&gt;Citrea&lt;/a&gt;, &lt;a href="https://darwinia.network/" rel="noopener noreferrer"&gt;Darwinia&lt;/a&gt;, &lt;a href="https://ethereum.org/en/" rel="noopener noreferrer"&gt;Ethereum&lt;/a&gt;, &lt;a href="https://www.gnosis.io/" rel="noopener noreferrer"&gt;Gnosis&lt;/a&gt;, &lt;a href="https://www.metis.io/" rel="noopener noreferrer"&gt;Metis&lt;/a&gt;, &lt;a href="https://www.monad.xyz/" rel="noopener noreferrer"&gt;Monad&lt;/a&gt;, &lt;a href="https://www.morphl2.io/" rel="noopener noreferrer"&gt;Morph&lt;/a&gt;, &lt;a href="https://www.optimism.io/" rel="noopener noreferrer"&gt;Optimism&lt;/a&gt;, &lt;a href="https://polygon.technology/" rel="noopener noreferrer"&gt;Polygon&lt;/a&gt;, &lt;a href="https://rootstock.io/" rel="noopener noreferrer"&gt;Rootstock&lt;/a&gt;, &lt;a href="https://scroll.io/" rel="noopener noreferrer"&gt;Scroll&lt;/a&gt;, and many more.&lt;/p&gt;

&lt;p&gt;See the full list of supported networks in the &lt;a href="https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are rapidly adding new supported networks. If your network is not listed or you would like HyperSync support added, pop us a message in our &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use Envio?
&lt;/h2&gt;

&lt;p&gt;Envio HyperIndex offers a developer-centric blockchain data indexing solution, empowering you to efficiently access and process both real-time and historical smart contract data served via GraphQL API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flexible language support&lt;/strong&gt;: Configure your event handling in JavaScript, TypeScript, or ReScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HyperSync&lt;/strong&gt;: Delivers up to 2000x faster indexing than standard RPC for historical onchain data. Use of RPC is optional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No-code quickstart&lt;/strong&gt;: Autogenerate the key boilerplate for an entire indexer project from single or multiple smart contracts. Deploy within minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multichain support&lt;/strong&gt;: Aggregate data across multiple networks into a single database. Query all your data with a unified GraphQL API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Factory contracts&lt;/strong&gt;: Automatically register and process events emitted by all child contracts created by a specified factory or dynamic contract.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosted service&lt;/strong&gt;: A managed service platform for building, hosting, and querying Envio's Indexers with guaranteed uptime and performance service level agreements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/getting-started" rel="noopener noreferrer"&gt;Getting started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/configuration-file" rel="noopener noreferrer"&gt;Guides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/tutorial-op-bridge-deposits" rel="noopener noreferrer"&gt;Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Get support&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Envio is a powerful alternative to traditional blockchain indexing methods. Its single-config multichain approach simplifies cross-chain data access and eliminates the per-chain overhead that comes with The Graph subgraphs or Goldsky pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I check if my network is supported by Envio HyperSync?
&lt;/h3&gt;

&lt;p&gt;Visit the &lt;a href="https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks" rel="noopener noreferrer"&gt;HyperSync supported networks page&lt;/a&gt; in the documentation. If your network is not listed, you can request support by opening a message in the &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use Envio on a network that HyperSync does not yet support?
&lt;/h3&gt;

&lt;p&gt;Yes. For networks without HyperSync support, Envio HyperIndex falls back to standard RPC for data retrieval. You provide an RPC URL in your config, and the indexer works the same way, just without the HyperSync speed boost. HyperSync support is added regularly.&lt;/p&gt;

&lt;h3&gt;
  
  
  What languages can I use with the HyperSync API?
&lt;/h3&gt;

&lt;p&gt;HyperSync exposes a low-level API with clients for Python, Rust, Node.js, and Go. You can retrieve data in JSON, Arrow, or Parquet formats depending on your pipeline needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does Envio's multichain support compare to The Graph?
&lt;/h3&gt;

&lt;p&gt;The Graph requires a separate subgraph deployment for each chain, with separate GraphQL endpoints per network. Envio uses a single &lt;code&gt;config.yaml&lt;/code&gt; to define all networks and a single GraphQL endpoint for all chains. This means less boilerplate, fewer deployments to manage, and simpler cross-chain queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is HyperSync available as a standalone API, or only through HyperIndex?
&lt;/h3&gt;

&lt;p&gt;HyperSync is available both as the underlying data layer for HyperIndex and as a standalone API. Data analysts can query HyperSync directly using the Python, Rust, Node.js, or Go clients for custom data pipelines, analytics, and research use cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Track Polymarket Trades Using Envio's HyperSync</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:41:10 +0000</pubDate>
      <link>https://dev.to/envio/how-to-track-polymarket-trades-using-envios-hypersync-3gaj</link>
      <guid>https://dev.to/envio/how-to-track-polymarket-trades-using-envios-hypersync-3gaj</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk2mmesjjxbh7on66jich.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk2mmesjjxbh7on66jich.png" alt="How to Track Polymarket Trades Using Envio's HyperSync" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a real-time Polymarket trade tracker using Envio HyperSync and TypeScript with Bun.&lt;/li&gt;
&lt;li&gt;Stream block heights from Polygon and query OrderFilled events from the Polymarket Exchange contracts on each new block.&lt;/li&gt;
&lt;li&gt;Decode events with Viem, identify buy vs sell trades by checking &lt;code&gt;makerAssetId&lt;/code&gt;, and calculate price per share.&lt;/li&gt;
&lt;li&gt;Extend with filters for trade amount or specific wallet addresses to track high-conviction traders.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since the rise of prediction markets like &lt;a href="https://polymarket.com" rel="noopener noreferrer"&gt;Polymarket&lt;/a&gt; and &lt;a href="https://kalshi.com" rel="noopener noreferrer"&gt;Kalshi&lt;/a&gt;, many people have been tracking activity on them to get a sense of where the money is going. If we try to track every trade on these prediction markets, you will see many people betting like $10 here, $15 there. If you want a stronger signal, then you should track trades with higher amounts, since those traders have more conviction in the outcome they are betting on.&lt;/p&gt;

&lt;p&gt;In this article, we are going to build a tool with HyperSync where you can track Polymarket trades above a certain amount. We also have one feature where you can track trades from certain addresses. If you know some addresses from good traders, you can follow them too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;We are going to use Bun for this article, so make sure you have it installed. If not, please check the &lt;a href="https://bun.com/docs/installation" rel="noopener noreferrer"&gt;Bun documentation&lt;/a&gt; for installation instructions. If you want to use some other runtime that supports TypeScript, you can do that too.&lt;/p&gt;

&lt;p&gt;You will also need an Envio API token to access HyperSync. If you don’t have it already, go to &lt;a href="https://envio.dev/app/api-tokens" rel="noopener noreferrer"&gt;https://envio.dev/app/api-tokens&lt;/a&gt; and you can find your token there.&lt;/p&gt;

&lt;p&gt;Here are step-by-step instructions for creating new API tokens: &lt;a href="https://docs.envio.dev/docs/HyperSync/api-tokens#generating-api-tokens" rel="noopener noreferrer"&gt;https://docs.envio.dev/docs/HyperSync/api-tokens#generating-api-tokens&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is HyperSync
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperSync/overview" rel="noopener noreferrer"&gt;HyperSync&lt;/a&gt; is Envio's high-performance blockchain data retrieval layer, built as an alternative to traditional JSON-RPC endpoints. It gives developers direct access to onchain data up to 2000x faster than standard RPC methods.&lt;/p&gt;

&lt;p&gt;For this article, we are using HyperSync to stream real-time block heights and query Polymarket trade events on Polygon as they happen. Client libraries are available for Python, Rust, Node.js, and Go. HyperSync supports 80+ EVM chains, so the same approach works across any supported network.&lt;/p&gt;

&lt;h2&gt;
  
  
  OrderFilled Event
&lt;/h2&gt;

&lt;p&gt;Before we start writing the script, let’s talk about the &lt;code&gt;OrderFilled&lt;/code&gt; event. This event is emitted when a trade has been filled, so these are confirmed trades where a user is buying or selling shares. Here is the event:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    event OrderFilled(
        bytes32 indexed orderHash,
        address indexed maker,
        address indexed taker,
        uint256 makerAssetId,
        uint256 takerAssetId,
        uint256 makerAmountFilled,
        uint256 takerAmountFilled,
        uint256 fee
    );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Most of the fields are self-explanatory, but we still haven’t answered one question: if this event is emitted for all orders, then how do we know which one is buy vs sell? If the value of &lt;code&gt;makerAssetId&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt;, then that is a buy order where the user is buying shares, and vice versa.&lt;/p&gt;

&lt;p&gt;To calculate price per share for a buy trade, we can use &lt;code&gt;makerAmountFilled&lt;/code&gt; and &lt;code&gt;takerAmountFilled&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Price per share in a buy trade = &lt;code&gt;makerAmountFilled / takerAmountFilled&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To calculate per-share price in a sell trade, we just switch those values. Now that we have a basic understanding of what data to fetch and what that data tells us, we can start writing our script with Bun.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using HyperSync Client
&lt;/h2&gt;

&lt;p&gt;To create a Bun project and install the HyperSync client along with Viem for decoding events, you can use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;track-trades &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;track-trades
bun init &lt;span class="nt"&gt;-y&lt;/span&gt;
bun add @envio-dev/hypersync-client viem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re new to HyperSync clients, please start by going through these examples: &lt;a href="https://docs.envio.dev/docs/HyperSync/hypersync-clients" rel="noopener noreferrer"&gt;https://docs.envio.dev/docs/HyperSync/hypersync-clients&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let’s discuss how we are going to structure our script. Instead of streaming events directly, we are going to stream height. When we get a new height, we query HyperSync to fetch the data we need. Here is a visual representation of that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7eor2u5xwsp22sih3emd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7eor2u5xwsp22sih3emd.png" alt="Sequence diagram showing index.ts streaming new block heights from HyperSync and querying OrderFilled events on each new height" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stream Height
&lt;/h2&gt;

&lt;p&gt;We already have a height-streaming example in the HyperSync Node client, and we are going to use that here. Open &lt;code&gt;index.ts&lt;/code&gt; and paste the following snippet, then we can go over it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;HypersyncClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// for later use&lt;/span&gt;
  &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;QueryResponseData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// for later use&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@envio-dev/hypersync-client&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;decodeEventLog&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;viem&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// for later use&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Create hypersync client using the mainnet hypersync endpoint&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HypersyncClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://polygon.hypersync.xyz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;apiToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ENVIO_API_TOKEN&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="c1"&gt;// Create a height stream to monitor blockchain height changes&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;heightStream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;streamHeight&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Height stream created. Listening for height updates...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Track the last known height to detect changes&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Receive the next event from the height stream&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;heightStream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recv&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Height stream ended by server&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="c1"&gt;// Handle different types of events&lt;/span&gt;
      &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Height&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchOrderFilledEvents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// will be explained later&lt;/span&gt;
          &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Connected&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Connected to height stream`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Reconnecting&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;`Reconnecting to height stream in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delayMillis&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;ms due to error: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errorMsg&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;// Tells the typescript compiler that we have covered all possible event types&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;_exhaustiveCheck&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unhandled event type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Error in height stream:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Always close the stream to clean up resources&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;heightStream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Height stream closed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first thing we are doing in &lt;code&gt;main&lt;/code&gt; is creating the HyperSync client with &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;apiToken&lt;/code&gt; (which should be stored in a &lt;code&gt;.env&lt;/code&gt; file, so create one and store your Envio API token there).&lt;/p&gt;

&lt;p&gt;We have a &lt;code&gt;streamHeight&lt;/code&gt; function on the client that emits 3 types of events: &lt;code&gt;Height&lt;/code&gt;, &lt;code&gt;Connected&lt;/code&gt;, and &lt;code&gt;Reconnecting&lt;/code&gt;. When we get a new &lt;code&gt;Height&lt;/code&gt; event with the latest block number, we call &lt;code&gt;fetchOrderFilledEvents&lt;/code&gt;, where our parsing logic will live.&lt;/p&gt;

&lt;p&gt;After creating the stream with &lt;code&gt;streamHeight&lt;/code&gt;, we need to listen to those events, so we created a &lt;code&gt;while&lt;/code&gt; loop that checks data from &lt;code&gt;.recv()&lt;/code&gt; and a &lt;code&gt;switch&lt;/code&gt; statement to act on the event type we get. The rest is mostly boilerplate error handling, so we don’t need to go too deep into that.&lt;/p&gt;

&lt;p&gt;Now we have our streaming logic, so we can move to &lt;code&gt;fetchOrderFilledEvents&lt;/code&gt;, which will handle the event parsing.&lt;/p&gt;

&lt;h2&gt;
  
  
  fetchOrderFilledEvents Function
&lt;/h2&gt;

&lt;p&gt;This function will take the height we got from &lt;code&gt;streamHeight&lt;/code&gt; and query blocks to get the events we want. Let’s start with a few basic things we need for fetching and decoding the data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contract addresses&lt;/li&gt;
&lt;li&gt;ABI of the event&lt;/li&gt;
&lt;li&gt;Event signature hash (aka &lt;code&gt;Topic0&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here they are, so add them somewhere at the top of the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;EXCHANGE_ADDRESSES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982e&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0xc5d563a36ae78145c45a50134d48a1215220f80a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ORDER_FILLED_TOPIC&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0xd0a08e8c493f9c94f29311604c9de1b4e8c8d4c06bd0c789af57f2d65bfec0f6&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ORDER_FILLED_ABI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;anonymous&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bytes32&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;orderHash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bytes32&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;address&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;maker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;address&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;address&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;taker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;address&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;makerAssetId&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;takerAssetId&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;makerAmountFilled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;takerAmountFilled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;indexed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;internalType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fee&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uint256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;OrderFilled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;event&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ORDER_FILLED_ABI_ITEMS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ORDER_FILLED_ABI&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// we can push it to query directly as an array&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's define the function signature. We are going to pass the HyperSync client and block height to this function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchOrderFilledEvents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HypersyncClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To fetch the data from HyperSync, we need to create a query. If you're not familiar with HyperSync queries, the query builder at &lt;a href="https://builder.hypersync.xyz/" rel="noopener noreferrer"&gt;https://builder.hypersync.xyz/&lt;/a&gt; is a good starting point. In short, in this query we define which event from which contracts we want to fetch, and what fields we want in the response.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;fromBlock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;EXCHANGE_ADDRESSES&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="nx"&gt;ORDER_FILLED_TOPIC&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="p"&gt;[]],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;fieldSelection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Data&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Address&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TransactionHash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BlockNumber&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the &lt;code&gt;get&lt;/code&gt; function to fetch the data and store the logs/events in an array that we can loop over.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;logs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;QueryResponseData&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;logs&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s loop over that array and use &lt;code&gt;decodeEventLog&lt;/code&gt; from Viem to decode the data so we can analyze it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;decodeEventLog&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ORDER_FILLED_ABI_ITEMS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="s2"&gt;`0x&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;topics&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;`0x&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="s2"&gt;`0x&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;[]],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eventName&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;OrderFilled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;makerAssetId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;makerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;takerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;maker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;taker&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;makerAssetId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;makerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;takerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;maker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;taker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="c1"&gt;// TODO: Check if trade is Buy if yes, then log details along with price per share&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last part of this script is checking if the trade is a buy trade, which we can confirm when &lt;code&gt;makerAssetId&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt;. We also need to calculate price per share. We already know the formula: &lt;code&gt;makerAmountFilled / takerAmountFilled&lt;/code&gt;. That value should be formatted to 6 decimals, and then we have the price per share.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;formatRatio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;numerator&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;denominator&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;precision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;denominator&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="nc"&gt;BigInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;precision&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scaled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numerator&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;denominator&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;whole&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;scaled&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fraction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scaled&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;padStart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;precision&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;whole&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fraction&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;fetchOrderFilledEvents&lt;/code&gt; should look like this at the end.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchOrderFilledEvents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HypersyncClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Topic0: 0xd0a08e8c493f9c94f29311604c9de1b4e8c8d4c06bd0c789af57f2d65bfec0f6&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fromBlock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;EXCHANGE_ADDRESSES&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="nx"&gt;ORDER_FILLED_TOPIC&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="p"&gt;[]],&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;fieldSelection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Data&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Address&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Topic3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TransactionHash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;BlockNumber&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;logs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;QueryResponseData&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;logs&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;decodeEventLog&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ORDER_FILLED_ABI_ITEMS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="s2"&gt;`0x&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;topics&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;`0x&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="s2"&gt;`0x&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;[]],&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eventName&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;OrderFilled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;makerAssetId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;makerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;takerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;maker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;taker&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
      &lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;makerAssetId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;makerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;takerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bigint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;maker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;taker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="c1"&gt;// TODO: Check if trade is Buy if yes, then log details along with price per share&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;makerAssetId&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pricePerShare&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;formatRatio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;makerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;takerAmountFilled&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`[BUY] block=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;blockNumber&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; tx=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transactionHash&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; maker=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;maker&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; taker=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;taker&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; pricePerShare=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;pricePerShare&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Complete Project
&lt;/h2&gt;

&lt;p&gt;You can check the project code in this repo: &lt;a href="https://github.com/enviodev/track-poly-trades" rel="noopener noreferrer"&gt;https://github.com/enviodev/track-poly-trades&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the full production-scale Polymarket indexer covering all 8 subgraph domains and 4 billion events, see the &lt;a href="https://docs.envio.dev/blog/polymarket-hyperindex-case-study" rel="noopener noreferrer"&gt;Polymarket HyperIndex Case Study&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Our aim was to create a tracker that filters trades based on amount and addresses, but we haven’t completed that aim yet. This article gave you the main steps you need to create that tool, so your next step is to add filtering for amount and addresses.&lt;/p&gt;

&lt;p&gt;Don’t forget to share it with us on socials or in our Discord. Looking forward to seeing what you build on top of this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Poly-Whales TUI
&lt;/h2&gt;

&lt;p&gt;Don’t want to set up the full project but still want to try it out? You can use the Poly-Whales TUI.&lt;/p&gt;

&lt;p&gt;Run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx poly-whales
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Furbsl6y2a79v35a26k0w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Furbsl6y2a79v35a26k0w.png" alt="Terminal UI titled &amp;quot;Polymarket Whale Tracker&amp;quot; with a $500 threshold panel, watch addresses panel, and a live trades list of BUY orders with USD amounts, maker addresses, and timestamps" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why use HyperSync for Polymarket trade tracking instead of RPC?
&lt;/h3&gt;

&lt;p&gt;HyperSync provides up to 2,000x faster data access than standard RPC and exposes a streaming interface tailored to filtered event queries. For Polymarket's high-throughput Exchange contracts on Polygon, this avoids the RPC rate limits and polling overhead that constrain real-time trade trackers built on standard JSON-RPC. Polygon is one of 80+ EVM chains with native HyperSync coverage, and HyperSync client libraries are available for TypeScript/Node.js, Python, Rust, and Go.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I track Polymarket trades in real time?
&lt;/h3&gt;

&lt;p&gt;Use the Envio HyperSync Node.js client to stream block heights from Polygon, then query the Exchange contract for OrderFilled events on each new block. Decode the event data with Viem to extract maker, taker, asset IDs, and amounts. A &lt;code&gt;makerAssetId&lt;/code&gt; of 0 indicates a buy trade.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I identify buy vs sell trades on Polymarket?
&lt;/h3&gt;

&lt;p&gt;In the OrderFilled event, if &lt;code&gt;makerAssetId&lt;/code&gt; is 0, the order is a buy where the maker is spending USDC to purchase shares. If &lt;code&gt;makerAssetId&lt;/code&gt; is non-zero, the order is a sell. Price per share for a buy trade is &lt;code&gt;makerAmountFilled / takerAmountFilled&lt;/code&gt;, formatted to 6 decimal places.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the Polymarket Exchange contract addresses on Polygon?
&lt;/h3&gt;

&lt;p&gt;The Polymarket Exchange contracts on Polygon are &lt;code&gt;0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982e&lt;/code&gt; and &lt;code&gt;0xc5d563a36ae78145c45a50134d48a1215220f80a&lt;/code&gt;. The OrderFilled event topic0 is &lt;code&gt;0xd0a08e8c493f9c94f29311604c9de1b4e8c8d4c06bd0c789af57f2d65bfec0f6&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there a ready-made Polymarket trade tracker I can run?
&lt;/h3&gt;

&lt;p&gt;Yes. The full project is available at &lt;a href="https://github.com/enviodev/track-poly-trades" rel="noopener noreferrer"&gt;github.com/enviodev/track-poly-trades&lt;/a&gt;. For a terminal UI version, run &lt;code&gt;pnpx poly-whales&lt;/code&gt; to launch the Poly-Whales TUI, which tracks Polymarket whale activity in real time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Migrate from Alchemy to Envio</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:41:04 +0000</pubDate>
      <link>https://dev.to/envio/migrate-from-alchemy-to-envio-5894</link>
      <guid>https://dev.to/envio/migrate-from-alchemy-to-envio-5894</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsjc7yd66ho2js28y0dlp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsjc7yd66ho2js28y0dlp.png" alt="Migrate from Alchemy to Envio" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Migrate from Alchemy to Envio
&lt;/h1&gt;

&lt;p&gt;Migrating Alchemy subgraphs to Envio’s HyperIndex is a simple and developer-friendly process. Alchemy subgraphs follow The Graph’s model and HyperIndex uses a very similar structure, so most of your existing setup can carry over cleanly.&lt;/p&gt;

&lt;p&gt;If you're familiar with The Graph’s libraries, the migration process should be straightforward. You can also utilize tools like Cursor to speed things up. If you are new to HyperIndex, we strongly recommend starting with our &lt;a href="https://docs.envio.dev/docs/HyperIndex/quickstart" rel="noopener noreferrer"&gt;Quickstart&lt;/a&gt; guide before you begin your migration from Alchemy. If you are new to the category entirely, see &lt;a href="https://docs.envio.dev/blog/what-is-a-blockchain-indexer" rel="noopener noreferrer"&gt;what a blockchain indexer is&lt;/a&gt; for the wider context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Migrate to Envio’s HyperIndex?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High-Speed Performance&lt;/strong&gt;: 142x faster than subgraphs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lower Costs&lt;/strong&gt;: Reduced infrastructure requirements and operational expenses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better Developer Experience&lt;/strong&gt;: Simplified configuration and deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multichain Native&lt;/strong&gt;: Index data across multiple EVM chains through a single HyperIndex project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Development&lt;/strong&gt;: Run your indexers locally for fast iteration and easier debugging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;White Glove Migration Support&lt;/strong&gt;: Get direct support from the Envio team for a smoother migration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitOps Ready Deployments&lt;/strong&gt;: Link your GitHub repo and manage multiple deployments in a clean unified workflow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Features&lt;/strong&gt;: Access to features like external calls and block handlers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Integration&lt;/strong&gt;: Easily integrate existing GraphQL APIs and applications&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Migrate from Alchemy to Envio in 4 easy steps
&lt;/h2&gt;

&lt;p&gt;This Migration consists of 4 major steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a HyperIndex Project&lt;/li&gt;
&lt;li&gt;subgraph.yaml Migration to config.yaml&lt;/li&gt;
&lt;li&gt;schema.graphql Migration&lt;/li&gt;
&lt;li&gt;Event Handler Migration&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create a HyperIndex Project
&lt;/h3&gt;

&lt;p&gt;Start by spinning up a basic HyperIndex project with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpx envio init template &lt;span class="nt"&gt;--name&lt;/span&gt; alchemy-migration &lt;span class="nt"&gt;--directory&lt;/span&gt; alchemy-migration &lt;span class="nt"&gt;--template&lt;/span&gt;  greeter &lt;span class="nt"&gt;--api-token&lt;/span&gt; &lt;span class="s2"&gt;"YOUR_ENVIO_API_KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the project is created, drop your API key into the .env file and you’re good to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  subgraph.yaml Migration to config.yaml
&lt;/h3&gt;

&lt;p&gt;In HyperIndex, all project configuration lives in &lt;code&gt;config.yaml&lt;/code&gt;. This is where you define contract addresses, the networks you want to index, and the specific events you want to track from those contracts.&lt;/p&gt;

&lt;p&gt;Below is an example showing how a Uniswap V4 subgraph.yaml maps to a HyperIndex &lt;code&gt;config.yaml&lt;/code&gt; in a real migration.&lt;/p&gt;

&lt;p&gt;The Graph - &lt;code&gt;subgraph.yaml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;specVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.4&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Uniswap is a decentralized protocol for automated token exchange on Ethereum.&lt;/span&gt;
&lt;span class="na"&gt;repository&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://github.com/Uniswap/v4-subgraph&lt;/span&gt;
&lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./schema.graphql&lt;/span&gt;
&lt;span class="na"&gt;features&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;nonFatalErrors&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;grafting&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ethereum/contract&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PositionManager&lt;/span&gt;
    &lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mainnet&lt;/span&gt;
    &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;abi&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PositionManager&lt;/span&gt;
      &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e"&lt;/span&gt;
      &lt;span class="na"&gt;startBlock&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;21689089&lt;/span&gt;
    &lt;span class="na"&gt;mapping&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ethereum/events&lt;/span&gt;
      &lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.7&lt;/span&gt;
      &lt;span class="na"&gt;language&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wasm/assemblyscript&lt;/span&gt;
      &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./src/mappings/index.ts&lt;/span&gt;
      &lt;span class="na"&gt;entities&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Position&lt;/span&gt;
      &lt;span class="na"&gt;abis&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PositionManager&lt;/span&gt;
          &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./abis/PositionManager.json&lt;/span&gt;
      &lt;span class="na"&gt;eventHandlers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Subscription(indexed uint256,indexed address)&lt;/span&gt;
          &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;handleSubscription&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Unsubscription(indexed uint256,indexed address)&lt;/span&gt;
          &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;handleUnsubscription&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Transfer(indexed address,indexed address,indexed uint256)&lt;/span&gt;
          &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;handleTransfer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;HyperIndex - &lt;code&gt;config.yaml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# yaml-language-server: $schema=./node_modules/envio/evm.schema.json&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;uni-v4-indexer&lt;/span&gt;
&lt;span class="na"&gt;chains&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;start_block&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;21689089&lt;/span&gt;
    &lt;span class="na"&gt;contracts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PositionManager&lt;/span&gt;
        &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e"&lt;/span&gt;
        &lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Subscription(uint256 indexed tokenId, address indexed subscriber)&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Unsubscription(uint256 indexed tokenId, address indexed subscriber)&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Transfer(address indexed from, address indexed to, uint256 indexed id)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you hit any issues, check the &lt;a href="https://docs.envio.dev/docs/HyperIndex/configuration-file" rel="noopener noreferrer"&gt;Configuration File&lt;/a&gt; docs or reach out to our team in &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  schema.graphql Migration
&lt;/h3&gt;

&lt;p&gt;This step is simple. You keep the entire file as is, with one small change: remove all &lt;code&gt;@entity&lt;/code&gt; directives from your entities. Everything else stays the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Event Handler Migration
&lt;/h3&gt;

&lt;p&gt;This is the final step of the migration which consists of two parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Moving from AssemblyScript to TypeScript&lt;/li&gt;
&lt;li&gt;Updating Subgraph syntax to HyperIndex syntax&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  AssemblyScript to TypeScript
&lt;/h4&gt;

&lt;p&gt;HyperIndex uses TypeScript instead of AssemblyScript. Since AssemblyScript is a subset of TypeScript, you can simply copy most of your code over without worrying about major syntax changes.&lt;/p&gt;

&lt;h4&gt;
  
  
  Subgraph to HyperIndex
&lt;/h4&gt;

&lt;p&gt;The HyperIndex workflow is very similar to Subgraphs, but there are a few important differences to keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replace &lt;code&gt;ENTITY.save()&lt;/code&gt; with &lt;code&gt;context.ENTITY.set(VALUES)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Handlers need to be async&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;await&lt;/code&gt; when loading entities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you start using HyperIndex, you’ll pick up the differences quickly.&lt;/p&gt;

&lt;p&gt;Here is a code snippet to give you a sense of what these changes look like in practice.&lt;/p&gt;

&lt;p&gt;The Graph - &lt;code&gt;eventHandler.ts&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleSubscription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SubscriptionEvent&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;subscription&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Subscribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIndex&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokenId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokenId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subscriber&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toHexString&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIndex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;blockNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokenId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;HyperIndex - &lt;code&gt;eventHandler.ts&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;indexer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;envio&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;indexer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;contract&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PoolManager&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Subscription&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;entity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIndex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;tokenId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokenId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subscriber&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;blockNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;logIndex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIndex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokenId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Subscription&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entity&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a few extra tips on migrating from Alchemy to Envio, check out our other &lt;a href="https://docs.envio.dev/docs/HyperIndex/migration-guide#extra-tips" rel="noopener noreferrer"&gt;migration guide&lt;/a&gt; in our docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Share Your Learnings
&lt;/h2&gt;

&lt;p&gt;If you come across anything useful during your migration, please feel free to contribute. Simply open a &lt;a href="https://github.com/enviodev/docs/pulls" rel="noopener noreferrer"&gt;PR&lt;/a&gt; to this guide and help future developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Help
&lt;/h2&gt;

&lt;p&gt;Join our &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; if you need support. It is the fastest way to get direct help from the team and the community.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Visualizers &amp; Dashboards on Monad using Envio</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:40:28 +0000</pubDate>
      <link>https://dev.to/envio/building-visualizers-dashboards-on-monad-using-envio-2cab</link>
      <guid>https://dev.to/envio/building-visualizers-dashboards-on-monad-using-envio-2cab</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdayy5y1jyrm79bqq0fe0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdayy5y1jyrm79bqq0fe0.png" alt="Building Visualizers &amp;amp; Dashboards on Monad using Envio" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As part of Mission 4 from the Monad Developers community, builders created real-time dashboards and visualizers on Monad using Envio, demonstrating what is possible with a fast chain and a high-performance indexer.&lt;/li&gt;
&lt;li&gt;Envio's HyperSync and HyperIndex power all submissions, handling real-time data streaming with no RPC rate limit concerns and minimal latency.&lt;/li&gt;
&lt;li&gt;All Envio indexers use three core files (config.yaml, schema.graphql, EventHandlers.ts) and deploy to Envio's hosted service via a GitHub push.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As part of Mission 4 from the &lt;a href="https://discord.gg/monaddev" rel="noopener noreferrer"&gt;Monad Developers&lt;/a&gt; community, builders were challenged to create real-time dashboards and visualizers on &lt;a href="https://www.monad.xyz/" rel="noopener noreferrer"&gt;Monad&lt;/a&gt; using Envio. The results were exceptional, showcasing not only creative visualizers and dashboards but also what is possible with Envio's indexing stack on a high-throughput chain.&lt;/p&gt;

&lt;p&gt;Monad's rapid growth has created a strong need for scalable, real-time data infrastructure. Whether tracking protocol activity, analyzing transaction flows, or building live analytics dashboards, a high-performance indexer is critical. These submissions highlight how Envio simplifies data indexing on Monad, enabling rich, real-time applications with speed, accuracy, and ease.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monad Super Visualizer
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/monadicoo" rel="noopener noreferrer"&gt;@monadicoo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This immersive dashboard allows users to explore live activity across the entire Monad chain, with deep visibility into data from specific protocols, contracts, or addresses. Envio powers two core functionalities: streaming live, chain-wide activity to the homepage, and offering a filtered data feed for targeted protocol analysis.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://monadviewer.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Monad Genki Dama
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/sifu_lam" rel="noopener noreferrer"&gt;@sifu_lam&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Dragon Ball Z-inspired visual experience that depicts each Monad testnet block as energy contributing to a Genki Dama. Monanimals generate power balls representing transaction types, visually charging the Monad mainnet. Envio's HyperSync ensures real-time accuracy and high throughput with minimal latency.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://monad-genki-dama.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  LendHub Stats Page
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/bossonormal1" rel="noopener noreferrer"&gt;@bossonormal1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LendHub's dashboard presents real-time analytics for a peer-to-peer NFT lending protocol. It tracks metrics such as loans listed, funded, repaid, claimed, and withdrawn. Custom-built with Envio's config.yaml, schema.graphql, and event handlers, this tool uses a GraphQL endpoint to update dynamically based on key smart contract events.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://www.lendhub.xyz/stats" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Miris
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/velkan_gst" rel="noopener noreferrer"&gt;@velkan_gst&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Miris is a fully featured chain visualizer offering insights into blocks, transactions, and overall network health. Envio handles the indexing of core protocols like Wormhole and Apr Labs, and the Explorer page uncovers activity from additional Monad projects. Built using Apollo Client and Next.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monad Frens
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/WagmiArc" rel="noopener noreferrer"&gt;@WagmiArc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Monad Frens delivers real-time and historical chain insights in a visually engaging format, including a pizza-themed chain status display. Envio's HyperSync feeds accurate block and transaction data, while a custom API calculates cumulative transactions since Block 0. The dashboard filters transactions by timestamp, ensuring comprehensive tracking.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://dashboard.monadfrens.fun/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  MonLake
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/YOUZYPOOR" rel="noopener noreferrer"&gt;@YOUZYPOOR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An aquarium-themed visualization of the Monad testnet where Monanimals represent blocks and treasure chests symbolize various transaction types. Failed transactions appear as jellyfish. Real-time metrics like gas price and transaction distribution are updated using Envio, which indexes all relevant data without stressing RPC endpoints.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://monlake.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Animonad
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/Samruddhi_Krnr" rel="noopener noreferrer"&gt;@Samruddhi_Krnr&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Animonad tracks live transactions per second across Monad-based dApps like Magma, PancakeSwap, and Narwhal Finance. Each transaction is categorized by address and function signature. Envio's HyperSync facilitates rapid data retrieval to update the UI every second, powering dynamic graphs and protocol rankings.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://animonad.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  NadMetrics
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/yomax75" rel="noopener noreferrer"&gt;@yomax75&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built with React, TypeScript, Node.js, and WebSockets, NadMetrics is a robust analytics platform offering real-time and historical data for Monad. The dashboard is ideal for developers and analysts monitoring chain volume, transaction flow, and usage trends. Envio serves as the foundation for its high-speed data ingestion.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://nadmetrics.com/live" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Monalytics
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/gabriell_santi" rel="noopener noreferrer"&gt;@gabriell_santi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An interactive dashboard for real-time visualization of activity on the Monad testnet. It leverages Envio for continuous onchain event streaming and HyperRPC for fast, low-latency data access. The platform delivers both a global view of the network, including metrics like TPS, gas usage, and block entropy, and protocol-specific panels for apps like MonTools, Castora, Ambient, and more.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://analytics.montools.xyz/chain" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Monanimals Blast Mayhem
&lt;/h2&gt;

&lt;p&gt;By &lt;a href="https://x.com/Pradeeppilot2k5" rel="noopener noreferrer"&gt;@Pradeeppilot2k5&lt;/a&gt; and &lt;a href="https://x.com/vidit_0" rel="noopener noreferrer"&gt;@vidit_0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A gamified dashboard transforming real-time blockchain stats into interactive graphics. Monanimals symbolize block numbers, and animated graphs display key metrics such as gas usage, TPS, and block peers. Envio's HyperRPC ensures seamless data delivery for a high-performance user experience.&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://monanimalblastmayhem.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Indexing Monad data using Envio
&lt;/h2&gt;

&lt;p&gt;Envio offers a modular indexing solution for developers and analysts seeking to build scalable, real-time applications on Monad. Whether you are building visual dashboards or analytics platforms, Envio's indexing stack provides the essential building blocks to transform raw blockchain data into accessible, actionable insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  HyperIndex
&lt;/h3&gt;

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

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  HyperSync
&lt;/h3&gt;

&lt;p&gt;A high-performance data retrieval layer that gives developers unprecedented access to data on Monad. It directly replaces traditional RPC endpoints, delivering up to 2000x 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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperSync/overview" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  HyperRPC
&lt;/h3&gt;

&lt;p&gt;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 latency and eliminating the bottlenecks of traditional RPC endpoints.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperRPC/overview-hyperrpc" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Envio makes it easy to define events, build handlers, and deploy powerful indexers that power dashboards, data tools, analytics platforms, and more at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I get started building a dashboard on Monad with Envio?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;pnpx envio init&lt;/code&gt; to scaffold a new indexer from your contract address or ABI. Define your entities in &lt;code&gt;schema.graphql&lt;/code&gt;, configure your network and events in &lt;code&gt;config.yaml&lt;/code&gt;, and write your event handlers in TypeScript. Then run &lt;code&gt;pnpm dev&lt;/code&gt; locally or deploy to Envio's hosted service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need to manage RPC endpoints or infrastructure to build a real-time dashboard on Monad?
&lt;/h3&gt;

&lt;p&gt;No. When using Envio HyperIndex, HyperSync is the default data source and handles all data retrieval automatically, with no RPC URL configuration needed for supported chains. Envio's hosted service manages all infrastructure on your behalf.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between using HyperSync and HyperRPC for building dashboards?
&lt;/h3&gt;

&lt;p&gt;HyperSync is the underlying data layer used by HyperIndex for fast historical backfills and real-time event processing. HyperRPC is a drop-in RPC replacement that maps standard JSON-RPC calls to HyperSync queries, useful when your frontend or tooling is already wired to use RPC. For indexer-based dashboards, you typically use HyperIndex, which uses HyperSync internally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can these dashboards handle Monad's 10,000 TPS throughput without falling behind?
&lt;/h3&gt;

&lt;p&gt;Yes. Envio's HyperSync and HyperIndex are designed for high-throughput chains. The submissions in Mission 4 demonstrate real-time tracking of chain-wide activity on Monad without RPC rate limit issues, using Envio as the indexing layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I deploy my Monad dashboard indexer for free with Envio?
&lt;/h3&gt;

&lt;p&gt;Yes. Envio's hosted service includes a free development tier. You connect your GitHub repository, and the Envio Deployments bot auto-deploys on every push. For production workloads requiring SLA guarantees, production tiers are available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Index MegaEth Data Using Envio</title>
      <dc:creator>Envio</dc:creator>
      <pubDate>Thu, 17 Sep 2026 14:40:23 +0000</pubDate>
      <link>https://dev.to/envio/how-to-index-megaeth-data-using-envio-3a8o</link>
      <guid>https://dev.to/envio/how-to-index-megaeth-data-using-envio-3a8o</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxnjuueg056uulz9z22f1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxnjuueg056uulz9z22f1.png" alt="How to Index MegaEth Data Using Envio" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;Envio supports MegaETH with HyperIndex (full GraphQL indexing), HyperSync (up to 2000x faster than RPC for historical data), and HyperRPC (standard RPC proxy backed by HyperSync).&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is MegaETH?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.megaeth.com/" rel="noopener noreferrer"&gt;MegaETH&lt;/a&gt; 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key features
&lt;/h3&gt;

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

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to index data on MegaETH
&lt;/h2&gt;

&lt;h3&gt;
  
  
  HyperIndex
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  HyperSync
&lt;/h3&gt;

&lt;p&gt;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 2000x 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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperSync/overview" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  HyperRPC
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.envio.dev/docs/HyperRPC/overview-hyperrpc" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional features for MegaETH indexers built using Envio
&lt;/h3&gt;

&lt;p&gt;Envio offers a range of advanced capabilities that make it easy to build rich, flexible data pipelines on MegaETH:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flexible language support&lt;/strong&gt;: Configure your event handling in JavaScript, TypeScript, or ReScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No-code quickstart&lt;/strong&gt;: Autogenerate the key boilerplate for an entire indexer project based on single or multiple smart contracts. Deploy within minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multichain support&lt;/strong&gt;: Aggregate data across multiple networks into a single database and query everything through a unified GraphQL API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Join onchain and off-chain data&lt;/strong&gt;: 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Factory contracts&lt;/strong&gt;: Automatically register and process events emitted by all child contracts created by a specified factory or dynamic contract.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosted service&lt;/strong&gt;: 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.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Existing use cases on MegaETH utilizing Envio
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Oracle Wars
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.oraclewars.xyz/" rel="noopener noreferrer"&gt;Oracle Wars&lt;/a&gt; is an experimental dashboard built with Envio's HyperIndex that visualizes real-time oracle behavior on MegaETH. It showcases how push-based oracles like &lt;a href="https://blog.redstone.finance/2025/04/08/introducing-redstone-bolt-the-fastest-blockchain-oracle-to-date/" rel="noopener noreferrer"&gt;RedStone Bolt&lt;/a&gt; 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.&lt;/p&gt;

&lt;p&gt;Take a deeper dive in the full &lt;a href="https://docs.envio.dev/blog/oracle-wars" rel="noopener noreferrer"&gt;Oracle Wars blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is just one of many examples of what Envio is powering in the MegaETH ecosystem. For more, explore the &lt;a href="https://envio.dev/explorer" rel="noopener noreferrer"&gt;Envio Explorer&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relevant resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/getting-started" rel="noopener noreferrer"&gt;Getting Started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperSync/overview" rel="noopener noreferrer"&gt;Envio's HyperSync&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.envio.dev/docs/HyperIndex/hosted-service" rel="noopener noreferrer"&gt;Envio's Hosted Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://envio.dev/chains/megaeth" rel="noopener noreferrer"&gt;Indexing MegaETH Data with Envio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does Envio support MegaETH mainnet and testnet?
&lt;/h3&gt;

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

&lt;h3&gt;
  
  
  How fast is HyperSync on MegaETH compared to standard RPC?
&lt;/h3&gt;

&lt;p&gt;HyperSync can deliver up to 2000x 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I index MegaETH alongside other chains in a single Envio indexer?
&lt;/h3&gt;

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

&lt;h3&gt;
  
  
  How does Envio handle MegaETH's mini-block architecture?
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Envio better than The Graph for MegaETH indexing?
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build With Envio
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://docs.envio.dev/docs/HyperIndex/overview" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, run the benchmarks yourself, and come talk to us about your data needs.&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates by subscribing to our newsletter, following us on X, or hopping into our Discord.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=new-post" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt; 💌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://envio.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt; | &lt;a href="https://twitter.com/envio_indexer" rel="noopener noreferrer"&gt;X&lt;/a&gt; | &lt;a href="https://discord.gg/envio" rel="noopener noreferrer"&gt;Discord&lt;/a&gt; | &lt;a href="https://t.me/+BeS5ihVUFONjNGFk" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; | &lt;a href="https://github.com/enviodev" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; | &lt;a href="https://www.reddit.com/user/Envio_indexer" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
