BatchCallState
Documentation for eth_defi.event_reader.multicall_batcher.BatchCallState Python class.
- class BatchCallState
Bases:
abc.ABCAllow mutlicall calls to maintain state over the multiple invocations.
Mostly useful for historical mutlticall read and frequency management
Methods summary
__init__()load(data)Persist state across multiple runs
save()Persist state across multiple runs.
should_invoke(call, block_identifier, timestamp)Check the condition if this multicall is good to go.
- abstract should_invoke(call, block_identifier, timestamp)
Check the condition if this multicall is good to go.
- Parameters
call (eth_defi.event_reader.multicall_batcher.EncodedCall) –
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) –
timestamp (datetime.datetime) –
- Return type
- abstract save()
Persist state across multiple runs.
- Returns
Pickleable Python object
- Return type
- abstract load(data)
Persist state across multiple runs
- Parameters
data (dict) –