@@ -85,7 +85,10 @@ def get_funcs_modifying_array_params(contracts: List[Contract]) -> Set[FunctionC
85
85
# Determine if this function takes an array as a parameter and the location isn't storage.
86
86
# If it has been written to, we know this sets an non-storage-ref array.
87
87
for param in function .parameters :
88
- if isinstance (param .type , ArrayType ) and param .location != VariableLocation .STORAGE :
88
+ if (
89
+ isinstance (param .type , ArrayType )
90
+ and param .location != VariableLocation .STORAGE
91
+ ):
89
92
if param in function .variables_written :
90
93
results .add (function )
91
94
break
@@ -133,8 +136,14 @@ def detect_calls_passing_ref_to_function(
133
136
# If it is a state variable OR a local variable referencing storage, we add it to the list.
134
137
if (
135
138
isinstance (arg , StateVariable )
136
- or (isinstance (arg , LocalVariable ) and arg .location == VariableLocation .STORAGE )
137
- ) and (isinstance (param .type , ArrayType ) and param .location != VariableLocation .STORAGE ):
139
+ or (
140
+ isinstance (arg , LocalVariable )
141
+ and arg .location == VariableLocation .STORAGE
142
+ )
143
+ ) and (
144
+ isinstance (param .type , ArrayType )
145
+ and param .location != VariableLocation .STORAGE
146
+ ):
138
147
results .append ((ir .node , arg , ir .function ))
139
148
return results
140
149
0 commit comments