From ace923595ccf9d0af5607ec918624be714bf5ace Mon Sep 17 00:00:00 2001 From: Josselin Date: Thu, 8 Jul 2021 10:35:37 +0200 Subject: [PATCH] Minor improvements to the function-id printer - Do not print shadowed functions - Do not printer slither's internal function --- setup.py | 6 +++--- slither/printers/summary/function_ids.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 7079af30d..7e88b57a7 100644 --- a/setup.py +++ b/setup.py @@ -11,10 +11,10 @@ setup( install_requires=[ "prettytable>=0.7.2", "pysha3>=1.0.2", - # "crytic-compile>=0.2.0", - "crytic-compile", + "crytic-compile>=0.2.0", + # "crytic-compile", ], - dependency_links=["git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile"], + # dependency_links=["git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile"], license="AGPL-3.0", long_description=open("README.md").read(), entry_points={ diff --git a/slither/printers/summary/function_ids.py b/slither/printers/summary/function_ids.py index 7152b74cf..9181b88c0 100644 --- a/slither/printers/summary/function_ids.py +++ b/slither/printers/summary/function_ids.py @@ -26,6 +26,8 @@ class FunctionIds(AbstractPrinter): txt += "\n{}:\n".format(contract.name) table = MyPrettyTable(["Name", "ID"]) for function in contract.functions: + if function.is_shadowed or function.is_constructor_variables: + continue if function.visibility in ["public", "external"]: function_id = get_function_id(function.solidity_signature) table.add_row([function.solidity_signature, f"{function_id:#0{10}x}"])