Skip to content
low Best Practice No SWC entry CWE-778

Missing Event Emission on Critical Action

SAFE-0075 Best Practice Checked automatically by the scanner
1

What goes wrong

State-changing admin/critical actions emit no events, hampering off-chain monitoring, incident response, and transparency (and sometimes hiding malicious changes).

2

How to fix it

the pattern that is safe
event OwnerChanged(address indexed prev, address indexed next);
function setOwner(address n) external onlyOwner { emit OwnerChanged(owner,n); owner=n; }
Emit events for all critical state changes.
3

Where this has happened

Largest recorded losses in the same failure class — related, not the same bug:

Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0075 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs