From 1bbc13b3086100f20180017851680fb0cfdda313 Mon Sep 17 00:00:00 2001 From: Simone Date: Thu, 24 Oct 2024 13:11:47 +0200 Subject: [PATCH] Use the new API --- slither/printers/guidance/echidna.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slither/printers/guidance/echidna.py b/slither/printers/guidance/echidna.py index c3cb16a56..07ca3427f 100644 --- a/slither/printers/guidance/echidna.py +++ b/slither/printers/guidance/echidna.py @@ -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