joe
March 6, 2021, 11:54pm
1
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.
Lily
March 8, 2021, 5:54pm
2
Hi Joe.
In your code, are you actually subscribed to Uniswap’s contract?
joe
March 9, 2021, 2:22am
3
No, I’m just using Uniswap’s address as an example. No matter what address I use, I don’t get any updates.
Lily
March 9, 2021, 1:00pm
4
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.
joe
March 9, 2021, 9:50pm
5
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