Python Version: 3.9.6
Web3.py Version: 5.21.0
Used Geth and Infura (HTTPS and Web Sockets)
Tested on Ethereum Mainnet and Kovan
I have tried this before about a month ago with the exact same code and it worked as intended. However, for some reason it is returning an empty array.
from web3.auto import w3 contract = w3.eth.contract(address=uniswap_factory, abi=uniswap_factory_abi) event_filter = contract.events.PairCreated.createFilter(fromBlock='latest') print(event_filter.get_all_entries())