extract_timestamps_json_rpc

Documentation for eth_defi.event_reader.reader.extract_timestamps_json_rpc function.

extract_timestamps_json_rpc(web3, start_block, end_block)[source]

Get block timestamps from block headers.

Use slow JSON-RPC block headers call to get this information.

TODO: This is an old code path. This has been replaced by more robust ReorganisationMonitor implementation.

Returns

block hash -> UNIX timestamp mapping

Parameters
  • web3 (web3.main.Web3) –

  • start_block (int) –

  • end_block (int) –

Return type

Dict[str, int]