← Mantle overview
Mantle · debug
debug_getRawBlock
Returns an RLP-encoded block.
Parameters
BlockrequiredSchema{ "title": "Block number or tag", "oneOf": [ { "type": "string", "title": "Block number", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, { "type": "string", "title": "Block tag", "description": "`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error", "enum": [ "earliest", "finalized", "safe", "latest", "pending" ] } ] }
Result
Block RLP
Schema
{
"type": "string",
"title": "hex encoded bytes",
"pattern": "^0x[0-9a-f]*$"
}Example request
Endpoint: https://your-mantle-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_getRawBlock",
"params": [
"0x32026E"
]
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xf96096f90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162…8c59930d8acd3b820f08"
}Test fixture
Fixture: get-block-n
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_getRawBlock",
"params": [
"0x3"
]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xf90558f901f7a0b4874cd66b2070da5d1905b5937e97c82d1891747739b3ebb0f7f6ffc9ad518a…00880000000000000000"
}cURL
curl -X POST https://your-mantle-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"debug_getRawBlock","params":["0x32026E"]}'