From a6f6fc0bfa8ada650ab508ad2387b7dd150bf0a6 Mon Sep 17 00:00:00 2001 From: webthethird Date: Fri, 17 Mar 2023 09:40:17 -0500 Subject: [PATCH] Use `.state_variables_ordered` and `.is_constructor_variables` --- slither/utils/upgradeability.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slither/utils/upgradeability.py b/slither/utils/upgradeability.py index 5f1a395f5..f94813876 100644 --- a/slither/utils/upgradeability.py +++ b/slither/utils/upgradeability.py @@ -82,8 +82,8 @@ def compare( tainted-functions: list[Function] """ - order_vars1 = [v for v in v1.state_variables if not v.is_constant and not v.is_immutable] - order_vars2 = [v for v in v2.state_variables if not v.is_constant and not v.is_immutable] + order_vars1 = [v for v in v1.state_variables_ordered if not v.is_constant and not v.is_immutable] + order_vars2 = [v for v in v2.state_variables_ordered if not v.is_constant and not v.is_immutable] func_sigs1 = [function.solidity_signature for function in v1.functions] func_sigs2 = [function.solidity_signature for function in v2.functions] @@ -114,7 +114,7 @@ def compare( new_modified_function_vars += ( function.state_variables_read + function.state_variables_written ) - elif not function.name.startswith("slither") and is_function_modified( + elif not function.is_constructor_variables and is_function_modified( orig_function, function ): new_modified_functions.append(function)