From 109c31adcf0b31f4a45c1ce63ab97db63496844e Mon Sep 17 00:00:00 2001 From: Simone Date: Wed, 11 Sep 2024 14:01:59 +0200 Subject: [PATCH] Add require with error --- slither/core/cfg/node.py | 3 ++- slither/printers/summary/require_calls.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 87d0e16a2..f600d0f43 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -529,7 +529,8 @@ class Node(SourceMapping): # pylint: disable=too-many-public-methods bool: True if the node has a require or assert call """ return any( - c.name in ["require(bool)", "require(bool,string)", "assert(bool)"] + c.name + in ["require(bool)", "require(bool,string)", "require(bool,error)", "assert(bool)"] for c in self.internal_calls ) diff --git a/slither/printers/summary/require_calls.py b/slither/printers/summary/require_calls.py index 7823de160..ae79e9ed6 100644 --- a/slither/printers/summary/require_calls.py +++ b/slither/printers/summary/require_calls.py @@ -11,6 +11,7 @@ require_or_assert = [ SolidityFunction("assert(bool)"), SolidityFunction("require(bool)"), SolidityFunction("require(bool,string)"), + SolidityFunction("require(bool,error)"), ]