slither.slithir.operations.call

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

Helper class that provides a standard way to create an ABC using inheritance.

Call(names: list[str] | None = None)
 8    def __init__(self, names: list[str] | None = None) -> None:
 9        """
10        #### Parameters
11        names -
12            For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order.
13            Otherwise, None.
14        """
15        assert (names is None) or isinstance(names, list)
16        super().__init__()
17        self._arguments: list[Variable] = []
18        self._names = names

Parameters

names - For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order. Otherwise, None.

names: list[str] | None
20    @property
21    def names(self) -> list[str] | None:
22        """
23        For calls of the form f({argName1 : arg1, ...}), the names of parameters listed in call order.
24        Otherwise, None.
25        """
26        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]
28    @property
29    def arguments(self) -> list[Variable]:
30        return self._arguments
def can_reenter( self, _callstack: list[slither.core.declarations.function.Function | slither.core.variables.variable.Variable] | None = None) -> bool:
36    def can_reenter(self, _callstack: list[Function | Variable] | None = None) -> bool:
37        """
38        Must be called after slithIR analysis pass
39        :return: bool
40        """
41        return False

Must be called after slithIR analysis pass

Returns

bool

def can_send_eth(self) -> bool:
43    def can_send_eth(self) -> bool:
44        """
45        Must be called after slithIR analysis pass
46        :return: bool
47        """
48        return False

Must be called after slithIR analysis pass

Returns

bool