Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge Version: 1.8.1 Commit SHA: 982849d Build Timestamp: 2026-08-28T17:50:20.499955000Z (1787939420) Build Profile: dist
What version of Foundryup are you on?
foundryup: 1.9.2
What command(s) is the bug in?
forge lint
Operating System
macOS (Intel)
Describe the bug
Here is an example from our codebase:
warning[reentrancy-events]: event emitted after an external call; reentrancy can reorder or fabricate logs that off-chain consumers rely on
╭▸ test/UnanimousGovernance.t.sol:220:9
│
220 │ emit UnanimousGovernance.Rejected(taskId, alice);
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│
╰ help: https://getfoundry.sh/forge/linting/reentrancy-events
Immediate context:
vm.expectEmit(true, true, false, false, address(harness));
emit UnanimousGovernance.Rejected(taskId, alice);
vm.prank(alice);
harness.vetoRemoveOwner(bob);
It complains because before that we did the external call:
vm.prank(bob);
harness.removeOwner(bob);
So indeed we are emitting an event after an external call. But that external call and emitted event are necessary to set the preconditions to validate the event is emitted in the callee in the subsequent call.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge Version: 1.8.1 Commit SHA: 982849d Build Timestamp: 2026-08-28T17:50:20.499955000Z (1787939420) Build Profile: dist
What version of Foundryup are you on?
foundryup: 1.9.2
What command(s) is the bug in?
forge lint
Operating System
macOS (Intel)
Describe the bug
Here is an example from our codebase:
Immediate context:
It complains because before that we did the external call:
So indeed we are emitting an event after an external call. But that external call and emitted event are necessary to set the preconditions to validate the event is emitted in the callee in the subsequent call.