Add require with error

pull/2550/head
Simone 3 months ago
parent 5d55bc5752
commit 109c31adcf
  1. 3
      slither/core/cfg/node.py
  2. 1
      slither/printers/summary/require_calls.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 bool: True if the node has a require or assert call
""" """
return any( 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 for c in self.internal_calls
) )

@ -11,6 +11,7 @@ require_or_assert = [
SolidityFunction("assert(bool)"), SolidityFunction("assert(bool)"),
SolidityFunction("require(bool)"), SolidityFunction("require(bool)"),
SolidityFunction("require(bool,string)"), SolidityFunction("require(bool,string)"),
SolidityFunction("require(bool,error)"),
] ]

Loading…
Cancel
Save