I need to trigger a sensitive offchain action based on a users interaction with my smart contract.
My current approach is to
emit and event (
Trigger(msg.sender, 123)) and then use a
filterQuery with my contract address to listen to these events on my offchain backend.
Is this in general the correct approach or is there a better way to do this?
What are the security considerations I have to be aware of in this context?
Waiting for confirmations to ensure the block is/stays included is one I assume? Anything else I'd need to be aware of of how this setup could be attacked?