eth_getWithdrawalProof
Returns the Merkle proof for a given account (and optionally some storage keys) against the withdrawal state root used by MegaETH's L2→L1 withdrawal flow. MegaETH is an OP Stack chain, and withdrawals are initiated by writing to the predeployed L2ToL1MessagePasser at 0x4200000000000000000000000000000000000016; this method returns the account/storage proof needed to prove and finalize a withdrawal on L1. The parameter and result shape match eth_getProof.
Path Parameters
docs-demoFor higher throughput, create your own API key
Request
format: "^0x[0-9a-fA-F]{40}$"requiredThe address of the account to generate the proof for. For withdrawal proofs, this is typically the L2ToL1MessagePasser predeploy at 0x4200000000000000000000000000000000000016.
An array of storage keys (slots) to generate proofs for. For a withdrawal, this is the message slot in the L2ToL1MessagePasser sentMessages mapping corresponding to the withdrawal being proven. May be empty to fetch only the account proof.
The block number, tag, or hash at which to generate the proof. Callers proving a withdrawal on L1 typically use the L2 block that corresponds to the latest output root posted to the L2OutputOracle / DisputeGameFactory on L1.
Identifies a block by explicit number, a predefined tag (e.g., latest/safe/finalized), or a 32-byte block hash.
Responses
200
An object containing the account proof and storage proofs for the requested address and storage keys against the withdrawal state trie.