[Inspection] debug_printBlock
Retrieves a block and returns its pretty printed form.
NOTE: In versions earlier than Klaytn v1.7.0, only integer type is available.
JSONRPC: debug_printBlock
Request
- application/json
Body
Array [
- IntegerBlockNumber
- HexadecimalBlockNumber
- BlockTag
- BlockHash
]
Default value: debug_printBlock
Method name
Default value: 1
Request ID, Random or Auto incrementation
Default value: 2.0
JSON-RPC Version (2.0)
params
undefined[]
required
BlockNumberOrHashOrTag
object
oneOf
number
string
string
string
Responses
- 200
Return the dump of a block struct.
- application/json
- Schema
- Example (from schema)
Schema
Default value: 2.0
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
| code | message | description | |-----|-----|-------| | -32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. | |-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
Dump of a block struct.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": "(*types.Block)(0xc4355b05a0)(Block(#65120): Size: 2.95 kB {\nMinerHash: 7a5f8d37d34be6d9d19c5f161756d607da62227bb725ddb2f372682d7a9f1445\nHeader(e96d6477acfeba8ba865c315020471dcf751aa1bddca77f469334ab0492d218f):\n[\n\tParentHash: e768b5b7eeb1005fe130c26da744d47e042e9227cee675fa70c89ede38653aea\n\tCoinbase: 0000000000000000000000000000000000000000\n\tRewardbase: ... 0000000000000000000000000000000000000000\n\tRoot: 4fd68a8f550cbd9ad665bc1a8021882ced5e1859fd9e28a48cb2910532b6ef27\n\tTxSha: e3dbb8245038adcdc849de54af1d05f0c36c4c20d2710e31d525bd012d20a193\n\tReceiptSha: 212d4f453a897e2a486c86a4b120c1a850e89753865fe7f1aafa4"
}