Filter

Documentation for eth_defi.event_reader.filter.Filter Python class.

class Filter[source]

Internal filter used to match events.

A helper class to deal with eth_getLogs JSON API.

This can be used with

Attributes summary

contract_address

Get events from a single contract only.

topics

Preconstructed topic hash -> Event mapping

bloom

Bloom filter to match block headers TODO: Currently unsupported

Methods summary

__init__(topics, bloom[, contract_address])

create_filter(address, event_types)

topics: Dict[str, web3.contract.contract.ContractEvent]

Preconstructed topic hash -> Event mapping

bloom: Optional[eth_bloom.bloom.BloomFilter]

Bloom filter to match block headers TODO: Currently unsupported

contract_address: Optional[Union[str, List[str]]] = None

Get events from a single contract only.

For multiple contracts give a list of addresses.

__init__(topics, bloom, contract_address=None)
Parameters
Return type

None