extract_events

Documentation for eth_defi.event_reader.reader.extract_events function.

extract_events(web3, start_block, end_block, filter, context=None, extract_timestamps=<function extract_timestamps_json_rpc>)[source]

Perform eth_getLogs call over a block range.

Parameters
  • start_block (int) – First block to process (inclusive)

  • end_block (int) – Last block to process (inclusive)

  • filter (eth_defi.event_reader.filter.Filter) – Internal filter used to match logs

  • extract_timestamps (Optional[Callable]) – Method to get the block timestamps

  • context (Optional[eth_defi.event_reader.logresult.LogContext]) – Passed to the all generated logs

  • web3 (web3.main.Web3) –

Returns

Iterable for the raw event data

Return type

Iterable[eth_defi.event_reader.logresult.LogResult]