The emission of the 'TokenClaimed' event should occur after the loveToken.transferFrom.
Events should occur after state changes because of the possibility that they fail. If the loveToken.transferFrom fails, the 'TokenClaimed' event would still be included in the transaction's logs. This could cause issues for off-chain indexers that use events to track state changes.
Event emission before the transfer could cause issues for indexers if the transfer were to fail.
--Foundry
It is recommended to emit the event after the transfer.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.