credmark.cmf.types.contract_web3.fetch_events

fetch_events(event, argument_filters=None, from_block=None, to_block=None, address=None, topics=None, contract_address=None, argument_names=None, by_range=None, async_web3=None, async_worker=10)[source]

Get events using eth_getLogs API.

This is a stateless method, as opposite to createFilter and works with stateless nodes like QuickNode and Infura.

Parameters
  • event (BaseContractEvent) – Event instance from your contract.events

  • argument_filters

  • from_block – Start block. Use 0 for all history/

  • to_block – Fetch events until this contract

  • address

  • topics

  • argument_names (Optional[Sequence[str]]) –

  • by_range (Optional[int]) –

  • async_web3 (Optional[AsyncWeb3]) –

  • async_worker (int) –

Returns