Contents

eth_getUncleCountByBlockNumber RPC method

Parameters:

  1. Number - Integer of a block number in hexadecimal format starting with 0x.

Returns:

  1. Uncles - Integer value of the number of uncles in the block encoded as a hexadecimal.

Code Examples:

require 'ethereum.rb'
client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/')
uncleCount = client.eth_get_uncle_count_by_block_number('0xc5043f')
puts uncleCount["result"].to_i(16)
Ready to try QuickNode? Start your 7-day free trial