slither.slithir.operations.call
1from typing import Optional, List, Union 2 3from slither.core.declarations import Function 4from slither.core.variables import Variable 5from slither.slithir.operations.operation import Operation 6 7 8class Call(Operation): 9 def __init__(self, names: Optional[List[str]] = None) -> None: 10 """ 11 #### Parameters 12 names - 13 For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. 14 Otherwise, None. 15 """ 16 assert (names is None) or isinstance(names, list) 17 super().__init__() 18 self._arguments: List[Variable] = [] 19 self._names = names 20 21 @property 22 def names(self) -> Optional[List[str]]: 23 """ 24 For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. 25 Otherwise, None. 26 """ 27 return self._names 28 29 @property 30 def arguments(self) -> List[Variable]: 31 return self._arguments 32 33 @arguments.setter 34 def arguments(self, v: List[Variable]) -> None: 35 self._arguments = v 36 37 def can_reenter(self, _callstack: Optional[List[Union[Function, Variable]]] = None) -> bool: 38 """ 39 Must be called after slithIR analysis pass 40 :return: bool 41 """ 42 return False 43 44 def can_send_eth(self) -> bool: 45 """ 46 Must be called after slithIR analysis pass 47 :return: bool 48 """ 49 return False
9class Call(Operation): 10 def __init__(self, names: Optional[List[str]] = None) -> None: 11 """ 12 #### Parameters 13 names - 14 For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. 15 Otherwise, None. 16 """ 17 assert (names is None) or isinstance(names, list) 18 super().__init__() 19 self._arguments: List[Variable] = [] 20 self._names = names 21 22 @property 23 def names(self) -> Optional[List[str]]: 24 """ 25 For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. 26 Otherwise, None. 27 """ 28 return self._names 29 30 @property 31 def arguments(self) -> List[Variable]: 32 return self._arguments 33 34 @arguments.setter 35 def arguments(self, v: List[Variable]) -> None: 36 self._arguments = v 37 38 def can_reenter(self, _callstack: Optional[List[Union[Function, Variable]]] = None) -> bool: 39 """ 40 Must be called after slithIR analysis pass 41 :return: bool 42 """ 43 return False 44 45 def can_send_eth(self) -> bool: 46 """ 47 Must be called after slithIR analysis pass 48 :return: bool 49 """ 50 return False
Helper class that provides a standard way to create an ABC using inheritance.
Call(names: Union[List[str], NoneType] = None)
10 def __init__(self, names: Optional[List[str]] = None) -> None: 11 """ 12 #### Parameters 13 names - 14 For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. 15 Otherwise, None. 16 """ 17 assert (names is None) or isinstance(names, list) 18 super().__init__() 19 self._arguments: List[Variable] = [] 20 self._names = names
Parameters
names - For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. Otherwise, None.
names: Union[List[str], NoneType]
22 @property 23 def names(self) -> Optional[List[str]]: 24 """ 25 For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. 26 Otherwise, None. 27 """ 28 return self._names
For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. Otherwise, None.
arguments: List[slither.core.variables.variable.Variable]
def
can_reenter( self, _callstack: Union[List[Union[slither.core.declarations.function.Function, slither.core.variables.variable.Variable]], NoneType] = None) -> bool:
38 def can_reenter(self, _callstack: Optional[List[Union[Function, Variable]]] = None) -> bool: 39 """ 40 Must be called after slithIR analysis pass 41 :return: bool 42 """ 43 return False
Must be called after slithIR analysis pass
Returns
bool