post https://polygon-mainnet-rpc.allthatnode.com:8545/
Returns the number of transactions in a block matching the given block number.
Parameters
QUANTITY|TAG
- integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
curl https://polygon-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
"jsonrpc":"2.0",
"id":1,
"method":"eth_getBlockTransactionCountByNumber",
"params":[
"latest"
]
}'
Returns
QUANTITY
- integer of the number of transactions in this block.
{"jsonrpc":"2.0","id":1,"result":"0x2d"}