Websocket subscription for logs doesn't return any events

Hi, I noticed that my websocket subscription recently stopped receiving any updates. Using Uniswap’s address as an example:

wscat -c wss://mainnet.infura.io/ws/v3/<my project id>
> {"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"}]}
< {"jsonrpc":"2.0","id":1,"result":"0xabcd"}

It returns the subscription ID, but no further events show up. It used to work last time I checked, about 2 months ago. Please help.

Hi Joe.
In your code, are you actually subscribed to Uniswap’s contract?

No, I’m just using Uniswap’s address as an example. No matter what address I use, I don’t get any updates.

Hi, Joe. It seems the uniswap contract doesn’t emit any events https://etherscan.io/address/0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D#events

Can you try with this address 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, after the initial return of the subscription ID, it should return the log as well.

Thank you for pointing me at the right direction! You are right, the address doesn’t emit any logs. After using a different address, I can see the logs now.

1 Like