I’m subscribed for logs for certain addresses but after hours of running the script, I didn’t get any log event. However, Etherscan shows transactions every few seconds for the same address. Please help me find out what am I doing wrong.
https://etherscan.io/address/0x28c6c06298d514db089934071355e5743bf21d60
const Web3 = require('web3');
const web3 = new Web3(new Web3.providers.WebsocketProvider('wss://mainnet.infura.io/ws/v3/XXXXX'))
const subscription = web3.eth.subscribe('logs', {
address: '0x28C6c06298d514Db089934071355E5743bf21d60',
})
subscription.subscribe((error, result) => {
if (error) console.log(error);
});
subscription.on('data', console.log);