Parameters
data— the hash of the blockboolean— iftrue, returns full transaction objects; iffalse, returns only transaction hashes
Response
object— a block object, ornullwhen no block was found
data — the hash of the blockboolean — if true, returns full transaction objects; if false, returns only transaction hashesobject — a block object, or null when no block was foundeth_getBlockByHash code examplesconst { JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");
async function call() {
const result = await provider.send("eth_getBlockByHash", []);
console.log(result);
}
call();
Was this page helpful?