> For the complete documentation index, see [llms.txt](https://docs.megaeth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.megaeth.com/developer-docs/rpc/reference.md).

# RPC Reference

This reference documents the JSON-RPC methods available through the public MegaETH HTTP and WebSocket endpoints. Use [JSON-RPC](/developer-docs/rpc.md) for request framing, shared wire types, errors, and gateway limits.

## Available Methods

{% hint style="info" %}
The table below reflects the public MegaETH Mainnet endpoint. "Unavailable" includes methods recognized by the gateway but disabled or unimplemented upstream. Managed providers may expose additional methods.
{% endhint %}

| Method                                    | Availability   | Additional restrictions or behavior                                                             |
| ----------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------- |
| `debug_getHistoryTransactionCount`        | Available      | MegaETH-specific.                                                                               |
| `debug_getRawHeader`                      | Available      |                                                                                                 |
| `debug_traceBlockByHash`                  | Available      | Large responses are streamed.                                                                   |
| `debug_traceBlockByNumber`                | Available      | Large responses are streamed.                                                                   |
| `debug_traceCall`                         | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `debug_traceTransaction`                  | Available      | Large responses are streamed.                                                                   |
| `eth_accounts`                            | Available      | Returns an empty array because the gateway does not manage user keys.                           |
| `eth_blockNumber`                         | Available      |                                                                                                 |
| `eth_call`                                | Available      | Compute gas limited to 60,000,000.                                                              |
| `eth_callAfter`                           | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_callMany`                            | Available      | 100 bundles and 100 total calls; 60,000,000 compute gas per call; timeout capped at 25 seconds. |
| `eth_chainId`                             | Available      |                                                                                                 |
| `eth_createAccessList`                    | Available      | Routed to the compute pool; no separate 60M compute override is added.                          |
| `eth_estimateGas`                         | Available      | Uses an internal CPU-time limit; the source default is 0.5 seconds.                             |
| `eth_feeHistory`                          | Available      | Block range limited to 256.                                                                     |
| `eth_gasPrice`                            | Available      |                                                                                                 |
| `eth_getBalance`                          | Available      |                                                                                                 |
| `eth_getBlockByHash`                      | Available      |                                                                                                 |
| `eth_getBlockByNumber`                    | Available      |                                                                                                 |
| `eth_getBlockReceipts`                    | Available      |                                                                                                 |
| `eth_getBlockTransactionCountByHash`      | Available      |                                                                                                 |
| `eth_getBlockTransactionCountByNumber`    | Available      |                                                                                                 |
| `eth_getCode`                             | Available      |                                                                                                 |
| `eth_getCodeByHash`                       | Available      | MegaETH-specific.                                                                               |
| `eth_getFilterChanges`                    | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_getFilterLogs`                       | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_getHeaderByHash`                     | Available      | MegaETH-specific.                                                                               |
| `eth_getHeaderByNumber`                   | Available      | MegaETH-specific.                                                                               |
| `eth_getLogs`                             | Available      |                                                                                                 |
| `eth_getLogsWithCursor`                   | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_getStorageAt`                        | Available      |                                                                                                 |
| `eth_getTransactionByBlockHashAndIndex`   | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_getTransactionByBlockNumberAndIndex` | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_getTransactionByHash`                | Available      |                                                                                                 |
| `eth_getTransactionCount`                 | Available      |                                                                                                 |
| `eth_getTransactionReceipt`               | Available      |                                                                                                 |
| `eth_getUncleByBlockHashAndIndex`         | Available      | Returns `null` for valid MegaETH blocks.                                                        |
| `eth_getUncleByBlockNumberAndIndex`       | Available      | Returns `null` for valid MegaETH blocks.                                                        |
| `eth_getUncleCountByBlockHash`            | Available      | Returns `0x0` for valid MegaETH blocks.                                                         |
| `eth_getUncleCountByBlockNumber`          | Available      | Returns `0x0` for valid MegaETH blocks.                                                         |
| `eth_getWithdrawalProof`                  | Available      | OP Stack withdrawal proof method.                                                               |
| `eth_maxPriorityFeePerGas`                | Available      |                                                                                                 |
| `eth_mining`                              | Unavailable    | The node reports the method as unimplemented.                                                   |
| `eth_newBlockFilter`                      | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_newFilter`                           | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_newPendingTransactionFilter`         | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `eth_protocolVersion`                     | Available      | Legacy compatibility method.                                                                    |
| `eth_sendRawTransaction`                  | Available      |                                                                                                 |
| `eth_sendRawTransactionSync`              | Available      | MegaETH-specific synchronous receipt method.                                                    |
| `eth_subscribe`                           | WebSocket only | Supports six subscription types; see the method page.                                           |
| `eth_syncing`                             | Available      |                                                                                                 |
| `eth_uninstallFilter`                     | Available      | Returns `false` when the filter ID does not exist.                                              |
| `eth_unsubscribe`                         | WebSocket only |                                                                                                 |
| `mega_getBlockWitness`                    | Available      | MegaETH-specific.                                                                               |
| `mega_getWithdrawalProof`                 | Available      | Alias routed to `eth_getWithdrawalProof`.                                                       |
| `mega_outputAtBlock`                      | Available      | OP Stack output-root method.                                                                    |
| `net_listening`                           | Available      |                                                                                                 |
| `net_peerCount`                           | Available      |                                                                                                 |
| `net_version`                             | Available      |                                                                                                 |
| `optimism_outputAtBlock`                  | Available      | Alias of `mega_outputAtBlock`.                                                                  |
| `realtime_sendRawTransaction`             | Available      | MegaETH-specific synchronous receipt method.                                                    |
| `trace_block`                             | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `trace_call`                              | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `trace_transaction`                       | Unavailable    | The public endpoint returns `-32601`.                                                           |
| `web3_clientVersion`                      | Available      |                                                                                                 |

## State and simulation

* [`eth_accounts`](/developer-docs/rpc/reference/eth_accounts.md)
* [`eth_call`](/developer-docs/rpc/reference/eth_call.md)
* [`eth_callMany`](/developer-docs/rpc/reference/eth_callmany.md)
* [`eth_createAccessList`](/developer-docs/rpc/reference/eth_createaccesslist.md)
* [`eth_estimateGas`](/developer-docs/rpc/reference/eth_estimategas.md)
* [`eth_getBalance`](/developer-docs/rpc/reference/eth_getbalance.md)
* [`eth_getCode`](/developer-docs/rpc/reference/eth_getcode.md)
* [`eth_getCodeByHash`](/developer-docs/rpc/reference/eth_getcodebyhash.md)
* [`eth_getStorageAt`](/developer-docs/rpc/reference/eth_getstorageat.md)
* [`eth_getTransactionCount`](/developer-docs/rpc/reference/eth_gettransactioncount.md)

## Blocks, transactions, and receipts

* [`eth_blockNumber`](/developer-docs/rpc/reference/eth_blocknumber.md)
* [`eth_getBlockByHash`](/developer-docs/rpc/reference/eth_getblockbyhash.md)
* [`eth_getBlockByNumber`](/developer-docs/rpc/reference/eth_getblockbynumber.md)
* [`eth_getBlockReceipts`](/developer-docs/rpc/reference/eth_getblockreceipts.md)
* [`eth_getBlockTransactionCountByHash`](/developer-docs/rpc/reference/eth_getblocktransactioncountbyhash.md)
* [`eth_getBlockTransactionCountByNumber`](/developer-docs/rpc/reference/eth_getblocktransactioncountbynumber.md)
* [`eth_getHeaderByHash`](/developer-docs/rpc/reference/eth_getheaderbyhash.md)
* [`eth_getHeaderByNumber`](/developer-docs/rpc/reference/eth_getheaderbynumber.md)
* [`eth_getTransactionByHash`](/developer-docs/rpc/reference/eth_gettransactionbyhash.md)
* [`eth_getTransactionReceipt`](/developer-docs/rpc/reference/eth_gettransactionreceipt.md)
* [`eth_getUncleByBlockHashAndIndex`](/developer-docs/rpc/reference/eth_getunclebyblockhashandindex.md)
* [`eth_getUncleByBlockNumberAndIndex`](/developer-docs/rpc/reference/eth_getunclebyblocknumberandindex.md)
* [`eth_getUncleCountByBlockHash`](/developer-docs/rpc/reference/eth_getunclecountbyblockhash.md)
* [`eth_getUncleCountByBlockNumber`](/developer-docs/rpc/reference/eth_getunclecountbyblocknumber.md)
* [`eth_syncing`](/developer-docs/rpc/reference/eth_syncing.md)

## Logs and subscriptions

* [`eth_getLogs`](/developer-docs/rpc/reference/eth_getlogs.md)
* [`eth_subscribe`](/developer-docs/rpc/reference/eth_subscribe.md) — WebSocket only
* [`eth_uninstallFilter`](/developer-docs/rpc/reference/eth_uninstallfilter.md)
* [`eth_unsubscribe`](/developer-docs/rpc/reference/eth_unsubscribe.md) — WebSocket only

## Fees and transaction submission

* [`eth_feeHistory`](/developer-docs/rpc/reference/eth_feehistory.md)
* [`eth_gasPrice`](/developer-docs/rpc/reference/eth_gasprice.md)
* [`eth_maxPriorityFeePerGas`](/developer-docs/rpc/reference/eth_maxpriorityfeepergas.md)
* [`eth_sendRawTransaction`](/developer-docs/rpc/reference/eth_sendrawtransaction.md)
* [`eth_sendRawTransactionSync`](/developer-docs/rpc/reference/eth_sendrawtransactionsync.md)
* [`realtime_sendRawTransaction`](/developer-docs/rpc/reference/realtime_sendrawtransaction.md)

## Debug methods

* [`debug_getHistoryTransactionCount`](/developer-docs/rpc/reference/debug_gethistorytransactioncount.md)
* [`debug_getRawHeader`](/developer-docs/rpc/reference/debug_getrawheader.md)
* [`debug_traceBlockByHash`](/developer-docs/rpc/reference/debug_traceblockbyhash.md)
* [`debug_traceBlockByNumber`](/developer-docs/rpc/reference/debug_traceblockbynumber.md)
* [`debug_traceTransaction`](/developer-docs/rpc/reference/debug_tracetransaction.md)

## MegaETH and OP Stack methods

* [`eth_getWithdrawalProof`](/developer-docs/rpc/reference/eth_getwithdrawalproof.md)
* [`mega_getBlockWitness`](/developer-docs/rpc/reference/mega_getblockwitness.md)
* [`mega_getWithdrawalProof`](/developer-docs/rpc/reference/mega_getwithdrawalproof.md)
* [`mega_outputAtBlock`](/developer-docs/rpc/reference/mega_outputatblock.md)
* [`optimism_outputAtBlock`](/developer-docs/rpc/reference/optimism_outputatblock.md)

## Network and client information

* [`eth_chainId`](/developer-docs/rpc/reference/eth_chainid.md)
* [`eth_protocolVersion`](/developer-docs/rpc/reference/eth_protocolversion.md)
* [`net_listening`](/developer-docs/rpc/reference/net_listening.md)
* [`net_peerCount`](/developer-docs/rpc/reference/net_peercount.md)
* [`net_version`](/developer-docs/rpc/reference/net_version.md)
* [`web3_clientVersion`](/developer-docs/rpc/reference/web3_clientversion.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.megaeth.com/developer-docs/rpc/reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
