Hi, just starting out with blockchain development and I want to write a small program that listens for when a new pair is created. Currently I have this code:
node_url = 'node_url' web3 = Web3(Web3.HTTPProvider(node_url)) uniswap_router = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D' uniswap_factory = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f' uniswap_factory_abi = json.loads('ABI') contract = web3.eth.contract(address=uniswap_factory, abi=uniswap_factory_abi) def main(): event_filter = contract.events.PairCreated.createFilter(fromBlock='latest')
The problem is when I use infura this PairCreated function works fine but if I use moralis it gives me a filter not found error.
I would prefer to use moralis so is this a permission thing or do I have to use a different function that works with moralis?