BatchCallState

Documentation for eth_defi.event_reader.multicall_batcher.BatchCallState Python class.

class BatchCallState

Bases: abc.ABC

Allow 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 load(data)

Persist state across multiple runs

Parameters

data (dict) –

abstract save()

Persist state across multiple runs.

Returns

Pickleable Python object

Return type

dict

abstract should_invoke(call, block_identifier, timestamp)

Check the condition if this multicall is good to go.

Parameters
Return type

bool