Linting rules
E021: dangerous-send-mode-missing-safety-comment
Requires a `SAFETY` comment for `msg.send(...)` calls that use dangerous send-mode flags.
Metadata
Code:E021Rule:dangerous-send-mode-missing-safety-commentStatus: Stable sincev0.0.1Quick fix: not available
What it does
Requires a SAFETY comment for msg.send(...) calls that use dangerous send-mode flags.
Why is this bad?
Flags like SEND_MODE_CARRY_ALL_BALANCE or SEND_MODE_DESTROY can drain balance
or destroy the contract. These calls should always document their assumptions.
Example
outMsg.send(SEND_MODE_CARRY_ALL_BALANCE);Use instead:
// SAFETY: this path intentionally drains balance during controlled migration.
outMsg.send(SEND_MODE_CARRY_ALL_BALANCE);Last updated on