Comment on page
eth_getUncleCountByBlockNumber
Returns the number of uncles in a block from a block matching the given block number.
While this method is supported, the BSC network uses the Proof of Staked Authority ( PoSA ) consensus mechanism which doesn't involve 'Uncle' blocks.
Hence all results from eth_getUncleCountByBlockNumber will always return
0x0
. Command Shell
Bash
curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY
-X POST
-H "Content-Type: application/json"
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getUncleCountByBlockNumber\",\"params\": [\"0x21A67A\"],\"id\":1}"
curl -X POST 'https://bsc-<network>.web3api.com/v1/YOUR-API-KEY' \
-H 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x21A67A"],"id":1}'
Request Parameters
Response
- 1.
BLOCK PARAMETER
- Anint
block number in the form of hex, appended with 0x such as0x6D7FE0
, or pre-defined stringslatest
,earliest
,pending
.
Web3API's Composer accepts
int
block numbers, which will be auto-converted to a hex representation before being sent to a node. Result Fields
UNCLE BLOCK TRANSACTION COUNT
- A hex code of an integer representing the number of transactions in the specified block, or null when none are found. Body
{
"jsonrpc":"2.0",
"id":1,
"result":"0x0"
}
Last modified 2yr ago