Prefer to Avoid Low-Level Calls

Low-level calls, such as call, delegatecall, and staticcall, are powerful but come with increased risk, as they bypass many of Solidity’s built-in safety checks. This can lead to issues such as unchecked return values, reentrancy vulnerabilities, and potential misinterpretation of the contract’s intended logic.

Low-level calls also make error handling more challenging, as they do not revert automatically on failure, do not fail on calls to EOAs, potentially leading to unintended behaviors or funds loss. Instead, favor high-level Solidity functions and interfaces whenever available, as they are safer, easier to audit, and provide clearer, more predictable behavior.

Last updated