Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.56 KB

avoid-low-level-calls.md

File metadata and controls

56 lines (42 loc) · 1.56 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
avoid-low-level-calls | Solhint

avoid-low-level-calls

Recommended Badge Category Badge Default Severity Badge warn

The {"extends": "solhint:recommended"} property in a configuration file enables this rule.

Description

Avoid to use low level calls.

Options

This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Defaults to warn.

Example Config

{
  "rules": {
    "avoid-low-level-calls": "warn"
  }
}

Examples

👍 Examples of correct code for this rule

Using low level calls to transfer funds

anyAddress.call{value: 1 ether}("");

👎 Examples of incorrect code for this rule

Using low level calls

anyAddress.call(code);
a.callcode(test1);
a.delegatecall(test1);
anyAddress.call.value(code)();

Version

This rule was introduced in Solhint 1.1.6

Resources