const { Web3 } = require('web3');
// Replace with your Infura project ID
const API_KEY = ''"
const web3 = new Web3(new Web3.providers.WebsocketProvider(`wss://mainnet.infura.io/ws/v3/${API_KEY}`));
const ERC20_TRANSFER_SIGNATURE = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
const TokenAddress = ''
var subscription = web3.eth.subscribe('logs', {
address: TokenAddress,
topics: [ERC20_TRANSFER_SIGNATURE]
}, function(error, result){
if (!error)
console.log(result);
});
Im trying to subscribe to transfer events for a specific tokens, but nothing gets logged, ive done my hours of researching and cant see why. Any suggestions?