curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0xf3cf930f1b4d9637134d09f126c57c30c3f4f40edf10ba502486b26d14b4f944",
false
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0xf3cf930f1b4d9637134d09f126c57c30c3f4f40edf10ba502486b26d14b4f944",
false
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}data — the 32-byte hash of the block.boolean — if true, returns the full transaction objects; if false, returns only the hashes of the transactions.result — the block object, or null when no block was found. See eth_getBlockByNumber for the full response structure.eth_getBlockByHash code examplesconst { ethers } = require("ethers");
const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");
async function getBlockByHash() {
const blockHash = "0xf3cf930f1b4d9637134d09f126c57c30c3f4f40edf10ba502486b26d14b4f944";
const block = await provider.getBlock(blockHash);
console.log(block);
}
getBlockByHash();
eth_getBlockByHash is verifying block data when you have a specific block hash from a transaction receipt or external source.Was this page helpful?