read_multicall_historical
Documentation for eth_defi.event_reader.multicall_batcher.read_multicall_historical function.
- read_multicall_historical(chain_id, web3factory, calls, start_block, end_block, step, max_workers=8, timeout=1800, display_progress=True, progress_suffix=None, require_multicall_result=False)[source]
Read historical data using multiple threads in parallel for speedup.
Run over period of time (blocks)
Use multicall to harvest data from a single block at a time
Show a progress bar using
tqdm
- Parameters
chain_id (int) – Which chain we are targeting with calls.
web3factory (eth_defi.event_reader.web3factory.Web3Factory) – The connection factory for subprocesses
start_block (int) – Block range to scoop
end_block (int) – Block range to scoop
step (int) – How many blocks we iterate at once
timeout – Joblib timeout to wait for a result from an individual task
progress_suffix (Optional[Callable]) – Allow caller to decorate the progress bar
require_multicall_result – Debug parameter to crash the reader if we start to get invalid replies from Multicall3 contract.
display_progress (bool | str) –
Whether to display progress bar or not.
Set to string to have a progress bar label.
calls (Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]) –
- Return type
Iterable[eth_defi.event_reader.multicall_batcher.CombinedEncodedCallResult]