curl --request POST \
--url https://nd-954-882-037.p2pify.com/66f812de2a6724a75a51f60dd6f2a154 \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "debug_getRawBlock",
"params": [
"latest"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}curl --request POST \
--url https://nd-954-882-037.p2pify.com/66f812de2a6724a75a51f60dd6f2a154 \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "debug_getRawBlock",
"params": [
"latest"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}arbtrace_* methods instead.quantity or tag — the block number in hex format or block tag (latest, earliest, pending, safe, finalized).data — the RLP-encoded block data as a hex string, including the header and all transactions.debug_getRawBlock code examplesconst ethers = require('ethers');
const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const debugGetRawBlock = async (block) => {
const result = await provider.send("debug_getRawBlock", [block]);
console.log(result);
};
debugGetRawBlock("latest");
debug_getRawBlock method is useful for applications that need to process or archive raw block data. Developers building custom block explorers, data pipelines, or cross-chain verification tools can use this method to retrieve the complete block in its serialized format for custom parsing and analysis.Was this page helpful?