|
|
@ -42,6 +42,7 @@ class Contract(ChildSlither, SourceMapping): |
|
|
|
self._kind = None |
|
|
|
self._kind = None |
|
|
|
|
|
|
|
|
|
|
|
self._signatures = None |
|
|
|
self._signatures = None |
|
|
|
|
|
|
|
self._signatures_declared = None |
|
|
|
|
|
|
|
|
|
|
|
self._is_upgradeable = None |
|
|
|
self._is_upgradeable = None |
|
|
|
self._is_upgradeable_proxy = None |
|
|
|
self._is_upgradeable_proxy = None |
|
|
@ -292,7 +293,7 @@ class Contract(ChildSlither, SourceMapping): |
|
|
|
Return the signatures of all the public/eterxnal functions/state variables |
|
|
|
Return the signatures of all the public/eterxnal functions/state variables |
|
|
|
:return: list(string) the signatures of all the functions that can be called |
|
|
|
:return: list(string) the signatures of all the functions that can be called |
|
|
|
""" |
|
|
|
""" |
|
|
|
if self._signatures == None: |
|
|
|
if self._signatures is None: |
|
|
|
sigs = [v.full_name for v in self.state_variables if v.visibility in ['public', |
|
|
|
sigs = [v.full_name for v in self.state_variables if v.visibility in ['public', |
|
|
|
'external']] |
|
|
|
'external']] |
|
|
|
|
|
|
|
|
|
|
@ -300,6 +301,20 @@ class Contract(ChildSlither, SourceMapping): |
|
|
|
self._signatures = list(set(sigs)) |
|
|
|
self._signatures = list(set(sigs)) |
|
|
|
return self._signatures |
|
|
|
return self._signatures |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
|
|
|
def functions_signatures_declared(self): |
|
|
|
|
|
|
|
""" |
|
|
|
|
|
|
|
Return the signatures of the public/eterxnal functions/state variables that are declared by this contract |
|
|
|
|
|
|
|
:return: list(string) the signatures of all the functions that can be called and are declared by this contract |
|
|
|
|
|
|
|
""" |
|
|
|
|
|
|
|
if self._signatures_declared is None: |
|
|
|
|
|
|
|
sigs = [v.full_name for v in self.state_variables_declared if v.visibility in ['public', |
|
|
|
|
|
|
|
'external']] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sigs += set([f.full_name for f in self.functions_declared if f.visibility in ['public', 'external']]) |
|
|
|
|
|
|
|
self._signatures_declared = list(set(sigs)) |
|
|
|
|
|
|
|
return self._signatures_declared |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
@property |
|
|
|
def functions(self): |
|
|
|
def functions(self): |
|
|
|
''' |
|
|
|
''' |
|
|
|