Skip to main content
Ethereum API
Multichain API

eth_getBlockByHash

Summary: Returns information about a block by hash.

Parameters

Block hash string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$


Hydrated transactions boolean
required

hydrated

Returns

Block information oneOf

Not Found (null) null

Not Found (null)

Block object object
required

Block object

hash string

Hash

Pattern: ^0x[0-9a-f]{64}$

parentHash string

Parent block hash

Pattern: ^0x[0-9a-f]{64}$

sha3Uncles string

Ommers hash

Pattern: ^0x[0-9a-f]{64}$

miner string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

stateRoot string

State root

Pattern: ^0x[0-9a-f]{64}$

transactionsRoot string

Transactions root

Pattern: ^0x[0-9a-f]{64}$

receiptsRoot string

Receipts root

Pattern: ^0x[0-9a-f]{64}$

logsBloom string

Bloom filter

Pattern: ^0x[0-9a-f]{512}$

difficulty string

Difficulty

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

number string

Number

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

gasLimit string

Gas limit

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

gasUsed string

Gas used

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

timestamp string

Timestamp

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

extraData string

Extra data

Pattern: ^0x[0-9a-f]*$

mixHash string

Mix hash

Pattern: ^0x[0-9a-f]{64}$

nonce string

Nonce

Pattern: ^0x[0-9a-f]{16}$

baseFeePerGas string

Base fee per gas

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

withdrawalsRoot string

Withdrawals root

Pattern: ^0x[0-9a-f]{64}$

blobGasUsed string

Blob gas used

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

excessBlobGas string

Excess blob gas

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

parentBeaconBlockRoot string

Parent Beacon Block Root

Pattern: ^0x[0-9a-f]{64}$

size string

Block size

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

transactions anyOf

Transaction hashes array

Transaction hashes

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

Full transactions array

Full transactions

Transaction information allOf

Transaction information

Contextual information
required

Contextual information

oneOf

Signed 4844 Transaction allOf

Signed 4844 Transaction

EIP-4844 transaction. object
required

EIP-4844 transaction.

type string

type

Pattern: ^0x([0-9a-fA-F]?){1,2}$

nonce string

nonce

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

to string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

gas string

gas limit

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

value string

value

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

input string

input data

Pattern: ^0x[0-9a-f]*$

maxPriorityFeePerGas string

Maximum fee per gas the sender is willing to pay to miners in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

maxFeePerGas string

The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

maxFeePerBlobGas string

The maximum total fee per gas the sender is willing to pay for blob gas in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

accessList array

EIP-2930 access list

Access list entry object

Access list entry

address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

storageKeys array

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

blobVersionedHashes array

List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

chainId string

Chain ID that this transaction is valid on.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

EIP-4844 transaction signature properties.
required

EIP-4844 transaction signature properties.

Signed 1559 Transaction allOf

Signed 1559 Transaction

EIP-1559 transaction. object
required

EIP-1559 transaction.

type string

type

Pattern: ^0x2$

nonce string

nonce

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

to oneOf

to address

Contract Creation (null) null

Contract Creation (null)

hex encoded address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

gas string

gas limit

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

value string

value

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

input string

input data

Pattern: ^0x[0-9a-f]*$

maxPriorityFeePerGas string

Maximum fee per gas the sender is willing to pay to miners in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

maxFeePerGas string

The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

gasPrice string

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

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

accessList array

EIP-2930 access list

Access list entry object

Access list entry

address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

storageKeys array

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

chainId string

Chain ID that this transaction is valid on.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

EIP-1559 transaction signature properties.
required

EIP-1559 transaction signature properties.

Signed 2930 Transaction allOf

Signed 2930 Transaction

EIP-2930 transaction. object
required

EIP-2930 transaction.

type string

type

Pattern: ^0x1$

nonce string

nonce

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

to oneOf

to address

Contract Creation (null) null

Contract Creation (null)

hex encoded address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

gas string

gas limit

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

value string

value

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

input string

input data

Pattern: ^0x[0-9a-f]*$

gasPrice string

The gas price willing to be paid by the sender in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

accessList array

EIP-2930 access list

Access list entry object

Access list entry

address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

storageKeys array

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

chainId string

Chain ID that this transaction is valid on.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

EIP-2930 transaction signature properties.
required

EIP-2930 transaction signature properties.

Signed Legacy Transaction allOf

Signed Legacy Transaction

Legacy transaction. object
required

Legacy transaction.

type string

type

Pattern: ^0x0$

nonce string

nonce

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

to oneOf

to address

Contract Creation (null) null

Contract Creation (null)

hex encoded address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

gas string

gas limit

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

value string

value

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

input string

input data

Pattern: ^0x[0-9a-f]*$

gasPrice string

The gas price willing to be paid by the sender in wei

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

chainId string

Chain ID that this transaction is valid on.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Legacy transaction signature properties.
required

Legacy transaction signature properties.

withdrawals array

Withdrawals

Validator withdrawal object
required

Validator withdrawal

index string

index of withdrawal

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$

validatorIndex string

index of validator that generated withdrawal

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$

address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

amount string

value contained in withdrawal

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$

uncles array

Uncles

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

Customize request
Parameter
Value
string
boolean
Connect your MetaMask wallet to run requests successfully.
Request
await window.ethereum.request({
"method": "eth_getBlockByHash",
"params": [
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
false
],
});
Example 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",
"totalDifficulty": "0x1e875d746ae",
"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"
}