> 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.md).

# Developer Docs

- [Overview](https://docs.megaeth.com/developer-docs/overview.md): Overview of developing on MegaETH — EVM compatibility, gas estimation, debugging, and bridging.
- [Bridge ERC-20 Tokens](https://docs.megaeth.com/developer-docs/bridge-erc20.md): How to deploy and bridge an ERC-20 token from Ethereum to MegaETH using the OP Stack Standard Bridge.
- [Send Transaction](https://docs.megaeth.com/developer-docs/overview-1.md): How to submit transactions on MegaETH — deploy contracts, estimate gas, and debug failures.
- [Contracts & Tokens](https://docs.megaeth.com/developer-docs/overview-1/contracts.md): Key contract addresses and tokens on MegaETH and Ethereum Mainnet.
- [Gas Estimation](https://docs.megaeth.com/developer-docs/overview-1/gas-estimation.md): How to estimate gas on MegaETH — code examples, toolchain configuration, and common pitfalls.
- [Debugging Transactions](https://docs.megaeth.com/developer-docs/overview-1/debugging.md): Debug failing transactions on MegaETH — trace with debug\_traceTransaction, replay with mega-evme, and diagnose gas errors.
- [Force Inclusion — Foundry](https://docs.megaeth.com/developer-docs/overview-1/force-inclusion.md): Force-include a transaction on MegaETH using Foundry (cast or forge) — step-by-step guide for scripted and automated submissions.
- [Read from MegaETH](https://docs.megaeth.com/developer-docs/overview-2.md): How to read current state, historical data, transactions, logs, and real-time updates from MegaETH.
- [Realtime API](https://docs.megaeth.com/developer-docs/overview-2/realtime-api.md): MegaETH Realtime API — how to use MegaETH's low-latency extensions to Ethereum JSON-RPC for real-time data access.
- [Transaction Execution](https://docs.megaeth.com/developer-docs/overview-3.md): How MegaEVM differs from standard Ethereum — contract size limits, gas forwarding, and precompile overrides.
- [Gas Model](https://docs.megaeth.com/developer-docs/overview-3/gas-model.md): MegaETH dual gas model — compute gas, storage gas, bucket multiplier, resource limits, and developer tips.
- [Resource Limits](https://docs.megaeth.com/developer-docs/overview-3/resource-limits.md): MegaETH resource limits — 7 per-transaction and per-block ceilings on gas, compute, data, KV updates, state growth, transaction size, and DA size.
- [Volatile Data Access](https://docs.megaeth.com/developer-docs/overview-3/volatile-data.md): Volatile data access on MegaETH — what triggers the 20M compute gas cap, best practices for reading block data and oracle state, and common pitfalls.
- [System Contracts](https://docs.megaeth.com/developer-docs/overview-3/system-contracts.md): MegaETH system contracts — addresses, interfaces, preconditions, and usage examples.
- [Build with AI](https://docs.megaeth.com/developer-docs/build-with-ai.md): AI coding skills and tools for building on MegaETH with Claude Code, Cursor, Windsurf, and other AI assistants.
- [Tooling & Infrastructure](https://docs.megaeth.com/developer-docs/tooling.md): Developer tooling and infrastructure partners on MegaETH — RPC providers, block explorers, oracles, indexers, bridges, wallets, account abstraction, developer tooling, and more.
- [Verifiable Randomness (VRF)](https://docs.megaeth.com/developer-docs/vrf.md): Verifiable onchain randomness on MegaETH via DrandOracleQuicknet — a preinstalled, stateless BLS12-381 verifier for the public drand quicknet beacon.
- [Onchain Payments](https://docs.megaeth.com/developer-docs/payments.md): How to accept onchain payments in a MegaETH dapp — the HTTP 402 "pay then retry" pattern, the x402 and MPP protocol families, and five concrete payment flows (one-time and pay-as-you-go, user-paid and
- [JSON-RPC](https://docs.megaeth.com/developer-docs/rpc.md): MegaETH JSON-RPC endpoints, shared protocol conventions, operational limits, and method reference.
- [Quickstart](https://docs.megaeth.com/developer-docs/rpc/quickstart.md): Make your first read-only MegaETH JSON-RPC requests and verify the connected network.
- [JSON-RPC basics](https://docs.megaeth.com/developer-docs/rpc/json-rpc-basics.md): Shared JSON-RPC 2.0 request, notification, batch, success, and error conventions used by MegaETH.
- [Type reference](https://docs.megaeth.com/developer-docs/rpc/types.md): Hexadecimal quantities, byte strings, addresses, hashes, block selectors, and transaction call objects used by MegaETH JSON-RPC.
- [Error reference](https://docs.megaeth.com/developer-docs/rpc/error-codes.md): Standard JSON-RPC, Ethereum, MegaETH, and public-gateway errors with retry guidance.
- [Operations and limits](https://docs.megaeth.com/developer-docs/rpc/operations-and-limits.md): Public MegaETH JSON-RPC rate limits, payload limits, method caps, caching behavior, and WebSocket limits.
- [RPC Reference](https://docs.megaeth.com/developer-docs/rpc/reference.md): Complete reference for the 51 JSON-RPC methods available through MegaETH's public HTTP and WebSocket endpoints.
- [debug\_getHistoryTransactionCount](https://docs.megaeth.com/developer-docs/rpc/reference/debug_gethistorytransactioncount.md): debug\_getHistoryTransactionCount JSON-RPC reference for MegaETH.
- [debug\_getRawHeader](https://docs.megaeth.com/developer-docs/rpc/reference/debug_getrawheader.md): Returns the RLP-encoded header for a MegaETH block.
- [debug\_traceBlockByHash](https://docs.megaeth.com/developer-docs/rpc/reference/debug_traceblockbyhash.md): Replays every transaction in a MegaETH block selected by hash and returns execution traces.
- [debug\_traceBlockByNumber](https://docs.megaeth.com/developer-docs/rpc/reference/debug_traceblockbynumber.md): Replays every transaction in a MegaETH block selected by number and returns execution traces.
- [debug\_traceTransaction](https://docs.megaeth.com/developer-docs/rpc/reference/debug_tracetransaction.md): Replays a MegaETH transaction and returns its execution trace.
- [eth\_accounts](https://docs.megaeth.com/developer-docs/rpc/reference/eth_accounts.md): eth\_accounts JSON-RPC reference for MegaETH.
- [eth\_blockNumber](https://docs.megaeth.com/developer-docs/rpc/reference/eth_blocknumber.md): eth\_blockNumber JSON-RPC reference for MegaETH.
- [eth\_call](https://docs.megaeth.com/developer-docs/rpc/reference/eth_call.md): eth\_call JSON-RPC reference for MegaETH.
- [eth\_callMany](https://docs.megaeth.com/developer-docs/rpc/reference/eth_callmany.md): Executes ordered bundles of read-only calls against a selected MegaETH state.
- [eth\_chainId](https://docs.megaeth.com/developer-docs/rpc/reference/eth_chainid.md): eth\_chainId JSON-RPC reference for MegaETH.
- [eth\_createAccessList](https://docs.megaeth.com/developer-docs/rpc/reference/eth_createaccesslist.md): eth\_createAccessList JSON-RPC reference for MegaETH.
- [eth\_estimateGas](https://docs.megaeth.com/developer-docs/rpc/reference/eth_estimategas.md): eth\_estimateGas JSON-RPC reference for MegaETH.
- [eth\_feeHistory](https://docs.megaeth.com/developer-docs/rpc/reference/eth_feehistory.md): eth\_feeHistory JSON-RPC reference for MegaETH.
- [eth\_gasPrice](https://docs.megaeth.com/developer-docs/rpc/reference/eth_gasprice.md): eth\_gasPrice JSON-RPC reference for MegaETH.
- [eth\_getBalance](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getbalance.md): eth\_getBalance JSON-RPC reference for MegaETH.
- [eth\_getBlockByHash](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getblockbyhash.md): eth\_getBlockByHash JSON-RPC reference for MegaETH.
- [eth\_getBlockByNumber](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getblockbynumber.md): eth\_getBlockByNumber JSON-RPC reference for MegaETH.
- [eth\_getBlockReceipts](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getblockreceipts.md): eth\_getBlockReceipts JSON-RPC reference for MegaETH.
- [eth\_getBlockTransactionCountByHash](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getblocktransactioncountbyhash.md): eth\_getBlockTransactionCountByHash JSON-RPC reference for MegaETH.
- [eth\_getBlockTransactionCountByNumber](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getblocktransactioncountbynumber.md): eth\_getBlockTransactionCountByNumber JSON-RPC reference for MegaETH.
- [eth\_getCode](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getcode.md): eth\_getCode JSON-RPC reference for MegaETH.
- [eth\_getCodeByHash](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getcodebyhash.md): eth\_getCodeByHash JSON-RPC reference for MegaETH.
- [eth\_getHeaderByHash](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getheaderbyhash.md): eth\_getHeaderByHash JSON-RPC reference for MegaETH.
- [eth\_getHeaderByNumber](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getheaderbynumber.md): eth\_getHeaderByNumber JSON-RPC reference for MegaETH.
- [eth\_getLogs](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getlogs.md): eth\_getLogs JSON-RPC reference for MegaETH.
- [eth\_getStorageAt](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getstorageat.md): eth\_getStorageAt JSON-RPC reference for MegaETH.
- [eth\_getTransactionByHash](https://docs.megaeth.com/developer-docs/rpc/reference/eth_gettransactionbyhash.md): eth\_getTransactionByHash JSON-RPC reference for MegaETH.
- [eth\_getTransactionCount](https://docs.megaeth.com/developer-docs/rpc/reference/eth_gettransactioncount.md): eth\_getTransactionCount JSON-RPC reference for MegaETH.
- [eth\_getTransactionReceipt](https://docs.megaeth.com/developer-docs/rpc/reference/eth_gettransactionreceipt.md): eth\_getTransactionReceipt JSON-RPC reference for MegaETH.
- [eth\_getUncleByBlockHashAndIndex](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getunclebyblockhashandindex.md): Returns an uncle block by parent block hash and uncle index.
- [eth\_getUncleByBlockNumberAndIndex](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getunclebyblocknumberandindex.md): Returns an uncle block by parent block number and uncle index.
- [eth\_getUncleCountByBlockHash](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getunclecountbyblockhash.md): Returns the number of uncle blocks referenced by a MegaETH block selected by hash.
- [eth\_getUncleCountByBlockNumber](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getunclecountbyblocknumber.md): Returns the number of uncle blocks referenced by a MegaETH block selected by number.
- [eth\_getWithdrawalProof](https://docs.megaeth.com/developer-docs/rpc/reference/eth_getwithdrawalproof.md): Returns a withdrawal-storage proof for MegaETH's L2-to-L1 message passer contract.
- [eth\_maxPriorityFeePerGas](https://docs.megaeth.com/developer-docs/rpc/reference/eth_maxpriorityfeepergas.md): eth\_maxPriorityFeePerGas JSON-RPC reference for MegaETH.
- [eth\_protocolVersion](https://docs.megaeth.com/developer-docs/rpc/reference/eth_protocolversion.md): Returns the Ethereum protocol version reported by the MegaETH RPC node.
- [eth\_sendRawTransaction](https://docs.megaeth.com/developer-docs/rpc/reference/eth_sendrawtransaction.md): eth\_sendRawTransaction JSON-RPC reference for MegaETH.
- [eth\_sendRawTransactionSync](https://docs.megaeth.com/developer-docs/rpc/reference/eth_sendrawtransactionsync.md): eth\_sendRawTransactionSync JSON-RPC reference for MegaETH.
- [eth\_subscribe](https://docs.megaeth.com/developer-docs/rpc/reference/eth_subscribe.md): eth\_subscribe — WebSocket subscriptions for block headers, logs, pending transactions, sync status, mini-blocks, and state changes.
- [eth\_syncing](https://docs.megaeth.com/developer-docs/rpc/reference/eth_syncing.md): eth\_syncing JSON-RPC reference for MegaETH.
- [eth\_uninstallFilter](https://docs.megaeth.com/developer-docs/rpc/reference/eth_uninstallfilter.md): Removes an Ethereum log or block filter by ID.
- [eth\_unsubscribe](https://docs.megaeth.com/developer-docs/rpc/reference/eth_unsubscribe.md): eth\_unsubscribe JSON-RPC reference for MegaETH.
- [mega\_getBlockWitness](https://docs.megaeth.com/developer-docs/rpc/reference/mega_getblockwitness.md): mega\_getBlockWitness JSON-RPC reference for MegaETH.
- [mega\_getWithdrawalProof](https://docs.megaeth.com/developer-docs/rpc/reference/mega_getwithdrawalproof.md): mega\_getWithdrawalProof JSON-RPC reference for MegaETH.
- [mega\_outputAtBlock](https://docs.megaeth.com/developer-docs/rpc/reference/mega_outputatblock.md): mega\_outputAtBlock JSON-RPC reference for MegaETH.
- [net\_listening](https://docs.megaeth.com/developer-docs/rpc/reference/net_listening.md): net\_listening JSON-RPC reference for MegaETH.
- [net\_peerCount](https://docs.megaeth.com/developer-docs/rpc/reference/net_peercount.md): net\_peerCount JSON-RPC reference for MegaETH.
- [net\_version](https://docs.megaeth.com/developer-docs/rpc/reference/net_version.md): net\_version JSON-RPC reference for MegaETH.
- [optimism\_outputAtBlock](https://docs.megaeth.com/developer-docs/rpc/reference/optimism_outputatblock.md): Returns the OP Stack output-root data for a MegaETH block.
- [realtime\_sendRawTransaction](https://docs.megaeth.com/developer-docs/rpc/reference/realtime_sendrawtransaction.md): realtime\_sendRawTransaction — submit a transaction and receive the receipt in a single call without polling.
- [web3\_clientVersion](https://docs.megaeth.com/developer-docs/rpc/reference/web3_clientversion.md): web3\_clientVersion JSON-RPC reference for MegaETH.
- [Developer FAQ](https://docs.megaeth.com/developer-docs/faq.md): Frequently asked questions for MegaETH developers — EVM compatibility, gas, transactions, mini-blocks, RPC, and tooling.


---

# 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.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.
