@@ -2332,3 +2332,154 @@ components:
23322332 params :
23332333 - name : transaction
23342334 value : " AAAAAgAAAAA7mRE4Dv6Yi6CokA6xz+RPNm99vpRr7QdyQPf2JN8VxQAAAGQAAAAAAAAAZQAAAAEAAAAAAAAAAAAAAABp/P05AAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABJbT82FmuwvpjSEOMSJs8PBDJi20hvk/TyzDLaJU++XcAAAAEbmFtZQAAAAAAAAAAAAAAAAAAAAA="
2335+
2336+ eth_getCodeByHash :
2337+ name : eth_getCodeByHash
2338+ description : >-
2339+ Returns the contract bytecode associated with a given code hash
2340+ (the keccak256 hash of the bytecode). Unlike `eth_getCode`, which
2341+ looks up code via an account address at a specific block, this
2342+ method resolves code directly from its hash, letting callers
2343+ deduplicate bytecode fetches when multiple accounts share the
2344+ same implementation (e.g., minimal proxies, upgradeable proxies,
2345+ EIP-7702 delegators). Used by MegaETH's stateless validator to
2346+ fetch witness-referenced contract code on demand.
2347+ x-compute-units : 20
2348+ params :
2349+ - name : Code hash
2350+ required : true
2351+ description : >-
2352+ The 32-byte keccak256 hash of the contract bytecode
2353+ (`codeHash` field from an account).
2354+ schema :
2355+ $ref : " ../evm/base-types.yaml#/components/schemas/hash32"
2356+ result :
2357+ name : Bytecode
2358+ description : >-
2359+ The bytecode associated with the given code hash, as a
2360+ hexadecimal string. Returns `"0x"` if no code is stored under
2361+ this hash.
2362+ schema :
2363+ $ref : " ../evm/base-types.yaml#/components/schemas/bytes"
2364+ examples :
2365+ - name : eth_getCodeByHash example
2366+ params :
2367+ - name : Code hash
2368+ value : " 0xfa8c9db6c6cab7108dea276f4cd09d575674eb0852c0fa3187e59e98ef977998"
2369+ result :
2370+ name : Bytecode
2371+ value : " 0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100be5780638f2839701461"
2372+
2373+ eth_getHeaderByHash :
2374+ name : eth_getHeaderByHash
2375+ description : >-
2376+ Returns the block header identified by the given block hash.
2377+ Structurally identical to `eth_getBlockByHash` but omits body-level
2378+ fields (`size`, `transactions`, `uncles`, `withdrawals`), making it
2379+ cheaper to fetch when only consensus fields are needed (e.g.,
2380+ chain-tip anchoring for light clients or stateless validators).
2381+ x-compute-units : 20
2382+ params :
2383+ - name : Block hash
2384+ required : true
2385+ description : The 32-byte hash of the block to retrieve.
2386+ schema :
2387+ $ref : " ../evm/base-types.yaml#/components/schemas/hash32"
2388+ result :
2389+ name : Block header
2390+ description : >-
2391+ The block header object, or `null` if no block with the given
2392+ hash is known.
2393+ schema :
2394+ oneOf :
2395+ - $ref : " ../evm/base-types.yaml#/components/schemas/notFound"
2396+ - $ref : " ./components.yaml#/components/schemas/BlockHeader"
2397+ examples :
2398+ - name : eth_getHeaderByHash example
2399+ params :
2400+ - name : Block hash
2401+ value : " 0xec3c34973b6ba593643668f2279a715e241fc0ffe95f593b2d49fda556f1c512"
2402+ result :
2403+ name : Block header
2404+ value :
2405+ hash : " 0xec3c34973b6ba593643668f2279a715e241fc0ffe95f593b2d49fda556f1c512"
2406+ parentHash : " 0x85b055abc1eab8d988d160dd8ae9a2c07d6548f9609746348c53077cebd80262"
2407+ sha3Uncles : " 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
2408+ miner : " 0x4200000000000000000000000000000000000011"
2409+ stateRoot : " 0x80d2e1ad2720c9f9f3fd25a7312e0c9e158c792a37f0ce37f7f6ba2d5a8cfa04"
2410+ transactionsRoot : " 0x92e3342c97eba7aaf7da9d96755ddda67c00574b4d90518a3ab051e5d05d7886"
2411+ receiptsRoot : " 0x42d0fd6b9b85b2da166fb9cf8b73d6f0325b14d676a2913fd7e3c8876d7430b7"
2412+ logsBloom : " 0x0000000100000040001000000000000000200000020080008000000000200500000002000200008000000001000000000000000020000800000040000840008000000000000000000000010840040010001000000000000000010000000100000000000002000000000000000000880080004400000000000004001000000000000000000068000000000001000000001000000000004102000000000040000010080000000000000200000000000004402000402000000000008002000201000000000200a2000000000000000440000000000000000000400000000000a0000400000000008000000000000000000000000080080440000000000000000000"
2413+ difficulty : " 0x0"
2414+ number : " 0x14855a6"
2415+ gasLimit : " 0x2540be400"
2416+ gasUsed : " 0x855371"
2417+ timestamp : " 0x6a5a7b79"
2418+ extraData : " 0x00000000fa00000001"
2419+ mixHash : " 0xcb1f34415ed865cc2a378d1dd767225c8f594560dd39fbf92c29aadec3a4ab78"
2420+ nonce : " 0x0000000000000000"
2421+ baseFeePerGas : " 0xf4240"
2422+ withdrawalsRoot : " 0xcd9d73e1502e68817b06212100d7529fc71d1e8741d712ef8e68310e3600cc26"
2423+ blobGasUsed : " 0x0"
2424+ excessBlobGas : " 0x0"
2425+ parentBeaconBlockRoot : " 0x602625e5c228d3ea1c71f2c9a596ce93c7c9a9e2f2a1c733c832e3a0369cb31c"
2426+ requestsHash : " 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
2427+
2428+ eth_getHeaderByNumber :
2429+ name : eth_getHeaderByNumber
2430+ description : >-
2431+ Returns the block header identified by the given block number or
2432+ tag. Structurally identical to `eth_getBlockByNumber` but omits
2433+ body-level fields (`size`, `transactions`, `uncles`,
2434+ `withdrawals`). Accepts the standard block tags (`earliest`,
2435+ `latest`, `safe`, `finalized`, `pending`) in addition to a
2436+ hex-encoded block number.
2437+ x-compute-units : 20
2438+ params :
2439+ - name : Block number or tag
2440+ required : true
2441+ description : >-
2442+ The block number as a hex-encoded quantity, or one of the
2443+ named tags `earliest`, `latest`, `safe`, `finalized`,
2444+ `pending`.
2445+ schema :
2446+ $ref : " ../evm/block.yaml#/components/schemas/BlockNumberOrTag"
2447+ result :
2448+ name : Block header
2449+ description : >-
2450+ The block header object, or `null` if the block does not
2451+ exist (for example, a future block number).
2452+ schema :
2453+ oneOf :
2454+ - $ref : " ../evm/base-types.yaml#/components/schemas/notFound"
2455+ - $ref : " ./components.yaml#/components/schemas/BlockHeader"
2456+ examples :
2457+ - name : eth_getHeaderByNumber example
2458+ params :
2459+ - name : Block number or tag
2460+ value : " finalized"
2461+ result :
2462+ name : Block header
2463+ value :
2464+ hash : " 0xec3c34973b6ba593643668f2279a715e241fc0ffe95f593b2d49fda556f1c512"
2465+ parentHash : " 0x85b055abc1eab8d988d160dd8ae9a2c07d6548f9609746348c53077cebd80262"
2466+ sha3Uncles : " 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
2467+ miner : " 0x4200000000000000000000000000000000000011"
2468+ stateRoot : " 0x80d2e1ad2720c9f9f3fd25a7312e0c9e158c792a37f0ce37f7f6ba2d5a8cfa04"
2469+ transactionsRoot : " 0x92e3342c97eba7aaf7da9d96755ddda67c00574b4d90518a3ab051e5d05d7886"
2470+ receiptsRoot : " 0x42d0fd6b9b85b2da166fb9cf8b73d6f0325b14d676a2913fd7e3c8876d7430b7"
2471+ logsBloom : " 0x0000000100000040001000000000000000200000020080008000000000200500000002000200008000000001000000000000000020000800000040000840008000000000000000000000010840040010001000000000000000010000000100000000000002000000000000000000880080004400000000000004001000000000000000000068000000000001000000001000000000004102000000000040000010080000000000000200000000000004402000402000000000008002000201000000000200a2000000000000000440000000000000000000400000000000a0000400000000008000000000000000000000000080080440000000000000000000"
2472+ difficulty : " 0x0"
2473+ number : " 0x14855a6"
2474+ gasLimit : " 0x2540be400"
2475+ gasUsed : " 0x855371"
2476+ timestamp : " 0x6a5a7b79"
2477+ extraData : " 0x00000000fa00000001"
2478+ mixHash : " 0xcb1f34415ed865cc2a378d1dd767225c8f594560dd39fbf92c29aadec3a4ab78"
2479+ nonce : " 0x0000000000000000"
2480+ baseFeePerGas : " 0xf4240"
2481+ withdrawalsRoot : " 0xcd9d73e1502e68817b06212100d7529fc71d1e8741d712ef8e68310e3600cc26"
2482+ blobGasUsed : " 0x0"
2483+ excessBlobGas : " 0x0"
2484+ parentBeaconBlockRoot : " 0x602625e5c228d3ea1c71f2c9a596ce93c7c9a9e2f2a1c733c832e3a0369cb31c"
2485+ requestsHash : " 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
0 commit comments