Web3API
HomeAPI EndpointsContactTwitter
  • ​🚀 Welcome to Web3API
  • Introduction
    • ✨Getting Started
    • 📡 Choosing A Network
  • Developers
    • 🔌API Endpoints
      • eth_hashrate
      • eth_gasPrice
      • eth_blockNumber
      • eth_getBalance
      • eth_getStorageAt
      • eth_getTransactionCount
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_sendRawTransaction
      • eth_call
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getTransactionByHash
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionReceipt
      • eth_getUncleByBlockHashAndIndex
      • eth_getUncleByBlockNumberAndIndex
      • eth_getUncleCountByBlockHash
      • eth_getUncleCountByBlockNumber
      • eth_estimateGas
      • eth_syncing
    • 😟API Errors and Troubleshooting
  • Tutorials
    • ⚡Adding a Custom RPC to Metamask
  • Dashboard
    • 🔑Forgot Password
  • Resources
    • ❓ FAQ
    • 🤝 Support
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. API Endpoints

eth_getUncleByBlockHashAndIndex

Returns information about the 'Uncle' of a block by hash and the Uncle index position.

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_getUncleByBlockHashAndIndex will always return 0x0.

Example

curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY 
-X POST 
-H "Content-Type: application/json"  
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getUncleByBlockHashAndIndex\",\"params\": [\"0xc0c70f405b193aeacd34190ef4f665aa1c8bb766530859be7560fb14ec292f05\",\"0x0\"],\"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_getUncleByBlockHashAndIndex","params": ["0xc0c70f405b193aeacd34190ef4f665aa1c8bb766530859be7560fb14ec292f05","0x0"],"id":1}'
  1. BLOCK HASH - a string representing the hash (32 bytes) of a block.

  2. UNCLE INDEX POSITION - a hex of the integer representing the uncle's index position in the block, appended with 0x such as 0x0.

Result Fields

BLOCK - A block object, or null when no block was found with the hash specified.

Body

{
   "jsonrpc":"2.0",
   "id":1,
   "result":"0x0"
}

Previouseth_getTransactionReceiptNexteth_getUncleByBlockNumberAndIndex

Last updated 3 years ago

Was this helpful?

🔌