Hey everytime when i try to check if pair is created i get the error ‘PairCreated’ has no attribute ‘newFilter’
what am i doing wrong?
def main():
event_filter = contract.events.PairCreated.newFilter(fromBlock='latest')
#block_filter = web3.eth.filter('latest')
# tx_filter = web3.eth.filter('pending')
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(
asyncio.gather(
log_loop(event_filter,2 )))
# log_loop(block_filter, 2),
# log_loop(tx_filter, 2)))
finally:
loop.close()