eth_getBlockTransactionCountByHash
返回指定块内的交易数量,使用哈希来指定块。
参数
DATA
- 32字节,块哈希
params: [
'0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'
]
返回值
QUANTITY
- 指定块内的交易数量,整数
示例代码
请求:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":1}'
响应:
{
"id":1,
"jsonrpc": "2.0",
"result": "0xb" // 11
}