I took the avalanche node’s url into a provider and then wrote the filter below. However, it gives the error:
ValueError: {‘code’: -32000, ‘message’: ‘filter not found’}. I am using web3.py and trying to get all transactions made by a smart contract involving a specific event. By the way, this code runs with avalanche’s public api. How can i solve this?
.... import ContractAddress
.... import abi
web3 = Web3(Web3.HTTPProvider('https://speedy-nodes-nyc.moralis.io/asfasdfsdf/avalanche/mainnet'))
contract = web3.eth.contract(address=ContractAddress, abi=abi)
my_filter = contract.events.StartGame.createFilter(fromBlock='latest', toBlock='latest')
entries = my_filter.get_all_entries()