Skip to content

Commit

Permalink
Improve values extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
smonicas committed Oct 4, 2024
1 parent 0811cd6 commit afac8c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slither/printers/guidance/echidna.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ def _extract_constants_from_irs( # pylint: disable=too-many-branches,too-many-n
# Do not report struct_name in a.struct_name
if isinstance(ir, Member):
continue
if isinstance(var_read, Variable) and var_read.is_constant:
value = ConstantFolding(var_read.expression, var_read.type).result()
all_cst_used.append(ConstantValue(str(value), str(var_read.type)))
if isinstance(var_read, Constant):
all_cst_used.append(ConstantValue(str(var_read.value), str(var_read.type)))
if isinstance(var_read, StateVariable):
Expand Down

0 comments on commit afac8c4

Please sign in to comment.