Skip to main content

Module incorrect_strict_equality

Module incorrect_strict_equality 

Source

Staticsยง

INCORRECT_STRICT_EQUALITY

Functionsยง

contains_externally_influenced ๐Ÿ”’
Recursively checks whether an expression tree contains an externally-influenced balance read. This makes the lint fire on cases like address(this).balance + 1 == target or target == token.balanceOf(address(this)) - 1.
indexed_element_type ๐Ÿ”’
Returns the element type of base when it is an array or the value type when it is a mapping, restricted to elementary types.
is_address_expr ๐Ÿ”’
Conservatively returns true if expr is provably of type address (or address payable).
is_externally_influenced ๐Ÿ”’
Returns true if expr is <address>.balance or <expr>.balanceOf(...).
struct_field_type ๐Ÿ”’
Resolves the declared elementary type of field_name on base, when base is known to be a struct value.
struct_of ๐Ÿ”’
Returns the [StructId] of expr when it is a (possibly chained) struct value.