> For the complete documentation index, see [llms.txt](https://docs.envio.dev/llms.txt).

![Open standard. MIP-16 Queries. Filter on the server and get back only the data you need.](/blog-assets/mip-16-open-standard-blockchain-indexing-v2.png)

:::note TL;DR

- MIP-16 is a proposed open standard that adds five JSON-RPC query methods for reading blockchain data.
- It filters on the server, returns only the fields you ask for, and can join logs to their transactions and blocks.
- `eth_queryBlocks`, `eth_queryTransactions` and `eth_queryLogs` are live on HyperRPC across 82+ EVM chains, with traces and transfers coming soon.
- Using a coding agent? Start with the [agent prompt](#using-mip-16-with-a-coding-agent).

:::

At [Envio](https://envio.dev/), we’ve implemented MIP-16 on [our platform](https://envio.dev/products/hyperrpc). In this post, we’ll look at the standard, how it solves old pains you probably still face, and how you can already use the standard in production on 82+ EVM chains. Let’s begin!

## What is MIP-16?

<a href="https://x.com/typedarray/status/2102466962110492679">![Post by Kevin Koste (@typedarray) proposing five new JSON-RPC methods to fetch EVM blockchain history: eth_queryBlocks, eth_queryTransactions, eth_queryLogs, eth_queryTraces and eth_queryTransfers](/blog-assets/mip-16-proposal-post.webp)</a>

*Kevin Koste (@typedarray), a co-author of the MIP-16 spec, proposing the five methods. [Source](https://x.com/typedarray/status/2102466962110492679)*

MIP-16 adds five new Ethereum JSON-RPC methods, recently proposed as an open standard by the [Monad](https://monad.xyz/) team: `eth_queryBlocks`, `eth_queryTransactions`, `eth_queryLogs`, `eth_queryTraces`, `eth_queryTransfers`.

From the “query” prefix, you can probably guess that these methods target reading blockchain data, and can even completely replace the need for an indexer in many cases. If that doesn’t sound exciting, keep reading.

Over standard JSON-RPC, reading **logs** across a range of blocks is the only thing you have. We want to emphasize logs here. Because if you are interested in specific transactions or function calls (traces), until now there was no standard way to query them across the whole chain with filters, only block by block. A contract without logs? You’re stuck.

And `eth_getLogs` is far from perfect itself:

- Field selection isn’t supported, so you load ~95% of unneeded data.
- Fetching related transactions or blocks takes N+1 requests.
- There’s no reliable way to track reorgs at the head when you use filters.
- Providers are required by spec to return the whole requested range, which times out for most requests with too-big ranges. Or providers cap the range to 10k blocks instead of letting you filter across the whole chain in one query, as [HyperRPC](https://docs.envio.dev/docs/HyperRPC/overview-hyperrpc) does.
- The above also prevents easy pagination in descending order.

And… these [MIP-16 methods](https://docs.envio.dev/docs/HyperRPC/mip-16) address all of these limitations and more.

Each request accepts a filter, related objects to include, fields to return, and an optional block range.

The cursor pagination design is efficient, reorg-friendly, and eliminates “block range exceeded” errors.

## Let me show you the code!

To run these, create a token on the [HyperRPC Tokens page](https://envio.dev/app/hyperrpc-tokens) and set it as `ENVIO_API_TOKEN`. For more on tokens, see [API tokens](https://docs.envio.dev/docs/HyperSync/api-tokens). For every filter and field, see the [MIP-16 spec](https://github.com/monad-xyz/MIPs/blob/main/MIPs/MIP-16.md) and the [HyperRPC MIP-16 reference](https://docs.envio.dev/docs/HyperRPC/mip-16).

### Every transaction to an address, from the first

No standard method existed for an address’s history. Now you can filter transactions by sender or recipient across the whole chain: here, every transaction sent to WMON.

```bash
curl https://monad.rpc.hypersync.xyz/$ENVIO_API_TOKEN \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0", "id": 1,
    "method": "eth_queryTransactions",
    "params": [{
      "filter": {
        "to": ["0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A"]
      },
      "fromBlock": "earliest",
      "fields": {
        "transactions": ["hash", "to", "value", "status", "blockTimestamp"]
      }
    }]
  }'
```

One `eth_queryTransactions` request returns a page of results with a cursor, so you can request the next page without guessing the best range size.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "fromBlock": { "number": "0x0", "hash": "0x0c47…aac9", "parentHash": "0x0000…0000" },
    "toBlock": { "number": "0x780e24c", "hash": "0xdefe…cc41", "parentHash": "0x45ba…260a" },
    "cursorBlock": { "number": "0x23e2888", "hash": "0xfdfd…841c", "parentHash": "0x8a3d…03ed" },
    "data": {
      "transactions": [
        {
          "hash": "0xbec7…c8ee",
          "to": "0x3bd3…433a",
          "value": "0x2386f26fc10000",
          "status": "0x1",
          "blockTimestamp": "0x68c93c07"
        },
        {
          "hash": "0x2f2e…f636",
          "to": "0x3bd3…433a",
          "value": "0x0",
          "status": "0x1",
          "blockTimestamp": "0x68de37e2"
        }
        // ... 998 more in this response
      ]
    }
  }
}
```

*Shortened response from Monad, with parts of each hash cut.*

### Events with their transactions and blocks

Standard RPC returns each event on its own, so its transaction and block take two more calls. One `eth_queryLogs` request returns all three, with only the fields you ask for:

```bash
curl https://monad.rpc.hypersync.xyz/$ENVIO_API_TOKEN \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0", "id": 1,
    "method": "eth_queryLogs",
    "params": [{
      "filter": {
        "address": ["0x0000000000000000000000000000000000001000"],
        "topics": [["0x3a420a01486b6b28d6ae89c51f5c3bde3e0e74eecbb646a0c481ccba3aae3754"]]
      },
      "fields": {
        "logs": ["blockNumber", "transactionHash", "topics", "data"],
        "transactions": ["hash", "from", "gasPrice"],
        "blocks": ["number", "timestamp"]
      }
    }]
  }'
```

1 request instead of 2,001. 85% less data. Measured on Monad validator rewards: 2,001 standard calls (4.53 MB) against one `eth_queryLogs` response (0.67 MB).

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "fromBlock": { "number": "0x0", "hash": "0x0c47…aac9", "parentHash": "0x0000…0000" },
    "toBlock": { "number": "0x780e94d", "hash": "0x4cf4…5ec4", "parentHash": "0x48e3…016d" },
    "cursorBlock": { "number": "0x202500e", "hash": "0x226f…f5e6", "parentHash": "0x1103…b15e" },
    "data": {
      "logs": [
        {
          "blockNumber": "0x2024c27",
          "transactionHash": "0x642e…e57b",
          "topics": ["0x3a42…3754", "0x0000…0005", "0x0000…dc9e"],
          "data": "0x0000…02a3"
        }
        // ... 999 more
      ],
      "transactions": [
        { "hash": "0x642e…e57b", "from": "0x6f49…dc9e", "gasPrice": "0x0" }
        // ... 999 more
      ],
      "blocks": [
        { "number": "0x2024c27", "timestamp": "0x690ba55a" }
        // ... 999 more
      ]
    }
  }
}
```

*Shortened response from Monad, with parts of each hash cut.*

### Blocks too

Request only the fields you need across the whole range in bulk. Descending order? Why not!

```bash
curl https://monad.rpc.hypersync.xyz/$ENVIO_API_TOKEN \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0", "id": 1,
    "method": "eth_queryBlocks",
    "params": [{
      "order": "desc",
      "fields": {
        "blocks": ["number", "timestamp"]
      }
    }]
  }'
```

Measured on 1,000 consecutive blocks: 1,000 `eth_getBlockByNumber` calls (3.68 MB) against one `eth_queryBlocks` response (0.05 MB).

### Traces and transfers

`eth_queryTraces` and `eth_queryTransfers` are coming soon to HyperRPC. Traces were always a pain on Ethereum, requiring you to scan the whole chain block by block without a proper standard method to extract them. Now, having one that lets you easily scan the whole chain and return only the traces or transfers you need sounds unbelievable!

## Where is MIP-16 live?

`eth_queryBlocks`, `eth_queryTransactions` and `eth_queryLogs` are already live on HyperRPC. Create your token in the [Envio Dashboard](https://envio.dev/app/hyperrpc-tokens) and give the examples on this page a try yourself! We have a free plan for testing and development. Also try replacing `monad` in the URL with any other [chain ID](https://docs.envio.dev/docs/HyperRPC/hyperrpc-supported-networks) and see how it works there. We have [82+ chains covered](https://envio.dev/chains).

The spec itself is rapidly developing, and at the time of writing, it’s in the review phase. You can find and contribute to it on the [MIP-16 page](https://mips.monad.xyz/MIPs/MIP-16).

## How Envio implements MIP-16

This is where [HyperSync](https://envio.dev/products/hypersync) comes in. We built this product at Envio 3+ years ago and have actively developed it ever since. It’s very similar to the MIP-16 query methods. We don’t want to take any credit here; the MIP-16 design is unique and well thought out, with some ideas HyperSync would benefit from as well.

What we’re trying to say is that we already have a product battle-tested by 3k+ developers a month. MIP-16 is an open standard that not only solves a real problem but also suits us perfectly. Envio is now a MIP-16 provider on 82+ chains. The nice thing about open standards is that other providers can serve them too, so you can relax about vendor lock-in.

## HyperSync vs MIP-16

In case you wondered whether MIP-16, as an open standard, makes HyperSync irrelevant, we’re answering the question now.

It doesn’t. When used with clients or [HyperIndex](https://docs.envio.dev/docs/HyperIndex/overview), HyperSync uses the binary [Arrow](https://arrow.apache.org/) format for responses and [Cap'n Proto](https://capnproto.org/) to send requests efficiently. It also supports caching to reduce egress cost for repeated filters. Apart from these differences, HyperSync and MIP-16 are very similar.

Which one should you choose? [Envio’s HyperSync](https://envio.dev/pricing/hypersync) is a subscription with no monthly volume limit, priced by requests per minute. [Envio’s MIP-16](https://envio.dev/pricing/hyperrpc), on the other hand, is pay-as-you-go, with virtually no rate limit on paid usage. For sustained, high-volume reads, it costs more than a HyperSync subscription, but you can give it to your AI agent or analytics tools and pay only for what you use. And don’t forget about [Envio Cloud](https://envio.dev/products/cloud), with unlimited backfills on production plans. If you’re building an indexer, it should be your first option. Either way, the choice is yours!

## Final thoughts

Exciting. With agents doing more and more work for us, a reliable, flexible interface for onchain data is super valuable. We don’t think it’s about cost reduction; it’s about enabling possibilities and guardrails we didn’t have before as an open standard, which moves the whole industry forward. And honestly… it should be an EIP!

If we’re not exhausting you with Envio plugs, [follow us on X](https://x.com/envio_indexer). And especially, [don’t forget to give kudos to the team that leads the standard](https://x.com/typedarray/status/2102466962110492679). And here’s the [forum link](https://forum.monad.xyz/t/mip-16-json-rpc-query-methods/546) to contribute to the standard’s development.

## Using MIP-16 with a coding agent

Give your agent current docs first, so it doesn’t work from memory. In Claude Code, add the [Envio docs MCP server](https://docs.envio.dev/docs/HyperIndex/mcp-server):

```bash
claude mcp add --transport http envio-docs https://docs.envio.dev/mcp
```

Any agent can also read [this post as Markdown](https://docs.envio.dev/blog/mip-16-open-standard-blockchain-indexing.md) and the [MIP-16 reference as Markdown](https://docs.envio.dev/docs/HyperRPC/mip-16.md). Then paste this prompt and fill in the first line:

```text
Task: <what to fetch, on which chain, over which blocks>

Use the MIP-16 query methods on HyperRPC. First read
https://docs.envio.dev/docs/HyperRPC/mip-16.md

- Send requests to https://<chain-id>.rpc.hypersync.xyz and pass the token in an
  "Authorization: Bearer" header. Read it from ENVIO_API_TOKEN and never print it
- Only use eth_queryBlocks, eth_queryTransactions and eth_queryLogs. Before using
  eth_queryTraces or eth_queryTransfers, check the docs page says they are live
- If you set "fields", include the method's own type. Select join keys on both
  sides: blockNumber and transactionIndex for transactions, and the log's
  blockNumber with the block's number
- For a historical range, set toBlock to a fixed hex block number. In ascending
  order, repeat the request with fromBlock = cursorBlock.number + 1 until
  cursorBlock.number equals toBlock.number. An empty page is not the end
- Near the chain head, compare each page's fromBlock.parentHash with the previous
  cursorBlock.hash and stop to handle a reorg if they differ
- On HTTP 429, wait and retry. On -32001, check the block range. On -32005, select
  fewer fields, drop joins or narrow the filter. On -32004, stop and tell me
- Report the number of requests, results and the first and last blocks you got
```

For a worked task, the docs page also has a [ready-made prompt](https://docs.envio.dev/docs/HyperRPC/mip-16#hand-this-to-your-coding-agent) that collects a token’s transfers.

## Frequently Asked Questions

### Is MIP-16 Part of the Official Ethereum JSON-RPC API?

Not at the time of writing. MIP-16 is a Monad Improvement Proposal with the status “Review”, so it can still change, and it isn’t an Ethereum Improvement Proposal. Keep your standard RPC calls available wherever you can’t rely on MIP-16.

### How Do I Check Whether an RPC Endpoint Supports MIP-16?

Send a small request, such as `eth_queryBlocks` with `order` set to `desc`, `target` set to `0x1` and `fields` set to `{"blocks": ["number"]}`, and read the response. A result means the endpoint serves that method. Error `-32601` means it doesn’t recognise the method, and `-32004` means it knows the method but doesn’t serve it. Check each method you need, because an endpoint can support some and not others.

### Do I Still Need an Indexer With MIP-16?

It depends on what you’re building. If you need raw blocks, transactions or logs for a script, an analysis or an agent task, a MIP-16 query may be enough. The methods return chain data as recorded, so decoding events, keeping totals or other derived state, and serving your data in your own schema are still up to you. If your app reads that processed data again and again, an indexer does the work once and stores the result.

## Build With Envio

You can try MIP-16 today through HyperRPC, where `eth_queryBlocks`, `eth_queryTransactions` and `eth_queryLogs` are live on 82+ chains. [Create a HyperRPC token](https://envio.dev/app/hyperrpc-tokens) to run the examples above, and keep the [MIP-16 reference](https://docs.envio.dev/docs/HyperRPC/mip-16) close for every method, filter and error.

If your app needs decoded events, derived state or its own schema, [HyperIndex](https://docs.envio.dev/docs/HyperIndex/overview) turns onchain events into a queryable GraphQL API.

For onchain data findings, product releases and how teams use Envio in production, subscribe to the monthly newsletter, follow us on X or join our Discord.

[Subscribe to our newsletter](https://envio.beehiiv.com/subscribe?utm_source=envio.beehiiv.com&utm_medium=newsletter&utm_campaign=new-post)

[Website](https://envio.dev/) | [X](https://twitter.com/envio_indexer) | [Discord](https://discord.gg/envio) | [Telegram](https://t.me/+BeS5ihVUFONjNGFk) | [GitHub](https://github.com/enviodev) | [YouTube](https://www.youtube.com/channel/UCR7nZ2yzEtc5SZNM0dhrkhA) | [Reddit](https://www.reddit.com/user/Envio_indexer)
