I am listening to events a smart contract emits via
const CONTRACT= new web3.eth.Contract(
ABI,
ADRS
);
listener = CONTRACT.events.MyEvent();
liquidityLockListener.on("data", async (event) => {
// do things
});
but i have noticed the listener stops listening to emitted events after some time. No error being emitted whatsoever, it just stops doing its thing.
any idea?
the events I am listening to are usually very slow, few hours between them. Is there a possibility that web3 maybe just silently times out or something? Again, I am not getting any error messages, it just doesnt do anything anymore.
I receive the first events after I start up the script perfectly fine but after some time it just stops