eth_getBlockByHash
Returns information about a block by hash.
Parameters (by position)
Block hash string required
Hydrated transactions boolean required
Result
Block information null or object
Show Option 1 Not Found (null) null
Not Found (null) nullShow Option 2 Block object object
Block object objectBlock object fields
Block information object
Block object
Show Block information object
Block information objectBlock information fields
-
hash
stringrequiredHash
Match pattern:
^0x[0-9a-f]{64}$
-
parentHash
stringrequiredParent block hash
Match pattern:
^0x[0-9a-f]{64}$
-
sha3Uncles
stringrequiredOmmers hash
Match pattern:
^0x[0-9a-f]{64}$
-
miner
stringrequiredCoinbase
Match pattern:
^0x[0-9a-fA-F]{40}$
-
stateRoot
stringrequiredState root
Match pattern:
^0x[0-9a-f]{64}$
-
transactionsRoot
stringrequiredTransactions root
Match pattern:
^0x[0-9a-f]{64}$
-
receiptsRoot
stringrequiredReceipts root
Match pattern:
^0x[0-9a-f]{64}$
-
logsBloom
stringrequiredBloom filter
Match pattern:
^0x[0-9a-f]{512}$
-
difficulty
stringDifficulty
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
number
stringrequiredNumber
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
gasLimit
stringrequiredGas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
gasUsed
stringrequiredGas used
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
timestamp
stringrequiredTimestamp
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
extraData
stringrequiredExtra data
Match pattern:
^0x[0-9a-f]*$
-
mixHash
stringrequiredMix hash
Match pattern:
^0x[0-9a-f]{64}$
-
nonce
stringrequiredNonce
Match pattern:
^0x[0-9a-f]{16}$
-
baseFeePerGas
stringBase fee per gas
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
withdrawalsRoot
stringWithdrawals root
Match pattern:
^0x[0-9a-f]{64}$
-
blobGasUsed
stringBlob gas used
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
excessBlobGas
stringExcess blob gas
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
parentBeaconBlockRoot
stringParent Beacon Block Root
Match pattern:
^0x[0-9a-f]{64}$
-
size
stringrequiredBlock size
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
transactions
array<string> or array<object>required
Show Option 1
Transaction hashesarrayTransaction hashesfieldstransactions
array<string>required32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$Show Option 2
Full transactionsarrayFull transactionsfieldstransactions
object or object or object or object or objectrequiredShow Option 1
Signed 7702 TransactionobjectSigned 7702 Transactionfieldstransactions
array<object>requiredSigned 7702 Transaction
Show
transactionsobjecttransactionsfields-
type
stringrequiredtype
Match pattern:
^0x4$
-
nonce
stringrequirednonce
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
to
stringrequiredto address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
gas
stringrequiredgas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
value
stringrequiredvalue
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
input
stringrequiredinput data
Match pattern:
^0x[0-9a-f]*$
-
maxPriorityFeePerGas
stringrequiredMaximum fee per gas the sender is willing to pay to miners in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
maxFeePerGas
stringrequiredThe maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
gasPrice
stringThe effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
accessList
array<object>requiredEIP-2930 access lists
Show
accessListobjectaccessListfieldsEIP-2930 access lists
-
address
stringrequiredhex encoded address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
storageKeys
array<string>required32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
false
-
-
chainId
stringrequiredChain ID that this transaction is valid on
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
authorizationList
array<object>requiredList of authorizations for the transaction
Show
authorizationListobjectauthorizationListfieldsList of authorizations for the transaction
-
chainId
stringrequiredChain ID on which this transaction is valid
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
nonce
stringrequirednonce
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
address
stringrequiredhex encoded address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
yParity
stringrequiredThe parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature
Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
r
stringrequiredr
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,63})$
-
s
stringrequireds
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,63})$
-
additionalProperties
true
-
-
yParity
stringrequiredThe parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
v
stringFor backwards compatibility,
vis optionally provided as an alternative toyParity. This field is DEPRECATED and all use of it should migrate toyParity.Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
r
stringrequiredr
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
s
stringrequireds
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
additionalProperties
true
Show Option 2
Signed 4844 TransactionobjectSigned 4844 Transactionfieldstransactions
array<object>requiredSigned 4844 Transaction
Show
transactionsobjecttransactionsfields-
type
stringrequiredtype
Match pattern:
^0x3$
-
nonce
stringrequirednonce
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
to
stringrequiredto address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
gas
stringrequiredgas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
value
stringrequiredvalue
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
input
stringrequiredinput data
Match pattern:
^0x[0-9a-f]*$
-
maxPriorityFeePerGas
stringrequiredMaximum fee per gas the sender is willing to pay to miners in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
maxFeePerGas
stringrequiredThe maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
maxFeePerBlobGas
stringrequiredThe maximum total fee per gas the sender is willing to pay for blob gas in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
gasPrice
stringThe effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
accessList
array<object>requiredEIP-2930 access list
Show
accessListobjectaccessListfieldsEIP-2930 access list
-
address
stringrequiredhex encoded address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
storageKeys
array<string>required32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
false
-
-
blobVersionedHashes
array<string>requiredList of versioned blob hashes associated with the transaction's EIP-4844 data blobs
Match pattern:
^0x[0-9a-f]{64}$
-
chainId
stringrequiredChain ID that this transaction is valid on
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
yParity
stringrequiredThe parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
v
stringFor backwards compatibility,
vis optionally provided as an alternative toyParity. This field is DEPRECATED and all use of it should migrate toyParity.Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
r
stringrequiredr
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
s
stringrequireds
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
additionalProperties
true
Show Option 3
Signed 1559 TransactionobjectSigned 1559 Transactionfieldstransactions
array<object>requiredSigned 1559 Transaction
Show
transactionsobjecttransactionsfields-
type
stringrequiredtype
Match pattern:
^0x2$
-
nonce
stringrequirednonce
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
to
null or string
Show Option 1
Contract Creation (null)nullShow Option 2
Addressstring -
gas
stringrequiredgas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
value
stringrequiredvalue
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
input
stringrequiredinput data
Match pattern:
^0x[0-9a-f]*$
-
maxPriorityFeePerGas
stringrequiredMaximum fee per gas the sender is willing to pay to miners in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
maxFeePerGas
stringrequiredThe maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
gasPrice
stringrequiredThe effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
accessList
array<object>requiredEIP-2930 access list
Show
accessListobjectaccessListfieldsEIP-2930 access list
-
address
stringrequiredhex encoded address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
storageKeys
array<string>required32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
false
-
-
chainId
stringrequiredChain ID that this transaction is valid on.
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
yParity
stringrequiredThe parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
v
stringFor backwards compatibility,
vis optionally provided as an alternative toyParity. This field is DEPRECATED and all use of it should migrate toyParity.Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
r
stringrequiredr
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
s
stringrequireds
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
additionalProperties
true
Show Option 4
Signed 2930 TransactionobjectSigned 2930 Transactionfieldstransactions
array<object>requiredSigned 2930 Transaction
Show
transactionsobjecttransactionsfields-
type
stringrequiredtype
Match pattern:
^0x1$
-
nonce
stringrequirednonce
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
to
null or string
Show Option 1
Contract Creation (null)nullShow Option 2
Addressstring -
gas
stringrequiredgas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
value
stringrequiredvalue
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
input
stringrequiredinput data
Match pattern:
^0x[0-9a-f]*$
-
gasPrice
stringrequiredThe gas price willing to be paid by the sender in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
accessList
array<object>requiredEIP-2930 access list
Show
accessListobjectaccessListfieldsEIP-2930 access list
-
address
stringrequiredhex encoded address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
storageKeys
array<string>required32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
false
-
-
chainId
stringrequiredChain ID that this transaction is valid on.
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
yParity
stringrequiredThe parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
v
stringFor backwards compatibility,
vis optionally provided as an alternative toyParity. This field is DEPRECATED and all use of it should migrate toyParity.Match pattern:
^0x([0-9a-fA-F]?){1,2}$
-
r
stringrequiredr
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
s
stringrequireds
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
additionalProperties
true
Show Option 5
Signed Legacy TransactionobjectSigned Legacy Transactionfieldstransactions
array<object>requiredSigned Legacy Transaction
Show
transactionsobjecttransactionsfields-
type
stringrequiredtype
Match pattern:
^0x0$
-
nonce
stringrequirednonce
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
to
null or string
Show Option 1
Contract Creation (null)nullShow Option 2
Addressstring -
gas
stringrequiredgas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
value
stringrequiredvalue
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
input
stringrequiredinput data
Match pattern:
^0x[0-9a-f]*$
-
gasPrice
stringrequiredThe gas price willing to be paid by the sender in wei
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
chainId
stringChain ID that this transaction is valid on.
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
v
stringrequiredv
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
r
stringrequiredr
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
s
stringrequireds
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
additionalProperties
true
-
-
withdrawals
array<object>Validator withdrawal
Show
withdrawalsobjectwithdrawalsfields-
index
stringrequiredindex of withdrawal
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
validatorIndex
stringrequiredindex of validator that generated withdrawal
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
address
stringrequiredrecipient address for withdrawal value
Match pattern:
^0x[0-9a-fA-F]{40}$
-
amount
stringrequiredvalue contained in withdrawal
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,63})$
-
additionalProperties
false
-
-
uncles
array<string>required32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
requestsHash
stringEIP-7685 requests hash
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
true
Errors
Error code: 4444
-
code
4444
-
message
Pruned history unavailable
Examples
eth_getBlockByHash example
Request
{
"params": [
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
]
}
Response
{
"number": "0x68b3",
"hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
"mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
"parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
"nonce": "0x378da40ff335b070",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
"transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
"stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
"receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
"miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
"difficulty": "0x66e619a",
"extraData": "0xd583010502846765746885676f312e37856c696e7578",
"size": "0x334",
"gasLimit": "0x47e7c4",
"gasUsed": "0x37993",
"timestamp": "0x5835c54d",
"uncles": [],
"transactions": [
"0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
"0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
],
"baseFeePerGas": "0x7",
"withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
"withdrawals": [
{
"index": "0x0",
"validatorIndex": "0x9d8c0",
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x11a33e3760"
}
],
"blobGasUsed": "0x0",
"excessBlobGas": "0x0",
"parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
}