Arbitrum One
Arbitrum One
Arbitrum One
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getBlockByHash returns the full block data for the L2 block identified by a given 32-byte hash on Arbitrum One, the Optimistic Rollup whose gas is paid in ETH. Pass the block hash and a boolean for whether you want full transaction objects or just their hashes, and the Nitro node replies with the header, gas metrics, and transaction list. Send the request to https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161).
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | نعم | The hash of the block to retrieve. |
| 2 | includeTransactions | boolean | نعم | When true, transactions[] contains full transaction objects. When false, only hashes. |
| النوع | الوصف |
|---|---|
| object | null | Block object with fields: number, hash, parentHash, timestamp, miner, gasUsed, gasLimit, baseFeePerGas, transactions, uncles, withdrawals, stateRoot, receiptsRoot, transactionsRoot, logsBloom, extraData, size, difficulty, totalDifficulty, mixHash, nonce, sha3Uncles. Returns null if no block was foun |
Try it live in the Arbitrum One playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block hash is malformed or not 32 bytes. |
includeTransactions, not the string "true" — JSON-RPC requires the boolean type or the node rejects the call.includeTransactions=true, a busy Arbitrum One block — high-throughput GMX or Uniswap activity packs many transactions — can exceed 1 MB; stream or paginate when bandwidth is tight.null for an unknown hash; always null-check before reading fields rather than assuming a block object came back.المعاملات
0x-prefixed 32-byte block hash
true = full tx objects, false = tx hashes only