|
|
|
@ -12,6 +12,7 @@ from slither.core.declarations.solidity_variables import ( |
|
|
|
|
) |
|
|
|
|
from slither.core.expressions import NewContract |
|
|
|
|
from slither.core.slither_core import SlitherCore |
|
|
|
|
from slither.core.solidity_types import TypeAlias |
|
|
|
|
from slither.core.variables.state_variable import StateVariable |
|
|
|
|
from slither.core.variables.variable import Variable |
|
|
|
|
from slither.printers.abstract_printer import AbstractPrinter |
|
|
|
@ -30,8 +31,8 @@ from slither.slithir.operations import ( |
|
|
|
|
) |
|
|
|
|
from slither.slithir.operations.binary import Binary |
|
|
|
|
from slither.slithir.variables import Constant |
|
|
|
|
from slither.visitors.expression.constants_folding import ConstantFolding |
|
|
|
|
from slither.utils.output import Output |
|
|
|
|
from slither.visitors.expression.constants_folding import ConstantFolding |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _get_name(f: Union[Function, Variable]) -> str: |
|
|
|
@ -184,7 +185,11 @@ def _extract_constants_from_irs( # pylint: disable=too-many-branches,too-many-n |
|
|
|
|
all_cst_used.append(ConstantValue(str(cst.value), str(type_))) |
|
|
|
|
if isinstance(ir, TypeConversion): |
|
|
|
|
if isinstance(ir.variable, Constant): |
|
|
|
|
all_cst_used.append(ConstantValue(str(ir.variable.value), str(ir.type))) |
|
|
|
|
if isinstance(ir.type, TypeAlias): |
|
|
|
|
value_type = ir.type.type |
|
|
|
|
else: |
|
|
|
|
value_type = ir.type |
|
|
|
|
all_cst_used.append(ConstantValue(str(ir.variable.value), str(value_type))) |
|
|
|
|
continue |
|
|
|
|
if ( |
|
|
|
|
isinstance(ir, Member) |
|
|
|
|