Method: Web3::Eth::EthModule#getBlockByNumber

Defined in:
lib/web3ethereum/eth_module.rb

#getBlockByNumber(block, full = true, convert_to_object = true) ⇒ Object



19
20
21
22
# File 'lib/web3ethereum/eth_module.rb', line 19

def getBlockByNumber block, full = true, convert_to_object = true
  resp = @web3_rpc.request("#{PREFIX}#{__method__}", [hex(block), full])
  convert_to_object ? Block.new(resp) : resp
end