[SOLVED] Issue with custom event sync reading from previous instance of hardhat node

Hey there,

So I’ve got a hardhat node running locally, I had previously synced events to write to my moralis db from this node and was working ok.

Then I made some updates to the contract, re-deployed the node but the events would no longer sync.

I have tried restarting the node several times, tried deleting the sync from the moralis dashboard, and even tried re-starting my computer but still won’t work.

One thing that I have noticed though is that if I do a historical sync, it will write all of the previous events from my previous node instance to the database.

Can I get some help here :)?

Just worked it out I think, it’s to do with the block number, bumped up the block number of the local node to be higher than previously synced events and it worked