curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"id": 1,
"params": [
"0x7e4aea365093a183b0df5f003f26144ef04ec8a6e7f4910356590c5fc7b1671f",
true
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"id": 1,
"params": [
"0x7e4aea365093a183b0df5f003f26144ef04ec8a6e7f4910356590c5fc7b1671f",
true
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}hash — the hash of the block to retrieve, as a hexadecimal string.fullTransactionObjects — a boolean indicating whether to return full transaction objects or only their hashes. If true, full transaction objects are returned; if false, only the hashes of the transactions are returned.result — an object containing the block’s information, including the block number, timestamp, transactions, and more. If fullTransactionObjects is true, this will include detailed information about each transaction in the block.eth_getBlockByHash method is useful for applications that need to retrieve specific blocks from the blockchain, such as block explorers, wallets, or applications that process or display block information. For example, a block explorer might use this method to display detailed information about a block and its transactions to users.Was this page helpful?