read_multicall_historical_stateful

Documentation for eth_defi.event_reader.multicall_batcher.read_multicall_historical_stateful function.

read_multicall_historical_stateful(chain_id, web3factory, calls, start_block, end_block, step, max_workers=8, timeout=1800, display_progress=True, progress_suffix=None, require_multicall_result=False, chunk_size=48, hypersync_client=None, timestamp_cache_file=PosixPath('/home/runner/.tradingstrategy/block-timestamp'), rpc_request_stats=None)

Read historical data using multicall with reading state and adaptive frequency filtering.

  • Allow adaptive frequency with read state

  • Slower loop than the dumb read_multicall_historical() as it has to maintain state

  • Because of state, we need to do block by block reading, as we need to evaluate state to see which calls are needed for which block, and the state depends on the result of the previous blocks

Parameters
Return type

Iterable[eth_defi.event_reader.multicall_batcher.CombinedEncodedCallResult]