Merge pull request #282 from arxenix/retrieve-fallback-function

add is_fallback parameter to Function
pull/298/head
Feist Josselin 6 years ago committed by GitHub
commit 43c6cf7a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      slither/core/declarations/function.py

@ -986,6 +986,14 @@ class Function(ChildContract, ChildInheritance, SourceMapping):
args_vars = self.all_solidity_variables_used_as_args() args_vars = self.all_solidity_variables_used_as_args()
return SolidityVariableComposed('msg.sender') in conditional_vars + args_vars return SolidityVariableComposed('msg.sender') in conditional_vars + args_vars
def is_fallback(self):
"""
Determine if the function is the fallback function for the contract
Returns
(bool)
"""
return self._name == "" and not self.is_constructor
# endregion # endregion
################################################################################### ###################################################################################
################################################################################### ###################################################################################

Loading…
Cancel
Save