Skip to main content

eth_getBlockTransactionCountByHash


Method

  • JSON-RPC method name: eth_getBlockTransactionCountByHash
  • JSON-RPC version: 2.0

Parameters

NameTypeRequiredDescription
Block hashstringno

Parameter schema

{
"Block hash": {
"required": false,
"schema": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}

Result

  • Name: Transaction count
  • Type: oneOf

Result schema

{
"oneOf": [
{
"title": "Not Found (null)",
"type": "null"
},
{
"title": "Transaction count",
"type": "string",
"pattern": "^0x([1-9a-f]+[0-9a-f]*|0)$"
}
]
}

Positional parameters

Parameter order:

  1. Block hash

Errors

This method may return JSON-RPC standard errors (e.g. -32600, -32601, -32602, -32603) as well as application-specific errors.

TODO: Document method-specific error codes and conditions.