Skip to content

Commit

Permalink
Use the new API
Browse files Browse the repository at this point in the history
  • Loading branch information
smonicas committed Oct 24, 2024
1 parent 38f7136 commit 1bbc13b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slither/printers/guidance/echidna.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def _extract_assert(contracts: List[Contract]) -> Dict[str, Dict[str, List[Dict]
for contract in contracts:
functions_using_assert: Dict[str, List[Dict]] = defaultdict(list)
for f in contract.functions_entry_points:
for node in f.all_nodes():
if SolidityFunction("assert(bool)") in node.solidity_calls and node.source_mapping:
for ir in f.all_solidity_calls():
if ir.function == SolidityFunction("assert(bool)") and ir.node.source_mapping:
func_name = _get_name(f)
functions_using_assert[func_name].append(node.source_mapping.to_json())
functions_using_assert[func_name].append(ir.node.source_mapping.to_json())
break
if functions_using_assert:
ret[contract.name] = functions_using_assert
Expand Down

0 comments on commit 1bbc13b

Please sign in to comment.