post https://api.infstones.com/bsc/mainnet/
Returns the number of transactions in the block with the given block hash.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | Hash of a block. |
"params": [
"0xef0c14940f208ee5d2928d4a46828e29e40bc0cfe260fe65f5c98f957e844730"
]
Result
A hex code of an integer that represents the number of transactions in the block.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xef0c14940f208ee5d2928d4a46828e29e40bc0cfe260fe65f5c98f957e844730"],"id":1}'
Return
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xcb"
}