Replies: 2 comments 2 replies
-
Do you have an example of an incorrect output that you could share? If the function is virtual, maybe it's not working as expected. Otherwise, if inheritance is used, it is correct to search for the function in parent contracts. |
Beta Was this translation helpful? Give feedback.
-
Please look this example. Solidity document is as follows:
run the code as follows:
The command line will output the result as folllows: |
Beta Was this translation helpful? Give feedback.
-
slither/examples/scripts/possible_paths.py#all_function_definitions
There are these codes:
resolve_function in target_function = next( (function for function in contract.functions if function.name == function_name), None )
In the above code, contract.functions needs to be modified to contract.functions_declared. The search scope will be limited to the functions defined by the contract. Otherwise, if there is inheritance, the parent class will be returned.
Beta Was this translation helpful? Give feedback.
All reactions