diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 9834a4654..eddac1480 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -36,7 +36,7 @@ jobs: cp pyproject.toml .github/linters - name: Black - uses: docker://github/super-linter:v4 + uses: github/super-linter/slim@v4.8.7 if: always() env: # run linter on everything to catch preexisting problems @@ -46,3 +46,4 @@ jobs: # Run only black VALIDATE_PYTHON_BLACK: true PYTHON_BLACK_CONFIG_FILE: pyproject.toml + FILTER_REGEX_EXCLUDE: .*tests/.*.(json|zip|sol) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 00c1ad61d..94bc3a97b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -36,7 +36,7 @@ jobs: cp pyproject.toml .github/linters - name: Lint everything else - uses: docker://github/super-linter:v4 + uses: github/super-linter/slim@v4 if: always() env: # run linter on everything to catch preexisting problems @@ -58,3 +58,4 @@ jobs: VALIDATE_JSCPD: false VALIDATE_PYTHON_MYPY: false SHELLCHECK_OPTS: "-e SC1090" + FILTER_REGEX_EXCLUDE: .*tests/.*.(json|zip|sol) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index a803ad932..c4b7c36df 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -36,7 +36,7 @@ jobs: cp pyproject.toml .github/linters - name: Pylint - uses: docker://github/super-linter:v4 + uses: github/super-linter/slim@v4 if: always() env: # run linter on everything to catch preexisting problems @@ -47,3 +47,4 @@ jobs: VALIDATE_PYTHON: true VALIDATE_PYTHON_PYLINT: true PYTHON_PYLINT_CONFIG_FILE: pyproject.toml + FILTER_REGEX_EXCLUDE: .*tests/.*.(json|zip|sol) diff --git a/README.md b/README.md index 6842b972f..b160cd9be 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Run Slither on a single file: slither tests/uninitialized.sol ``` -For additional configuration, see the [usage](https://github.com/trailofbits/slither/wiki/Usage) documentation. +For GitHub action integration, see [slither-action](https://github.com/marketplace/actions/slither-action). For additional configuration, see the [usage](https://github.com/trailofbits/slither/wiki/Usage) documentation. Use [solc-select](https://github.com/crytic/solc-select) if your contracts require older versions of solc. diff --git a/slither/__main__.py b/slither/__main__.py index b92e727b7..d4ac86c4e 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -64,6 +64,9 @@ def process_single(target, args, detector_classes, printer_classes): ast = "--ast-compact-json" if args.legacy_ast: ast = "--ast-json" + if args.checklist: + args.show_ignored_findings = True + slither = Slither(target, ast_format=ast, **vars(args)) return _process(slither, detector_classes, printer_classes) @@ -462,7 +465,7 @@ def parse_args(detector_classes, printer_classes): # pylint: disable=too-many-s help="Provide a config file (default: slither.config.json)", action="store", dest="config_file", - default="slither.config.json", + default=None, ) group_misc.add_argument( diff --git a/slither/analyses/data_dependency/data_dependency.py b/slither/analyses/data_dependency/data_dependency.py index 46d5add39..20ae3de61 100644 --- a/slither/analyses/data_dependency/data_dependency.py +++ b/slither/analyses/data_dependency/data_dependency.py @@ -14,8 +14,9 @@ from slither.core.declarations import ( Structure, ) from slither.core.declarations.solidity_import_placeholder import SolidityImportPlaceHolder +from slither.core.variables.top_level_variable import TopLevelVariable from slither.core.variables.variable import Variable -from slither.slithir.operations import Index, OperationWithLValue, InternalCall +from slither.slithir.operations import Index, OperationWithLValue, InternalCall, Operation from slither.slithir.variables import ( Constant, LocalIRVariable, @@ -38,10 +39,14 @@ if TYPE_CHECKING: ################################################################################### +Variable_types = Union[Variable, SolidityVariable] +Context_types = Union[Contract, Function] + + def is_dependent( - variable: Variable, - source: Variable, - context: Union[Contract, Function], + variable: Variable_types, + source: Variable_types, + context: Context_types, only_unprotected: bool = False, ) -> bool: """ @@ -69,9 +74,9 @@ def is_dependent( def is_dependent_ssa( - variable: Variable, - source: Variable, - context: Union[Contract, Function], + variable: Variable_types, + source: Variable_types, + context: Context_types, only_unprotected: bool = False, ) -> bool: """ @@ -105,7 +110,12 @@ GENERIC_TAINT = { } -def is_tainted(variable, context, only_unprotected=False, ignore_generic_taint=False): +def is_tainted( + variable: Variable_types, + context: Context_types, + only_unprotected: bool = False, + ignore_generic_taint: bool = False, +) -> bool: """ Args: variable @@ -127,7 +137,12 @@ def is_tainted(variable, context, only_unprotected=False, ignore_generic_taint=F ) -def is_tainted_ssa(variable, context, only_unprotected=False, ignore_generic_taint=False): +def is_tainted_ssa( + variable: Variable_types, + context: Context_types, + only_unprotected: bool = False, + ignore_generic_taint: bool = False, +): """ Args: variable @@ -150,8 +165,8 @@ def is_tainted_ssa(variable, context, only_unprotected=False, ignore_generic_tai def get_dependencies( - variable: Variable, - context: Union[Contract, Function], + variable: Variable_types, + context: Context_types, only_unprotected: bool = False, ) -> Set[Variable]: """ @@ -170,7 +185,7 @@ def get_dependencies( def get_all_dependencies( - context: Union[Contract, Function], only_unprotected: bool = False + context: Context_types, only_unprotected: bool = False ) -> Dict[Variable, Set[Variable]]: """ Return the dictionary of dependencies. @@ -187,8 +202,8 @@ def get_all_dependencies( def get_dependencies_ssa( - variable: Variable, - context: Union[Contract, Function], + variable: Variable_types, + context: Context_types, only_unprotected: bool = False, ) -> Set[Variable]: """ @@ -207,7 +222,7 @@ def get_dependencies_ssa( def get_all_dependencies_ssa( - context: Union[Contract, Function], only_unprotected: bool = False + context: Context_types, only_unprotected: bool = False ) -> Dict[Variable, Set[Variable]]: """ Return the dictionary of dependencies. @@ -249,9 +264,9 @@ KEY_INPUT_SSA = "DATA_DEPENDENCY_INPUT_SSA" ################################################################################### -def pprint_dependency(context): +def pprint_dependency(caller_context: Context_types) -> None: print("#### SSA ####") - context = context.context + context = caller_context.context for k, values in context[KEY_SSA].items(): print("{} ({}):".format(k, id(k))) for v in values: @@ -272,7 +287,7 @@ def pprint_dependency(context): ################################################################################### -def compute_dependency(compilation_unit: "SlitherCompilationUnit"): +def compute_dependency(compilation_unit: "SlitherCompilationUnit") -> None: compilation_unit.context[KEY_INPUT] = set() compilation_unit.context[KEY_INPUT_SSA] = set() @@ -280,14 +295,16 @@ def compute_dependency(compilation_unit: "SlitherCompilationUnit"): compute_dependency_contract(contract, compilation_unit) -def compute_dependency_contract(contract, compilation_unit: "SlitherCompilationUnit"): +def compute_dependency_contract( + contract: Contract, compilation_unit: "SlitherCompilationUnit" +) -> None: if KEY_SSA in contract.context: return contract.context[KEY_SSA] = {} contract.context[KEY_SSA_UNPROTECTED] = {} - for function in contract.functions + contract.modifiers: + for function in contract.functions + list(contract.modifiers): compute_dependency_function(function) propagate_function(contract, function, KEY_SSA, KEY_NON_SSA) @@ -302,7 +319,9 @@ def compute_dependency_contract(contract, compilation_unit: "SlitherCompilationU propagate_contract(contract, KEY_SSA_UNPROTECTED, KEY_NON_SSA_UNPROTECTED) -def propagate_function(contract, function, context_key, context_key_non_ssa): +def propagate_function( + contract: Contract, function: Function, context_key: str, context_key_non_ssa: str +) -> None: transitive_close_dependencies(function, context_key, context_key_non_ssa) # Propage data dependency data_depencencies = function.context[context_key] @@ -313,7 +332,9 @@ def propagate_function(contract, function, context_key, context_key_non_ssa): contract.context[context_key][key].union(values) -def transitive_close_dependencies(context, context_key, context_key_non_ssa): +def transitive_close_dependencies( + context: Context_types, context_key: str, context_key_non_ssa: str +) -> None: # transitive closure changed = True keys = context.context[context_key].keys() @@ -336,11 +357,11 @@ def transitive_close_dependencies(context, context_key, context_key_non_ssa): context.context[context_key_non_ssa] = convert_to_non_ssa(context.context[context_key]) -def propagate_contract(contract, context_key, context_key_non_ssa): +def propagate_contract(contract: Contract, context_key: str, context_key_non_ssa: str) -> None: transitive_close_dependencies(contract, context_key, context_key_non_ssa) -def add_dependency(lvalue, function, ir, is_protected): +def add_dependency(lvalue: Variable, function: Function, ir: Operation, is_protected: bool) -> None: if not lvalue in function.context[KEY_SSA]: function.context[KEY_SSA][lvalue] = set() if not is_protected: @@ -361,7 +382,7 @@ def add_dependency(lvalue, function, ir, is_protected): ] -def compute_dependency_function(function): +def compute_dependency_function(function: Function) -> None: if KEY_SSA in function.context: return @@ -386,7 +407,7 @@ def compute_dependency_function(function): ) -def convert_variable_to_non_ssa(v): +def convert_variable_to_non_ssa(v: Variable_types) -> Variable_types: if isinstance( v, ( @@ -410,14 +431,17 @@ def convert_variable_to_non_ssa(v): Function, Type, SolidityImportPlaceHolder, + TopLevelVariable, ), ) return v -def convert_to_non_ssa(data_depencies): +def convert_to_non_ssa( + data_depencies: Dict[Variable_types, Set[Variable_types]] +) -> Dict[Variable_types, Set[Variable_types]]: # Need to create new set() as its changed during iteration - ret = {} + ret: Dict[Variable_types, Set[Variable_types]] = {} for (k, values) in data_depencies.items(): var = convert_variable_to_non_ssa(k) if not var in ret: diff --git a/slither/core/declarations/solidity_variables.py b/slither/core/declarations/solidity_variables.py index 9ce031499..225644cb3 100644 --- a/slither/core/declarations/solidity_variables.py +++ b/slither/core/declarations/solidity_variables.py @@ -71,6 +71,7 @@ SOLIDITY_FUNCTIONS: Dict[str, List[str]] = { "abi.encodeWithSelector()": ["bytes"], "abi.encodeWithSignature()": ["bytes"], "bytes.concat()": ["bytes"], + "string.concat()": ["string"], # abi.decode returns an a list arbitrary types "abi.decode()": [], "type(address)": [], diff --git a/slither/core/expressions/binary_operation.py b/slither/core/expressions/binary_operation.py index 51985250a..2c7d30607 100644 --- a/slither/core/expressions/binary_operation.py +++ b/slither/core/expressions/binary_operation.py @@ -40,8 +40,11 @@ class BinaryOperationType(Enum): GREATER_SIGNED = 22 RIGHT_SHIFT_ARITHMETIC = 23 + # pylint: disable=too-many-branches @staticmethod - def get_type(operation_type: "BinaryOperation"): # pylint: disable=too-many-branches + def get_type( + operation_type: "BinaryOperation", + ) -> "BinaryOperationType": if operation_type == "**": return BinaryOperationType.POWER if operation_type == "*": @@ -93,7 +96,7 @@ class BinaryOperationType(Enum): raise SlitherCoreError("get_type: Unknown operation type {})".format(operation_type)) - def __str__(self): # pylint: disable=too-many-branches + def __str__(self) -> str: # pylint: disable=too-many-branches if self == BinaryOperationType.POWER: return "**" if self == BinaryOperationType.MULTIPLICATION: @@ -146,7 +149,12 @@ class BinaryOperationType(Enum): class BinaryOperation(ExpressionTyped): - def __init__(self, left_expression, right_expression, expression_type): + def __init__( + self, + left_expression: Expression, + right_expression: Expression, + expression_type: BinaryOperationType, + ) -> None: assert isinstance(left_expression, Expression) assert isinstance(right_expression, Expression) super().__init__() @@ -169,5 +177,5 @@ class BinaryOperation(ExpressionTyped): def type(self) -> BinaryOperationType: return self._type - def __str__(self): + def __str__(self) -> str: return str(self.expression_left) + " " + str(self.type) + " " + str(self.expression_right) diff --git a/slither/core/expressions/expression.py b/slither/core/expressions/expression.py index 5063bad17..5719f3443 100644 --- a/slither/core/expressions/expression.py +++ b/slither/core/expressions/expression.py @@ -2,7 +2,7 @@ from slither.core.source_mapping.source_mapping import SourceMapping class Expression(SourceMapping): - def __init__(self): + def __init__(self) -> None: super().__init__() self._is_lvalue = False diff --git a/slither/core/expressions/expression_typed.py b/slither/core/expressions/expression_typed.py index 5ff6cb832..2bf3fe39d 100644 --- a/slither/core/expressions/expression_typed.py +++ b/slither/core/expressions/expression_typed.py @@ -7,7 +7,7 @@ if TYPE_CHECKING: class ExpressionTyped(Expression): # pylint: disable=too-few-public-methods - def __init__(self): + def __init__(self) -> None: super().__init__() self._type: Optional["Type"] = None diff --git a/slither/core/scope/scope.py b/slither/core/scope/scope.py index 95b78a827..7414502b3 100644 --- a/slither/core/scope/scope.py +++ b/slither/core/scope/scope.py @@ -6,6 +6,7 @@ from slither.core.declarations.custom_error_top_level import CustomErrorTopLevel from slither.core.declarations.enum_top_level import EnumTopLevel from slither.core.declarations.function_top_level import FunctionTopLevel from slither.core.declarations.structure_top_level import StructureTopLevel +from slither.core.variables.top_level_variable import TopLevelVariable from slither.slithir.variables import Constant @@ -36,6 +37,7 @@ class FileScope: self.imports: Set[Import] = set() self.pragmas: Set[Pragma] = set() self.structures: Dict[str, StructureTopLevel] = {} + self.variables: Dict[str, TopLevelVariable] = {} def add_accesible_scopes(self) -> bool: """ @@ -69,6 +71,9 @@ class FileScope: if not _dict_contain(new_scope.structures, self.structures): self.structures.update(new_scope.structures) learn_something = True + if not _dict_contain(new_scope.variables, self.variables): + self.variables.update(new_scope.variables) + learn_something = True return learn_something diff --git a/slither/core/variables/top_level_variable.py b/slither/core/variables/top_level_variable.py index 705936261..6d821092e 100644 --- a/slither/core/variables/top_level_variable.py +++ b/slither/core/variables/top_level_variable.py @@ -5,12 +5,14 @@ from slither.core.variables.variable import Variable if TYPE_CHECKING: from slither.core.cfg.node import Node + from slither.core.scope.scope import FileScope class TopLevelVariable(TopLevel, Variable): - def __init__(self): + def __init__(self, scope: "FileScope"): super().__init__() self._node_initialization: Optional["Node"] = None + self.file_scope = scope # endregion ################################################################################### diff --git a/slither/detectors/abstract_detector.py b/slither/detectors/abstract_detector.py index c01a43c22..f2ba734db 100644 --- a/slither/detectors/abstract_detector.py +++ b/slither/detectors/abstract_detector.py @@ -208,6 +208,8 @@ class AbstractDetector(metaclass=abc.ABCMeta): return [r for (idx, r) in enumerate(results) if idx not in indexes_converted] except ValueError: self.logger.error(yellow("Malformed input. Example of valid input: 0,1,2,3")) + results = sorted(results, key=lambda x: x["id"]) + return results @property diff --git a/slither/detectors/functions/dead_code.py b/slither/detectors/functions/dead_code.py index 1d5fe05e8..5d632b9f9 100644 --- a/slither/detectors/functions/dead_code.py +++ b/slither/detectors/functions/dead_code.py @@ -68,6 +68,9 @@ contract Contract{ function.contract_declarer.is_from_dependency() ): continue + # Continue if the functon is not implemented because it means the contract is abstract + if not function.is_implemented: + continue info = [function, " is never used and should be removed\n"] res = self.generate_result(info) results.append(res) diff --git a/slither/detectors/operations/missing_zero_address_validation.py b/slither/detectors/operations/missing_zero_address_validation.py index b1ef99225..cb6bf7cdb 100644 --- a/slither/detectors/operations/missing_zero_address_validation.py +++ b/slither/detectors/operations/missing_zero_address_validation.py @@ -40,7 +40,7 @@ contract C { } } ``` -Bob calls `updateOwner` without specifying the `newOwner`, soBob loses ownership of the contract. +Bob calls `updateOwner` without specifying the `newOwner`, so Bob loses ownership of the contract. """ # endregion wiki_exploit_scenario diff --git a/slither/detectors/reentrancy/reentrancy.py b/slither/detectors/reentrancy/reentrancy.py index 94be2b243..b51c9fad8 100644 --- a/slither/detectors/reentrancy/reentrancy.py +++ b/slither/detectors/reentrancy/reentrancy.py @@ -283,11 +283,12 @@ class Reentrancy(AbstractDetector): def detect_reentrancy(self, contract): for function in contract.functions_and_modifiers_declared: - if function.is_implemented: - if self.KEY in function.context: - continue - self._explore(function.entry_point, []) - function.context[self.KEY] = True + if not function.is_constructor: + if function.is_implemented: + if self.KEY in function.context: + continue + self._explore(function.entry_point, []) + function.context[self.KEY] = True def _detect(self): """""" diff --git a/slither/detectors/statements/unprotected_upgradeable.py b/slither/detectors/statements/unprotected_upgradeable.py index 6bc65b488..a32ea3308 100644 --- a/slither/detectors/statements/unprotected_upgradeable.py +++ b/slither/detectors/statements/unprotected_upgradeable.py @@ -21,6 +21,14 @@ def _can_be_destroyed(contract) -> List[Function]: return targets +def _has_initializer_modifier(functions: List[Function]) -> bool: + for f in functions: + for m in f.modifiers: + if m.name == "initializer": + return True + return False + + class UnprotectedUpgradeable(AbstractDetector): ARGUMENT = "unprotected-upgrade" @@ -61,34 +69,38 @@ class UnprotectedUpgradeable(AbstractDetector): for contract in self.compilation_unit.contracts_derived: if contract.is_upgradeable: - functions_that_can_destroy = _can_be_destroyed(contract) - if functions_that_can_destroy: - initiliaze_functions = [f for f in contract.functions if f.name == "initialize"] - vars_init_ = [ - init.all_state_variables_written() for init in initiliaze_functions - ] - vars_init = [item for sublist in vars_init_ for item in sublist] - - vars_init_in_constructors_ = [ - f.all_state_variables_written() for f in contract.constructors - ] - vars_init_in_constructors = [ - item for sublist in vars_init_in_constructors_ for item in sublist - ] - if vars_init and (set(vars_init) - set(vars_init_in_constructors)): - info = ( - [ - contract, - " is an upgradeable contract that does not protect its initiliaze functions: ", - ] - + initiliaze_functions - + [ - ". Anyone can delete the contract with: ", - ] - + functions_that_can_destroy - ) - - res = self.generate_result(info) - results.append(res) + if not _has_initializer_modifier(contract.constructors): + functions_that_can_destroy = _can_be_destroyed(contract) + if functions_that_can_destroy: + initiliaze_functions = [ + f for f in contract.functions if f.name == "initialize" + ] + + vars_init_ = [ + init.all_state_variables_written() for init in initiliaze_functions + ] + vars_init = [item for sublist in vars_init_ for item in sublist] + + vars_init_in_constructors_ = [ + f.all_state_variables_written() for f in contract.constructors + ] + vars_init_in_constructors = [ + item for sublist in vars_init_in_constructors_ for item in sublist + ] + if vars_init and (set(vars_init) - set(vars_init_in_constructors)): + info = ( + [ + contract, + " is an upgradeable contract that does not protect its initiliaze functions: ", + ] + + initiliaze_functions + + [ + ". Anyone can delete the contract with: ", + ] + + functions_that_can_destroy + ) + + res = self.generate_result(info) + results.append(res) return results diff --git a/slither/printers/abstract_printer.py b/slither/printers/abstract_printer.py index f58f92f91..5d0a9f494 100644 --- a/slither/printers/abstract_printer.py +++ b/slither/printers/abstract_printer.py @@ -1,6 +1,13 @@ import abc +from logging import Logger + +from typing import TYPE_CHECKING, Union, List, Optional, Dict from slither.utils import output +from slither.utils.output import SupportedOutput + +if TYPE_CHECKING: + from slither import Slither class IncorrectPrinterInitialization(Exception): @@ -13,7 +20,7 @@ class AbstractPrinter(metaclass=abc.ABCMeta): WIKI = "" - def __init__(self, slither, logger): + def __init__(self, slither: "Slither", logger: Logger) -> None: self.slither = slither self.contracts = slither.contracts self.filename = slither.filename @@ -34,11 +41,15 @@ class AbstractPrinter(metaclass=abc.ABCMeta): f"WIKI is not initialized {self.__class__.__name__}" ) - def info(self, info): + def info(self, info: str) -> None: if self.logger: self.logger.info(info) - def generate_output(self, info, additional_fields=None): + def generate_output( + self, + info: Union[str, List[Union[str, SupportedOutput]]], + additional_fields: Optional[Dict] = None, + ) -> output.Output: if additional_fields is None: additional_fields = {} printer_output = output.Output(info, additional_fields) @@ -47,6 +58,5 @@ class AbstractPrinter(metaclass=abc.ABCMeta): return printer_output @abc.abstractmethod - def output(self, filename): - """TODO Documentation""" - return + def output(self, filename: str) -> output.Output: + pass diff --git a/slither/printers/guidance/echidna.py b/slither/printers/guidance/echidna.py index 1aec81e42..5debfaef1 100644 --- a/slither/printers/guidance/echidna.py +++ b/slither/printers/guidance/echidna.py @@ -391,6 +391,7 @@ class Echidna(AbstractPrinter): "have_external_calls": external_calls, "call_a_parameter": call_parameters, "use_balance": use_balance, + "solc_versions": [unit.solc_version for unit in self.slither.compilation_units], } self.info(json.dumps(d, indent=4)) diff --git a/slither/printers/summary/modifier_calls.py b/slither/printers/summary/modifier_calls.py index b818272df..7495146ab 100644 --- a/slither/printers/summary/modifier_calls.py +++ b/slither/printers/summary/modifier_calls.py @@ -38,6 +38,8 @@ class Modifiers(AbstractPrinter): table.add_row([function.name, [m.name for m in set(modifiers)]]) txt += "\n" + str(table) self.info(txt) + all_txt += txt + all_tables.append((contract.name, table)) res = self.generate_output(all_txt) for name, table in all_tables: diff --git a/slither/slithir/convert.py b/slither/slithir/convert.py index a1ebef063..91c7394e9 100644 --- a/slither/slithir/convert.py +++ b/slither/slithir/convert.py @@ -944,6 +944,18 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]): # pylint: dis s.set_expression(ins.expression) return s + if ins.ori.variable_left == ElementaryType("string") and ins.ori.variable_right == Constant( + "concat" + ): + s = SolidityCall( + SolidityFunction("string.concat()"), + ins.nbr_arguments, + ins.lvalue, + ins.type_call, + ) + s.set_expression(ins.expression) + return s + msgcall = HighLevelCall( ins.ori.variable_left, ins.ori.variable_right, diff --git a/slither/slithir/operations/member.py b/slither/slithir/operations/member.py index c835f58e0..7dca0cf79 100644 --- a/slither/slithir/operations/member.py +++ b/slither/slithir/operations/member.py @@ -22,7 +22,7 @@ class Member(OperationWithLValue): # f.h(1); # } # } - # Can be an ElementaryType because of bytes.concat + # Can be an ElementaryType because of bytes.concat, string.concat assert is_valid_rvalue(variable_left) or isinstance( variable_left, (Contract, Enum, Function, CustomError, SolidityImportPlaceHolder, ElementaryType), diff --git a/slither/slithir/utils/ssa.py b/slither/slithir/utils/ssa.py index a6499f362..ff391b748 100644 --- a/slither/slithir/utils/ssa.py +++ b/slither/slithir/utils/ssa.py @@ -13,6 +13,7 @@ from slither.core.declarations.solidity_import_placeholder import SolidityImport from slither.core.solidity_types.type import Type from slither.core.variables.local_variable import LocalVariable from slither.core.variables.state_variable import StateVariable +from slither.core.variables.top_level_variable import TopLevelVariable from slither.slithir.operations import ( Assignment, Binary, @@ -617,6 +618,7 @@ def get( Function, Type, SolidityImportPlaceHolder, + TopLevelVariable, ), ) # type for abi.decode(.., t) return variable diff --git a/slither/slithir/utils/utils.py b/slither/slithir/utils/utils.py index 796bb822c..7bebc0a80 100644 --- a/slither/slithir/utils/utils.py +++ b/slither/slithir/utils/utils.py @@ -2,6 +2,7 @@ from slither.core.variables.local_variable import LocalVariable from slither.core.variables.state_variable import StateVariable from slither.core.declarations.solidity_variables import SolidityVariable +from slither.core.variables.top_level_variable import TopLevelVariable from slither.slithir.variables.temporary import TemporaryVariable from slither.slithir.variables.constant import Constant @@ -15,6 +16,7 @@ def is_valid_rvalue(v): ( StateVariable, LocalVariable, + TopLevelVariable, TemporaryVariable, Constant, SolidityVariable, diff --git a/slither/solc_parsing/expressions/find_variable.py b/slither/solc_parsing/expressions/find_variable.py index aae53f1ec..8cd5c03b5 100644 --- a/slither/solc_parsing/expressions/find_variable.py +++ b/slither/solc_parsing/expressions/find_variable.py @@ -19,6 +19,7 @@ from slither.core.solidity_types import ( FunctionType, MappingType, ) +from slither.core.variables.top_level_variable import TopLevelVariable from slither.core.variables.variable import Variable from slither.exceptions import SlitherError from slither.solc_parsing.declarations.caller_context import CallerContextExpression @@ -98,7 +99,9 @@ def _find_variable_in_function_parser( def _find_top_level( var_name: str, scope: "FileScope" -) -> Tuple[Optional[Union[Enum, Structure, SolidityImportPlaceHolder, CustomError]], bool]: +) -> Tuple[ + Optional[Union[Enum, Structure, SolidityImportPlaceHolder, CustomError, TopLevelVariable]], bool +]: """ Return the top level variable use, and a boolean indicating if the variable returning was cretead If the variable was created, it has no source_mapping @@ -126,6 +129,9 @@ def _find_top_level( if custom_error.solidity_signature == var_name: return custom_error, False + if var_name in scope.variables: + return scope.variables[var_name], False + return None, False @@ -210,6 +216,8 @@ def _find_variable_init( ) -> Tuple[List[Contract], List["Function"], FileScope,]: from slither.solc_parsing.declarations.contract import ContractSolc from slither.solc_parsing.declarations.function import FunctionSolc + from slither.solc_parsing.declarations.structure_top_level import StructureTopLevelSolc + from slither.solc_parsing.variables.top_level_variable import TopLevelVariableSolc direct_contracts: List[Contract] direct_functions_parser: List[Function] @@ -244,6 +252,14 @@ def _find_variable_init( else: assert isinstance(underlying_function, FunctionContract) scope = underlying_function.contract.file_scope + elif isinstance(caller_context, StructureTopLevelSolc): + direct_contracts = [] + direct_functions_parser = [] + scope = caller_context.underlying_structure.file_scope + elif isinstance(caller_context, TopLevelVariableSolc): + direct_contracts = [] + direct_functions_parser = [] + scope = caller_context.underlying_variable.file_scope else: raise SlitherError( f"{type(caller_context)} ({caller_context} is not valid for find_variable" diff --git a/slither/solc_parsing/slither_compilation_unit_solc.py b/slither/solc_parsing/slither_compilation_unit_solc.py index ffc201714..5e6a937f0 100644 --- a/slither/solc_parsing/slither_compilation_unit_solc.py +++ b/slither/solc_parsing/slither_compilation_unit_solc.py @@ -239,12 +239,13 @@ class SlitherCompilationUnitSolc: self._parse_enum(top_level_data, filename) elif top_level_data[self.get_key()] == "VariableDeclaration": - var = TopLevelVariable() - var_parser = TopLevelVariableSolc(var, top_level_data) + var = TopLevelVariable(scope) + var_parser = TopLevelVariableSolc(var, top_level_data, self) var.set_offset(top_level_data["src"], self._compilation_unit) self._compilation_unit.variables_top_level.append(var) self._variables_top_level_parser.append(var_parser) + scope.variables[var.name] = var elif top_level_data[self.get_key()] == "FunctionDefinition": scope = self.compilation_unit.get_scope(filename) func = FunctionTopLevel(self._compilation_unit, scope) @@ -495,6 +496,7 @@ Please rename it, this name is reserved for Slither's internals""" for lib in libraries: self._analyze_struct_events(lib) + self._analyze_top_level_variables() self._analyze_top_level_structures() # Start with the contracts without inheritance @@ -580,9 +582,9 @@ Please rename it, this name is reserved for Slither's internals""" def _analyze_top_level_variables(self): try: for var in self._variables_top_level_parser: - var.analyze(self) + var.analyze(var) except (VariableNotFound, KeyError) as e: - raise SlitherException(f"Missing struct {e} during top level structure analyze") from e + raise SlitherException(f"Missing {e} during variable analyze") from e def _analyze_params_top_level_function(self): for func_parser in self._functions_top_level_parser: diff --git a/slither/solc_parsing/solidity_types/type_parsing.py b/slither/solc_parsing/solidity_types/type_parsing.py index 1d9b075b1..118b97ce3 100644 --- a/slither/solc_parsing/solidity_types/type_parsing.py +++ b/slither/solc_parsing/solidity_types/type_parsing.py @@ -220,6 +220,7 @@ def parse_type( from slither.solc_parsing.declarations.custom_error import CustomErrorSolc from slither.solc_parsing.declarations.structure_top_level import StructureTopLevelSolc from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc + from slither.solc_parsing.variables.top_level_variable import TopLevelVariableSolc sl: "SlitherCompilationUnit" # Note: for convenicence top level functions use the same parser than function in contract @@ -245,9 +246,11 @@ def parse_type( all_enums += enums_direct_access contracts = sl.contracts functions = [] - elif isinstance(caller_context, (StructureTopLevelSolc, CustomErrorSolc)): + elif isinstance(caller_context, (StructureTopLevelSolc, CustomErrorSolc, TopLevelVariableSolc)): if isinstance(caller_context, StructureTopLevelSolc): scope = caller_context.underlying_structure.file_scope + elif isinstance(caller_context, TopLevelVariableSolc): + scope = caller_context.underlying_variable.file_scope else: assert isinstance(caller_context, CustomErrorSolc) custom_error = caller_context.underlying_custom_error @@ -258,8 +261,10 @@ def parse_type( scope = custom_error.contract.file_scope next_context = caller_context.slither_parser - structures_direct_access = [] - all_structures = scope.structures.values() + structures_direct_access = list(scope.structures.values()) + all_structuress = [c.structures for c in scope.contracts.values()] + all_structures = [item for sublist in all_structuress for item in sublist] + all_structures += structures_direct_access enums_direct_access = [] all_enums = scope.enums.values() contracts = scope.contracts.values() diff --git a/slither/solc_parsing/variables/top_level_variable.py b/slither/solc_parsing/variables/top_level_variable.py index 328d2baae..6c24c3bdf 100644 --- a/slither/solc_parsing/variables/top_level_variable.py +++ b/slither/solc_parsing/variables/top_level_variable.py @@ -1,12 +1,38 @@ -from typing import Dict +from typing import Dict, TYPE_CHECKING from slither.core.variables.top_level_variable import TopLevelVariable from slither.solc_parsing.variables.variable_declaration import VariableDeclarationSolc +from slither.solc_parsing.declarations.caller_context import CallerContextExpression +if TYPE_CHECKING: + from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc + from slither.core.compilation_unit import SlitherCompilationUnit -class TopLevelVariableSolc(VariableDeclarationSolc): - def __init__(self, variable: TopLevelVariable, variable_data: Dict): + +class TopLevelVariableSolc(VariableDeclarationSolc, CallerContextExpression): + def __init__( + self, + variable: TopLevelVariable, + variable_data: Dict, + slither_parser: "SlitherCompilationUnitSolc", + ): super().__init__(variable, variable_data) + self._slither_parser = slither_parser + + @property + def is_compact_ast(self) -> bool: + return self._slither_parser.is_compact_ast + + @property + def compilation_unit(self) -> "SlitherCompilationUnit": + return self._slither_parser.compilation_unit + + def get_key(self) -> str: + return self._slither_parser.get_key() + + @property + def slither_parser(self) -> "SlitherCompilationUnitSolc": + return self._slither_parser @property def underlying_variable(self) -> TopLevelVariable: diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py index 7f31399c5..37a51d181 100644 --- a/slither/solc_parsing/yul/parse_yul.py +++ b/slither/solc_parsing/yul/parse_yul.py @@ -730,6 +730,39 @@ def _check_for_state_variable_name(root: YulScope, potential_name: str) -> Optio return None +def _parse_yul_magic_suffixes(name: str, root: YulScope) -> Optional[Expression]: + # check for magic suffixes + # TODO: the following leads to wrong IR + # Currently SlithIR doesnt support raw access to memory + # So things like .offset/.slot will return the variable + # Instaed of the actual offset/slot + if name.endswith("_slot") or name.endswith(".slot"): + potential_name = name[:-5] + variable_found = _check_for_state_variable_name(root, potential_name) + if variable_found: + return variable_found + var = root.function.get_local_variable_from_name(potential_name) + if var and var.is_storage: + return Identifier(var) + if name.endswith("_offset") or name.endswith(".offset"): + potential_name = name[:-7] + variable_found = _check_for_state_variable_name(root, potential_name) + if variable_found: + return variable_found + var = root.function.get_local_variable_from_name(potential_name) + if var and var.location == "calldata": + return Identifier(var) + if name.endswith(".length"): + # TODO: length should create a new IP operation LENGTH var + # The code below is an hotfix to allow slither to process length in yul + # Until we have a better support + potential_name = name[:-7] + var = root.function.get_local_variable_from_name(potential_name) + if var and var.location == "calldata": + return Identifier(var) + return None + + def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[Expression]: name = ast["name"] @@ -759,20 +792,9 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[ if func: return Identifier(func.underlying) - # check for magic suffixes - if name.endswith("_slot") or name.endswith(".slot"): - potential_name = name[:-5] - variable_found = _check_for_state_variable_name(root, potential_name) - if variable_found: - return variable_found - var = root.function.get_local_variable_from_name(potential_name) - if var and var.is_storage: - return Identifier(var) - if name.endswith("_offset") or name.endswith(".offset"): - potential_name = name[:-7] - variable_found = _check_for_state_variable_name(root, potential_name) - if variable_found: - return variable_found + magic_suffix = _parse_yul_magic_suffixes(name, root) + if magic_suffix: + return magic_suffix raise SlitherException(f"unresolved reference to identifier {name}") diff --git a/slither/tools/properties/properties/erc20.py b/slither/tools/properties/properties/erc20.py index 537cf3547..3dfbf2e2e 100644 --- a/slither/tools/properties/properties/erc20.py +++ b/slither/tools/properties/properties/erc20.py @@ -78,6 +78,7 @@ def generate_erc20( if contract.compilation_unit.core.crytic_compile.type not in [ PlatformType.TRUFFLE, PlatformType.SOLC, + PlatformType.BUILDER, ]: logging.error( f"{contract.compilation_unit.core.crytic_compile.type} not yet supported by slither-prop" @@ -162,7 +163,7 @@ def _initialization_recommendation(type_property: str) -> str: # TODO: move this to crytic-compile def _platform_to_output_dir(platform: AbstractPlatform) -> Path: - if platform.TYPE == PlatformType.TRUFFLE: + if platform.TYPE in [PlatformType.TRUFFLE, platform.TYPE == PlatformType.BUILDER]: return Path(platform.target, "contracts", "crytic") if platform.TYPE == PlatformType.SOLC: return Path(platform.target).parent diff --git a/slither/utils/command_line.py b/slither/utils/command_line.py index 39ab82820..c6ab83bfa 100644 --- a/slither/utils/command_line.py +++ b/slither/utils/command_line.py @@ -52,6 +52,15 @@ defaults_flag_in_config = { def read_config_file(args): + # No config file was provided as an argument + if args.config_file is None: + # Check wether the default config file is present + if os.path.exists("slither.config.json"): + # The default file exists, use it + args.config_file = "slither.config.json" + else: + return + if os.path.isfile(args.config_file): try: with open(args.config_file, encoding="utf8") as f: @@ -70,6 +79,9 @@ def read_config_file(args): logger.error( red("Impossible to read {}, please check the file {}".format(args.config_file, e)) ) + else: + logger.error(red("File {} is not a file or does not exist".format(args.config_file))) + logger.error(yellow("Falling back to the default settings...")) def output_to_markdown(detector_classes, printer_classes, filter_wiki): diff --git a/tests/ast-parsing/compile/assembly-0.8.12-compact.zip b/tests/ast-parsing/compile/assembly-0.8.12-compact.zip new file mode 100644 index 000000000..9b1d796c6 Binary files /dev/null and b/tests/ast-parsing/compile/assembly-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/assignment-0.8.12-compact.zip b/tests/ast-parsing/compile/assignment-0.8.12-compact.zip new file mode 100644 index 000000000..4fab453b5 Binary files /dev/null and b/tests/ast-parsing/compile/assignment-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/binaryoperation-0.8.12-compact.zip b/tests/ast-parsing/compile/binaryoperation-0.8.12-compact.zip new file mode 100644 index 000000000..50bfdc97f Binary files /dev/null and b/tests/ast-parsing/compile/binaryoperation-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/break-0.8.12-compact.zip b/tests/ast-parsing/compile/break-0.8.12-compact.zip new file mode 100644 index 000000000..15b530f44 Binary files /dev/null and b/tests/ast-parsing/compile/break-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/call_to_variable-0.8.12-compact.zip b/tests/ast-parsing/compile/call_to_variable-0.8.12-compact.zip new file mode 100644 index 000000000..54e645a56 Binary files /dev/null and b/tests/ast-parsing/compile/call_to_variable-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/comment-0.8.12-compact.zip b/tests/ast-parsing/compile/comment-0.8.12-compact.zip new file mode 100644 index 000000000..01365c063 Binary files /dev/null and b/tests/ast-parsing/compile/comment-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/conditional-0.8.12-compact.zip b/tests/ast-parsing/compile/conditional-0.8.12-compact.zip new file mode 100644 index 000000000..04664717f Binary files /dev/null and b/tests/ast-parsing/compile/conditional-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/continue-0.8.12-compact.zip b/tests/ast-parsing/compile/continue-0.8.12-compact.zip new file mode 100644 index 000000000..60ed8aa36 Binary files /dev/null and b/tests/ast-parsing/compile/continue-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/contract-0.8.12-compact.zip b/tests/ast-parsing/compile/contract-0.8.12-compact.zip new file mode 100644 index 000000000..b1bb2cce0 Binary files /dev/null and b/tests/ast-parsing/compile/contract-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/custom_error-0.8.12-compact.zip b/tests/ast-parsing/compile/custom_error-0.8.12-compact.zip new file mode 100644 index 000000000..72d828a05 Binary files /dev/null and b/tests/ast-parsing/compile/custom_error-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/dowhile-0.8.12-compact.zip b/tests/ast-parsing/compile/dowhile-0.8.12-compact.zip new file mode 100644 index 000000000..19589923a Binary files /dev/null and b/tests/ast-parsing/compile/dowhile-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/emit-0.8.12-compact.zip b/tests/ast-parsing/compile/emit-0.8.12-compact.zip new file mode 100644 index 000000000..d9635a341 Binary files /dev/null and b/tests/ast-parsing/compile/emit-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/enum-0.8.12-compact.zip b/tests/ast-parsing/compile/enum-0.8.12-compact.zip new file mode 100644 index 000000000..f1de93596 Binary files /dev/null and b/tests/ast-parsing/compile/enum-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/event-0.8.12-compact.zip b/tests/ast-parsing/compile/event-0.8.12-compact.zip new file mode 100644 index 000000000..2635bddd3 Binary files /dev/null and b/tests/ast-parsing/compile/event-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/for-0.8.12-compact.zip b/tests/ast-parsing/compile/for-0.8.12-compact.zip new file mode 100644 index 000000000..df08ad6f0 Binary files /dev/null and b/tests/ast-parsing/compile/for-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/function-0.8.12-compact.zip b/tests/ast-parsing/compile/function-0.8.12-compact.zip new file mode 100644 index 000000000..1c07659fe Binary files /dev/null and b/tests/ast-parsing/compile/function-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/functioncall-0.8.12-compact.zip b/tests/ast-parsing/compile/functioncall-0.8.12-compact.zip new file mode 100644 index 000000000..1feddc203 Binary files /dev/null and b/tests/ast-parsing/compile/functioncall-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/if-0.8.12-compact.zip b/tests/ast-parsing/compile/if-0.8.12-compact.zip new file mode 100644 index 000000000..02799855e Binary files /dev/null and b/tests/ast-parsing/compile/if-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.0-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.0-legacy.zip new file mode 100644 index 000000000..070c819da Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.1-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.1-legacy.zip new file mode 100644 index 000000000..e008aae24 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.10-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.10-legacy.zip new file mode 100644 index 000000000..517b7b5b5 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.11-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.11-legacy.zip new file mode 100644 index 000000000..79879e88a Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.12-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.12-compact.zip new file mode 100644 index 000000000..515b55c97 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.12-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.12-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.12-legacy.zip new file mode 100644 index 000000000..483481b31 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.13-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.13-compact.zip new file mode 100644 index 000000000..c7d6232e5 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.13-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.13-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.13-legacy.zip new file mode 100644 index 000000000..dd12be10e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.14-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.14-compact.zip new file mode 100644 index 000000000..6d61134a6 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.14-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.14-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.14-legacy.zip new file mode 100644 index 000000000..d8767f1bc Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.15-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.15-compact.zip new file mode 100644 index 000000000..6e123d876 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.15-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.15-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.15-legacy.zip new file mode 100644 index 000000000..0df5adec5 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.16-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.16-compact.zip new file mode 100644 index 000000000..4db4d9ca7 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.16-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.16-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.16-legacy.zip new file mode 100644 index 000000000..85216abb7 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.17-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.17-compact.zip new file mode 100644 index 000000000..305bb78f6 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.17-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.17-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.17-legacy.zip new file mode 100644 index 000000000..0f31dd2ea Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.18-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.18-compact.zip new file mode 100644 index 000000000..3e1c1a846 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.18-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.18-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.18-legacy.zip new file mode 100644 index 000000000..5759a0a0a Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.18-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.19-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.19-compact.zip new file mode 100644 index 000000000..04883b0f1 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.19-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.19-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.19-legacy.zip new file mode 100644 index 000000000..468e6cbdf Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.19-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.2-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.2-legacy.zip new file mode 100644 index 000000000..162c1680f Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.20-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.20-compact.zip new file mode 100644 index 000000000..451e14f7f Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.20-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.20-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.20-legacy.zip new file mode 100644 index 000000000..412c8e662 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.20-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.21-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.21-compact.zip new file mode 100644 index 000000000..b79701e0d Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.21-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.21-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.21-legacy.zip new file mode 100644 index 000000000..8f343e641 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.21-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.22-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.22-compact.zip new file mode 100644 index 000000000..4506d44af Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.22-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.22-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.22-legacy.zip new file mode 100644 index 000000000..1e81284d9 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.22-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.23-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.23-compact.zip new file mode 100644 index 000000000..63ee824c1 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.23-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.23-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.23-legacy.zip new file mode 100644 index 000000000..cc068e5d2 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.23-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.24-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.24-compact.zip new file mode 100644 index 000000000..d94a360ac Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.24-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.24-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.24-legacy.zip new file mode 100644 index 000000000..edad214ba Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.24-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.25-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.25-compact.zip new file mode 100644 index 000000000..290b46e5d Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.25-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.25-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.25-legacy.zip new file mode 100644 index 000000000..507589652 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.25-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.26-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.26-compact.zip new file mode 100644 index 000000000..e597ff002 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.26-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.26-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.26-legacy.zip new file mode 100644 index 000000000..0fab33f87 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.26-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.3-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.3-legacy.zip new file mode 100644 index 000000000..b782d111b Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.4-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.4-legacy.zip new file mode 100644 index 000000000..3e53c994e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.5-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.5-legacy.zip new file mode 100644 index 000000000..238e6ab31 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.6-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.6-legacy.zip new file mode 100644 index 000000000..09148422f Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.7-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.7-legacy.zip new file mode 100644 index 000000000..5c7fdae66 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.8-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.8-legacy.zip new file mode 100644 index 000000000..21f47055c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.9-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.9-legacy.zip new file mode 100644 index 000000000..d10fd083c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.4.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.0-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.0-compact.zip new file mode 100644 index 000000000..8bde5b338 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.0-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.0-legacy.zip new file mode 100644 index 000000000..a6ada3fab Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.1-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.1-compact.zip new file mode 100644 index 000000000..16403d5ae Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.1-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.1-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.1-legacy.zip new file mode 100644 index 000000000..80f9e3d5b Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.10-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.10-compact.zip new file mode 100644 index 000000000..1a126ac15 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.10-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.10-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.10-legacy.zip new file mode 100644 index 000000000..af7b12091 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.11-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.11-compact.zip new file mode 100644 index 000000000..1426058ee Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.11-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.11-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.11-legacy.zip new file mode 100644 index 000000000..d7b74badd Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.12-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.12-compact.zip new file mode 100644 index 000000000..1b823da92 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.12-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.12-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.12-legacy.zip new file mode 100644 index 000000000..dd5071879 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.13-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.13-compact.zip new file mode 100644 index 000000000..69b8d5876 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.13-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.13-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.13-legacy.zip new file mode 100644 index 000000000..023892907 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.14-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.14-compact.zip new file mode 100644 index 000000000..7117981c9 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.14-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.14-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.14-legacy.zip new file mode 100644 index 000000000..6bb86a71a Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.15-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.15-compact.zip new file mode 100644 index 000000000..a64107803 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.15-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.15-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.15-legacy.zip new file mode 100644 index 000000000..2580bd376 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.16-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.16-compact.zip new file mode 100644 index 000000000..2e2f117d4 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.16-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.16-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.16-legacy.zip new file mode 100644 index 000000000..24fe38738 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.17-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.17-compact.zip new file mode 100644 index 000000000..286a54fbd Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.17-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.17-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.17-legacy.zip new file mode 100644 index 000000000..1b7cef9b3 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.2-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.2-compact.zip new file mode 100644 index 000000000..95a9fd0a6 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.2-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.2-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.2-legacy.zip new file mode 100644 index 000000000..cc003264f Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.3-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.3-compact.zip new file mode 100644 index 000000000..54f877d49 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.3-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.3-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.3-legacy.zip new file mode 100644 index 000000000..5b8624355 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.4-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.4-compact.zip new file mode 100644 index 000000000..27cc59faf Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.4-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.4-legacy.zip new file mode 100644 index 000000000..b411b4a77 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.5-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.5-compact.zip new file mode 100644 index 000000000..f9ace02ad Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.5-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.5-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.5-legacy.zip new file mode 100644 index 000000000..74ce2e283 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.6-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.6-compact.zip new file mode 100644 index 000000000..775dc3f6e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.6-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.6-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.6-legacy.zip new file mode 100644 index 000000000..7ac6d8876 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.7-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.7-compact.zip new file mode 100644 index 000000000..78fa19e2c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.7-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.7-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.7-legacy.zip new file mode 100644 index 000000000..77feb11a5 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.8-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.8-compact.zip new file mode 100644 index 000000000..add248319 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.8-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.8-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.8-legacy.zip new file mode 100644 index 000000000..dfdcef6df Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.9-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.9-compact.zip new file mode 100644 index 000000000..927df59fd Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.9-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.9-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.9-legacy.zip new file mode 100644 index 000000000..514d534aa Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.5.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.0-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.0-compact.zip new file mode 100644 index 000000000..d6fda18fe Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.0-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.0-legacy.zip new file mode 100644 index 000000000..21e11d48e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.1-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.1-compact.zip new file mode 100644 index 000000000..aaf960704 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.1-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.1-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.1-legacy.zip new file mode 100644 index 000000000..920a90461 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.10-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.10-compact.zip new file mode 100644 index 000000000..817622352 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.10-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.10-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.10-legacy.zip new file mode 100644 index 000000000..db2814067 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.11-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.11-compact.zip new file mode 100644 index 000000000..51907140d Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.11-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.11-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.11-legacy.zip new file mode 100644 index 000000000..8e64221bb Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.12-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.12-compact.zip new file mode 100644 index 000000000..8fbf53e0e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.12-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.12-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.12-legacy.zip new file mode 100644 index 000000000..5923d6310 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.2-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.2-compact.zip new file mode 100644 index 000000000..07e8b850c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.2-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.2-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.2-legacy.zip new file mode 100644 index 000000000..dad5936e3 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.3-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.3-compact.zip new file mode 100644 index 000000000..ddada59ea Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.3-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.3-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.3-legacy.zip new file mode 100644 index 000000000..33419be42 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.4-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.4-compact.zip new file mode 100644 index 000000000..39fe1daf6 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.4-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.4-legacy.zip new file mode 100644 index 000000000..ed160439d Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.5-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.5-compact.zip new file mode 100644 index 000000000..d760eaaea Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.5-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.5-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.5-legacy.zip new file mode 100644 index 000000000..b98ff4b3c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.6-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.6-compact.zip new file mode 100644 index 000000000..6587e5ea1 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.6-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.6-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.6-legacy.zip new file mode 100644 index 000000000..a11abf418 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.7-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.7-compact.zip new file mode 100644 index 000000000..085eb5a9e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.7-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.7-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.7-legacy.zip new file mode 100644 index 000000000..d9fa8c77c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.8-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.8-compact.zip new file mode 100644 index 000000000..d295d4f01 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.8-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.8-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.8-legacy.zip new file mode 100644 index 000000000..2288dc67d Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.9-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.9-compact.zip new file mode 100644 index 000000000..6f436e3dd Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.9-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.9-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.9-legacy.zip new file mode 100644 index 000000000..6b21aec29 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.6.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.0-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.0-compact.zip new file mode 100644 index 000000000..07197161b Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.0-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.0-legacy.zip new file mode 100644 index 000000000..5fbd32f9d Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.1-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.1-compact.zip new file mode 100644 index 000000000..2a0dbb723 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.1-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.1-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.1-legacy.zip new file mode 100644 index 000000000..28f19862a Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.2-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.2-compact.zip new file mode 100644 index 000000000..683639490 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.2-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.2-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.2-legacy.zip new file mode 100644 index 000000000..0d74fdcce Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.3-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.3-compact.zip new file mode 100644 index 000000000..efa3c43f2 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.3-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.3-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.3-legacy.zip new file mode 100644 index 000000000..576eebe98 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.4-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.4-compact.zip new file mode 100644 index 000000000..25b8b213e Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.4-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.4-legacy.zip new file mode 100644 index 000000000..c6f816109 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.5-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.5-compact.zip new file mode 100644 index 000000000..8cf08c822 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.5-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.5-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.5-legacy.zip new file mode 100644 index 000000000..d00cc617b Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.6-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.6-compact.zip new file mode 100644 index 000000000..efd577c9c Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.6-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.6-legacy.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.6-legacy.zip new file mode 100644 index 000000000..c62b72a52 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.7.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.0-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.0-compact.zip new file mode 100644 index 000000000..50f1bf113 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.0-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.1-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.1-compact.zip new file mode 100644 index 000000000..9ce2d9563 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.1-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.10-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.10-compact.zip new file mode 100644 index 000000000..5c0cf4525 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.11-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.11-compact.zip new file mode 100644 index 000000000..8e9ae0667 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.12-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.12-compact.zip new file mode 100644 index 000000000..bb54c6d9b Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.2-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.2-compact.zip new file mode 100644 index 000000000..e2d264a78 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.2-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.3-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.3-compact.zip new file mode 100644 index 000000000..da73bcf96 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.3-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.4-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.4-compact.zip new file mode 100644 index 000000000..e031a33eb Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.4-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.5-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.5-compact.zip new file mode 100644 index 000000000..ac9bd86a1 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.5-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.6-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.6-compact.zip new file mode 100644 index 000000000..1e45ec721 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.6-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.7-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.7-compact.zip new file mode 100644 index 000000000..e0e13005b Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.7-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.8-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.8-compact.zip new file mode 100644 index 000000000..26943c1b1 Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.9-compact.zip b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.9-compact.zip new file mode 100644 index 000000000..7d5d4a15f Binary files /dev/null and b/tests/ast-parsing/compile/import_interface_with_struct_from_top_level-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/indexaccess-0.8.12-compact.zip b/tests/ast-parsing/compile/indexaccess-0.8.12-compact.zip new file mode 100644 index 000000000..128df9219 Binary files /dev/null and b/tests/ast-parsing/compile/indexaccess-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/indexrangeaccess-0.8.12-compact.zip b/tests/ast-parsing/compile/indexrangeaccess-0.8.12-compact.zip new file mode 100644 index 000000000..4599e5800 Binary files /dev/null and b/tests/ast-parsing/compile/indexrangeaccess-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/library_implicit_conversion-0.8.12-compact.zip b/tests/ast-parsing/compile/library_implicit_conversion-0.8.12-compact.zip new file mode 100644 index 000000000..a5dbfd5dd Binary files /dev/null and b/tests/ast-parsing/compile/library_implicit_conversion-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/literal-0.8.12-compact.zip b/tests/ast-parsing/compile/literal-0.8.12-compact.zip new file mode 100644 index 000000000..566a73418 Binary files /dev/null and b/tests/ast-parsing/compile/literal-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/memberaccess-0.8.12-compact.zip b/tests/ast-parsing/compile/memberaccess-0.8.12-compact.zip new file mode 100644 index 000000000..57fce1fa7 Binary files /dev/null and b/tests/ast-parsing/compile/memberaccess-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/minmax-0.8.12-compact.zip b/tests/ast-parsing/compile/minmax-0.8.12-compact.zip new file mode 100644 index 000000000..6ddaf5d3b Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/modifier-0.8.12-compact.zip b/tests/ast-parsing/compile/modifier-0.8.12-compact.zip new file mode 100644 index 000000000..2c3baf5e1 Binary files /dev/null and b/tests/ast-parsing/compile/modifier-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/newexpression-0.8.12-compact.zip b/tests/ast-parsing/compile/newexpression-0.8.12-compact.zip new file mode 100644 index 000000000..7a91ca856 Binary files /dev/null and b/tests/ast-parsing/compile/newexpression-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/pragma-0.8.12-compact.zip b/tests/ast-parsing/compile/pragma-0.8.12-compact.zip new file mode 100644 index 000000000..18ed76470 Binary files /dev/null and b/tests/ast-parsing/compile/pragma-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/push-0.8.12-compact.zip b/tests/ast-parsing/compile/push-0.8.12-compact.zip new file mode 100644 index 000000000..86fccc41c Binary files /dev/null and b/tests/ast-parsing/compile/push-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/return-0.8.12-compact.zip b/tests/ast-parsing/compile/return-0.8.12-compact.zip new file mode 100644 index 000000000..0e3a0d1cd Binary files /dev/null and b/tests/ast-parsing/compile/return-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/scope-0.8.12-compact.zip b/tests/ast-parsing/compile/scope-0.8.12-compact.zip new file mode 100644 index 000000000..0d44db69a Binary files /dev/null and b/tests/ast-parsing/compile/scope-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/struct-0.8.12-compact.zip b/tests/ast-parsing/compile/struct-0.8.12-compact.zip new file mode 100644 index 000000000..56e50b95f Binary files /dev/null and b/tests/ast-parsing/compile/struct-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/throw-0.8.12-compact.zip b/tests/ast-parsing/compile/throw-0.8.12-compact.zip new file mode 100644 index 000000000..cab7ccb43 Binary files /dev/null and b/tests/ast-parsing/compile/throw-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-0.8.12-compact.zip b/tests/ast-parsing/compile/top-level-0.8.12-compact.zip new file mode 100644 index 000000000..8c7ee6369 Binary files /dev/null and b/tests/ast-parsing/compile/top-level-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-0.8.12-compact.zip b/tests/ast-parsing/compile/top-level-import-0.8.12-compact.zip new file mode 100644 index 000000000..fd98c4c95 Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-import-bis-0.8.12-compact.zip b/tests/ast-parsing/compile/top-level-import-bis-0.8.12-compact.zip new file mode 100644 index 000000000..31d9a9c82 Binary files /dev/null and b/tests/ast-parsing/compile/top-level-import-bis-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top-level-nested-import-0.8.12-compact.zip b/tests/ast-parsing/compile/top-level-nested-import-0.8.12-compact.zip new file mode 100644 index 000000000..2fc045d08 Binary files /dev/null and b/tests/ast-parsing/compile/top-level-nested-import-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.0-legacy.zip new file mode 100644 index 000000000..e83f46728 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.1-legacy.zip new file mode 100644 index 000000000..0b8bd5c9b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.10-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.10-legacy.zip new file mode 100644 index 000000000..384a60c50 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.11-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.11-legacy.zip new file mode 100644 index 000000000..b16f7d3ec Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.12-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.12-compact.zip new file mode 100644 index 000000000..13bd25a53 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.12-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.12-legacy.zip new file mode 100644 index 000000000..13bd25a53 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.13-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.13-compact.zip new file mode 100644 index 000000000..10628ccce Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.13-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.13-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.13-legacy.zip new file mode 100644 index 000000000..6d8abb46c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.14-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.14-compact.zip new file mode 100644 index 000000000..18a613d56 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.14-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.14-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.14-legacy.zip new file mode 100644 index 000000000..e8d402458 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.15-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.15-compact.zip new file mode 100644 index 000000000..a9467852c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.15-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.15-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.15-legacy.zip new file mode 100644 index 000000000..cf093c1d8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.16-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.16-compact.zip new file mode 100644 index 000000000..096bafc3e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.16-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.16-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.16-legacy.zip new file mode 100644 index 000000000..4bcad77f0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.17-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.17-compact.zip new file mode 100644 index 000000000..c3ae93b84 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.17-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.17-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.17-legacy.zip new file mode 100644 index 000000000..2d65b780d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.18-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.18-compact.zip new file mode 100644 index 000000000..5413b0d1e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.18-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.18-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.18-legacy.zip new file mode 100644 index 000000000..78c31ac1c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.18-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.19-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.19-compact.zip new file mode 100644 index 000000000..2b121113a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.19-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.19-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.19-legacy.zip new file mode 100644 index 000000000..6fd868698 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.19-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.2-legacy.zip new file mode 100644 index 000000000..35f82b56e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.20-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.20-compact.zip new file mode 100644 index 000000000..c5c7dff3f Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.20-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.20-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.20-legacy.zip new file mode 100644 index 000000000..ddd3829bb Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.20-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.21-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.21-compact.zip new file mode 100644 index 000000000..e3dcb3a52 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.21-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.21-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.21-legacy.zip new file mode 100644 index 000000000..a3f7ccba4 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.21-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.22-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.22-compact.zip new file mode 100644 index 000000000..953a4e65a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.22-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.22-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.22-legacy.zip new file mode 100644 index 000000000..b07da4521 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.22-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.23-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.23-compact.zip new file mode 100644 index 000000000..0e30da26c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.23-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.23-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.23-legacy.zip new file mode 100644 index 000000000..236ede718 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.23-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.24-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.24-compact.zip new file mode 100644 index 000000000..f3e7b147d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.24-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.24-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.24-legacy.zip new file mode 100644 index 000000000..833d32396 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.24-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.25-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.25-compact.zip new file mode 100644 index 000000000..516540303 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.25-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.25-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.25-legacy.zip new file mode 100644 index 000000000..c5c300009 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.25-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.26-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.4.26-compact.zip new file mode 100644 index 000000000..efb2894c1 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.26-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.26-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.26-legacy.zip new file mode 100644 index 000000000..c6c852d19 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.26-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.3-legacy.zip new file mode 100644 index 000000000..61151807a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.4-legacy.zip new file mode 100644 index 000000000..c742c1dcd Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.5-legacy.zip new file mode 100644 index 000000000..2d197fa52 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.6-legacy.zip new file mode 100644 index 000000000..c7b66869d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.7-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.7-legacy.zip new file mode 100644 index 000000000..928edbc82 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.8-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.8-legacy.zip new file mode 100644 index 000000000..46341f0b2 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.4.9-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.4.9-legacy.zip new file mode 100644 index 000000000..5695ad62b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.4.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.0-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.0-compact.zip new file mode 100644 index 000000000..baf29beb9 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.0-legacy.zip new file mode 100644 index 000000000..d71af28c7 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.1-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.1-compact.zip new file mode 100644 index 000000000..992afaf4e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.1-legacy.zip new file mode 100644 index 000000000..a4017817a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.10-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.10-compact.zip new file mode 100644 index 000000000..e3f3c66e3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.10-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.10-legacy.zip new file mode 100644 index 000000000..7269e1ced Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.11-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.11-compact.zip new file mode 100644 index 000000000..4310cf233 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.11-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.11-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.11-legacy.zip new file mode 100644 index 000000000..373cd2291 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.12-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.12-compact.zip new file mode 100644 index 000000000..982830e5c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.12-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.12-legacy.zip new file mode 100644 index 000000000..5ba907131 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.13-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.13-compact.zip new file mode 100644 index 000000000..2390dd20a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.13-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.13-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.13-legacy.zip new file mode 100644 index 000000000..a2d63c255 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.14-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.14-compact.zip new file mode 100644 index 000000000..74d272ffb Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.14-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.14-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.14-legacy.zip new file mode 100644 index 000000000..c89fd6729 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.15-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.15-compact.zip new file mode 100644 index 000000000..b0e3b18dd Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.15-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.15-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.15-legacy.zip new file mode 100644 index 000000000..f591cc475 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.16-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.16-compact.zip new file mode 100644 index 000000000..1d1817f92 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.16-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.16-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.16-legacy.zip new file mode 100644 index 000000000..ca7d96482 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.17-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.17-compact.zip new file mode 100644 index 000000000..261cb92af Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.17-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.17-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.17-legacy.zip new file mode 100644 index 000000000..b9445225f Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.2-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.2-compact.zip new file mode 100644 index 000000000..f62eb7089 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.2-legacy.zip new file mode 100644 index 000000000..54f843933 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.3-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.3-compact.zip new file mode 100644 index 000000000..c564b4e12 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.3-legacy.zip new file mode 100644 index 000000000..49ee250e5 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.4-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.4-compact.zip new file mode 100644 index 000000000..77f5fc3d1 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.4-legacy.zip new file mode 100644 index 000000000..cf6fd0cf6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.5-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.5-compact.zip new file mode 100644 index 000000000..340b0b248 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.5-legacy.zip new file mode 100644 index 000000000..0dffc667b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.6-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.6-compact.zip new file mode 100644 index 000000000..8337af22a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.6-legacy.zip new file mode 100644 index 000000000..42f32d86a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.7-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.7-compact.zip new file mode 100644 index 000000000..c286818fb Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.7-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.7-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.7-legacy.zip new file mode 100644 index 000000000..9eb6a083c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.8-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.8-compact.zip new file mode 100644 index 000000000..cd2cc8dd6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.8-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.8-legacy.zip new file mode 100644 index 000000000..1f698c8f8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.9-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.5.9-compact.zip new file mode 100644 index 000000000..1dd6de21b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.5.9-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.5.9-legacy.zip new file mode 100644 index 000000000..4592b3bb6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.5.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.0-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.0-compact.zip new file mode 100644 index 000000000..fc92904b7 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.0-legacy.zip new file mode 100644 index 000000000..f272cd0ea Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.1-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.1-compact.zip new file mode 100644 index 000000000..6e314baf2 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.1-legacy.zip new file mode 100644 index 000000000..e2262eee6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.10-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.10-compact.zip new file mode 100644 index 000000000..01dba3279 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.10-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.10-legacy.zip new file mode 100644 index 000000000..b0a41ed7e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.11-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.11-compact.zip new file mode 100644 index 000000000..872dc6d04 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.11-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.11-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.11-legacy.zip new file mode 100644 index 000000000..3c599d27f Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.12-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.12-compact.zip new file mode 100644 index 000000000..322ad3c5c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.12-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.12-legacy.zip new file mode 100644 index 000000000..a4e8e05cf Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.2-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.2-compact.zip new file mode 100644 index 000000000..bf1923319 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.2-legacy.zip new file mode 100644 index 000000000..ce607b9c4 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.3-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.3-compact.zip new file mode 100644 index 000000000..4c016b9ee Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.3-legacy.zip new file mode 100644 index 000000000..c8b28a988 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.4-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.4-compact.zip new file mode 100644 index 000000000..c54bdff2c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.4-legacy.zip new file mode 100644 index 000000000..c1411d293 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.5-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.5-compact.zip new file mode 100644 index 000000000..9a5891ac3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.5-legacy.zip new file mode 100644 index 000000000..dba4849b3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.6-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.6-compact.zip new file mode 100644 index 000000000..0728919f3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.6-legacy.zip new file mode 100644 index 000000000..004e7675d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.7-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.7-compact.zip new file mode 100644 index 000000000..d49e2faa1 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.7-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.7-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.7-legacy.zip new file mode 100644 index 000000000..5a6d32997 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.8-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.8-compact.zip new file mode 100644 index 000000000..bc7e55830 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.8-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.8-legacy.zip new file mode 100644 index 000000000..78231b31e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.9-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.6.9-compact.zip new file mode 100644 index 000000000..cb3ca573b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.6.9-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.6.9-legacy.zip new file mode 100644 index 000000000..67a18cc04 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.6.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.0-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.0-compact.zip new file mode 100644 index 000000000..be6212b74 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.0-legacy.zip new file mode 100644 index 000000000..949f0490f Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.1-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.1-compact.zip new file mode 100644 index 000000000..272f1757b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.1-legacy.zip new file mode 100644 index 000000000..18066a02e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.2-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.2-compact.zip new file mode 100644 index 000000000..14f634d13 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.2-legacy.zip new file mode 100644 index 000000000..3ce21ef19 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.3-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.3-compact.zip new file mode 100644 index 000000000..48a41104d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.3-legacy.zip new file mode 100644 index 000000000..55d0830ad Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.4-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.4-compact.zip new file mode 100644 index 000000000..7b282b7f3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.4-legacy.zip new file mode 100644 index 000000000..408dbf4dd Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.5-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.5-compact.zip new file mode 100644 index 000000000..fd44cab44 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.5-legacy.zip new file mode 100644 index 000000000..9c7e17184 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.6-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.7.6-compact.zip new file mode 100644 index 000000000..063601238 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.7.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable-0.7.6-legacy.zip new file mode 100644 index 000000000..92c59351a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.7.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.0-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.0-compact.zip new file mode 100644 index 000000000..981a6e6e5 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.1-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.1-compact.zip new file mode 100644 index 000000000..6c7ee34fd Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.10-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.10-compact.zip new file mode 100644 index 000000000..439d210b3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.11-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.11-compact.zip new file mode 100644 index 000000000..0930f21dd Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.12-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.12-compact.zip new file mode 100644 index 000000000..fd3cd0adf Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.2-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.2-compact.zip new file mode 100644 index 000000000..749d1cf3d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.3-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.3-compact.zip new file mode 100644 index 000000000..5bf40b80a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.4-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.4-compact.zip new file mode 100644 index 000000000..d2c2962a8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.5-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.5-compact.zip new file mode 100644 index 000000000..1141f55cf Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.6-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.6-compact.zip new file mode 100644 index 000000000..96a3ad677 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.7-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.7-compact.zip new file mode 100644 index 000000000..6fdc716c0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.7-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.8-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.8-compact.zip new file mode 100644 index 000000000..09fced33e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable-0.8.9-compact.zip b/tests/ast-parsing/compile/top_level_variable-0.8.9-compact.zip new file mode 100644 index 000000000..53d92906c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.0-legacy.zip new file mode 100644 index 000000000..ed5e84ec0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.1-legacy.zip new file mode 100644 index 000000000..a7a1f3c95 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.10-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.10-legacy.zip new file mode 100644 index 000000000..627ab7eef Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.11-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.11-legacy.zip new file mode 100644 index 000000000..342a11182 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.12-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.12-compact.zip new file mode 100644 index 000000000..da1d318cf Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.12-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.12-legacy.zip new file mode 100644 index 000000000..da1d318cf Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.13-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.13-compact.zip new file mode 100644 index 000000000..349c2d255 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.13-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.13-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.13-legacy.zip new file mode 100644 index 000000000..d5ac91597 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.14-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.14-compact.zip new file mode 100644 index 000000000..55ac03642 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.14-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.14-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.14-legacy.zip new file mode 100644 index 000000000..b7e7cb6b4 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.15-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.15-compact.zip new file mode 100644 index 000000000..4dd0d941c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.15-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.15-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.15-legacy.zip new file mode 100644 index 000000000..e9dd7fc01 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.16-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.16-compact.zip new file mode 100644 index 000000000..9b39735ad Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.16-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.16-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.16-legacy.zip new file mode 100644 index 000000000..96f04cc06 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.17-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.17-compact.zip new file mode 100644 index 000000000..71baf0a40 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.17-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.17-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.17-legacy.zip new file mode 100644 index 000000000..ea8e3eb9d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.18-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.18-compact.zip new file mode 100644 index 000000000..0725036df Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.18-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.18-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.18-legacy.zip new file mode 100644 index 000000000..15420a152 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.18-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.19-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.19-compact.zip new file mode 100644 index 000000000..5131847d2 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.19-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.19-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.19-legacy.zip new file mode 100644 index 000000000..878773264 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.19-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.2-legacy.zip new file mode 100644 index 000000000..39eff8fe0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.20-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.20-compact.zip new file mode 100644 index 000000000..cd3b619bb Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.20-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.20-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.20-legacy.zip new file mode 100644 index 000000000..ba3b1847c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.20-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.21-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.21-compact.zip new file mode 100644 index 000000000..1fb2fa934 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.21-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.21-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.21-legacy.zip new file mode 100644 index 000000000..c5bb22f3c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.21-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.22-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.22-compact.zip new file mode 100644 index 000000000..88fd1c436 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.22-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.22-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.22-legacy.zip new file mode 100644 index 000000000..b9bd285e8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.22-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.23-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.23-compact.zip new file mode 100644 index 000000000..8e78fc109 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.23-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.23-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.23-legacy.zip new file mode 100644 index 000000000..7a84ff836 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.23-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.24-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.24-compact.zip new file mode 100644 index 000000000..bf17ada77 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.24-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.24-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.24-legacy.zip new file mode 100644 index 000000000..723767604 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.24-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.25-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.25-compact.zip new file mode 100644 index 000000000..2b848951e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.25-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.25-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.25-legacy.zip new file mode 100644 index 000000000..bbfe1c701 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.25-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.26-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.26-compact.zip new file mode 100644 index 000000000..e674df654 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.26-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.26-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.26-legacy.zip new file mode 100644 index 000000000..66c0afa9b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.26-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.3-legacy.zip new file mode 100644 index 000000000..2810c5cc4 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.4-legacy.zip new file mode 100644 index 000000000..7b10e3f70 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.5-legacy.zip new file mode 100644 index 000000000..f6ca1e5c6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.6-legacy.zip new file mode 100644 index 000000000..0a1a12c09 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.7-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.7-legacy.zip new file mode 100644 index 000000000..d2388282c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.8-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.8-legacy.zip new file mode 100644 index 000000000..c841d29a9 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.4.9-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.4.9-legacy.zip new file mode 100644 index 000000000..f54e2228e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.4.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.0-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.0-compact.zip new file mode 100644 index 000000000..ea588b37b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.0-legacy.zip new file mode 100644 index 000000000..4c88f64cb Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.1-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.1-compact.zip new file mode 100644 index 000000000..3ddbbde16 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.1-legacy.zip new file mode 100644 index 000000000..586975665 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.10-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.10-compact.zip new file mode 100644 index 000000000..91118c9d8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.10-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.10-legacy.zip new file mode 100644 index 000000000..35c0a4ab8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.11-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.11-compact.zip new file mode 100644 index 000000000..a0c2a5f1d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.11-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.11-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.11-legacy.zip new file mode 100644 index 000000000..6e5737d90 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.12-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.12-compact.zip new file mode 100644 index 000000000..07b353fae Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.12-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.12-legacy.zip new file mode 100644 index 000000000..9e13995d3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.13-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.13-compact.zip new file mode 100644 index 000000000..2ada811ef Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.13-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.13-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.13-legacy.zip new file mode 100644 index 000000000..03712ec02 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.13-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.14-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.14-compact.zip new file mode 100644 index 000000000..15b0f671c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.14-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.14-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.14-legacy.zip new file mode 100644 index 000000000..2a50623db Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.14-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.15-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.15-compact.zip new file mode 100644 index 000000000..552e54a31 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.15-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.15-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.15-legacy.zip new file mode 100644 index 000000000..c45da5b3d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.15-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.16-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.16-compact.zip new file mode 100644 index 000000000..08b6626c1 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.16-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.16-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.16-legacy.zip new file mode 100644 index 000000000..de1d8b858 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.16-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.17-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.17-compact.zip new file mode 100644 index 000000000..985bc06b6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.17-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.17-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.17-legacy.zip new file mode 100644 index 000000000..faf3ad160 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.17-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.2-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.2-compact.zip new file mode 100644 index 000000000..035a05601 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.2-legacy.zip new file mode 100644 index 000000000..283f3af71 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.3-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.3-compact.zip new file mode 100644 index 000000000..1f916c7df Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.3-legacy.zip new file mode 100644 index 000000000..71e170b5f Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.4-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.4-compact.zip new file mode 100644 index 000000000..27929c45d Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.4-legacy.zip new file mode 100644 index 000000000..813dd6d18 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.5-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.5-compact.zip new file mode 100644 index 000000000..f8edf6707 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.5-legacy.zip new file mode 100644 index 000000000..6ae927ff8 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.6-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.6-compact.zip new file mode 100644 index 000000000..5869585a0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.6-legacy.zip new file mode 100644 index 000000000..80933ef04 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.7-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.7-compact.zip new file mode 100644 index 000000000..9847b77e0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.7-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.7-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.7-legacy.zip new file mode 100644 index 000000000..91c8d96ee Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.8-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.8-compact.zip new file mode 100644 index 000000000..cfb83074e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.8-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.8-legacy.zip new file mode 100644 index 000000000..f18a9902e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.9-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.9-compact.zip new file mode 100644 index 000000000..3ddfcff7e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.5.9-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.5.9-legacy.zip new file mode 100644 index 000000000..51f8877e0 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.5.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.0-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.0-compact.zip new file mode 100644 index 000000000..087dee862 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.0-legacy.zip new file mode 100644 index 000000000..d6d424f72 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.1-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.1-compact.zip new file mode 100644 index 000000000..2faaf750a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.1-legacy.zip new file mode 100644 index 000000000..9ee8a9e81 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.10-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.10-compact.zip new file mode 100644 index 000000000..a6eec13ff Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.10-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.10-legacy.zip new file mode 100644 index 000000000..a059e6dfa Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.10-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.11-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.11-compact.zip new file mode 100644 index 000000000..a095f7fa5 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.11-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.11-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.11-legacy.zip new file mode 100644 index 000000000..f6a016893 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.11-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.12-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.12-compact.zip new file mode 100644 index 000000000..b8bf0cd2c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.12-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.12-legacy.zip new file mode 100644 index 000000000..21152007e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.12-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.2-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.2-compact.zip new file mode 100644 index 000000000..43d8c9e5a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.2-legacy.zip new file mode 100644 index 000000000..92e67989b Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.3-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.3-compact.zip new file mode 100644 index 000000000..ba3fda291 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.3-legacy.zip new file mode 100644 index 000000000..da7de4471 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.4-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.4-compact.zip new file mode 100644 index 000000000..ea0258b1c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.4-legacy.zip new file mode 100644 index 000000000..cf7aaa5af Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.5-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.5-compact.zip new file mode 100644 index 000000000..768f900ca Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.5-legacy.zip new file mode 100644 index 000000000..201ab5bfa Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.6-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.6-compact.zip new file mode 100644 index 000000000..8a8a11e73 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.6-legacy.zip new file mode 100644 index 000000000..9fd7b6838 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.7-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.7-compact.zip new file mode 100644 index 000000000..2205d755e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.7-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.7-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.7-legacy.zip new file mode 100644 index 000000000..6a36b6682 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.7-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.8-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.8-compact.zip new file mode 100644 index 000000000..e42c03f6e Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.8-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.8-legacy.zip new file mode 100644 index 000000000..5862c5f70 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.8-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.9-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.9-compact.zip new file mode 100644 index 000000000..8262538a7 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.9-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.6.9-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.6.9-legacy.zip new file mode 100644 index 000000000..41f380dd3 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.6.9-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.0-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.0-compact.zip new file mode 100644 index 000000000..d314212b1 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.0-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.0-legacy.zip new file mode 100644 index 000000000..3e46bbaca Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.0-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.1-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.1-compact.zip new file mode 100644 index 000000000..10cfc7abb Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.1-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.1-legacy.zip new file mode 100644 index 000000000..798f2d372 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.1-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.2-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.2-compact.zip new file mode 100644 index 000000000..76a2c2c6c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.2-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.2-legacy.zip new file mode 100644 index 000000000..711903ac9 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.2-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.3-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.3-compact.zip new file mode 100644 index 000000000..f881f50b6 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.3-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.3-legacy.zip new file mode 100644 index 000000000..ecf6c0cd9 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.3-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.4-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.4-compact.zip new file mode 100644 index 000000000..2eb532490 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.4-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.4-legacy.zip new file mode 100644 index 000000000..0d6078492 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.4-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.5-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.5-compact.zip new file mode 100644 index 000000000..561b045ef Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.5-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.5-legacy.zip new file mode 100644 index 000000000..520efd4d9 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.6-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.6-compact.zip new file mode 100644 index 000000000..a5298312c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.7.6-legacy.zip b/tests/ast-parsing/compile/top_level_variable2-0.7.6-legacy.zip new file mode 100644 index 000000000..cbb49609a Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.7.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.0-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.0-compact.zip new file mode 100644 index 000000000..1e48fc50c Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.0-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.1-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.1-compact.zip new file mode 100644 index 000000000..250b38bdc Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.1-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.10-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.10-compact.zip new file mode 100644 index 000000000..29315b2fe Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.11-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.11-compact.zip new file mode 100644 index 000000000..57635f549 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.12-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.12-compact.zip new file mode 100644 index 000000000..6aef441da Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.2-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.2-compact.zip new file mode 100644 index 000000000..f61c7d189 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.2-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.3-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.3-compact.zip new file mode 100644 index 000000000..7db3eaf49 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.3-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.4-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.4-compact.zip new file mode 100644 index 000000000..a07b81425 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.4-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.5-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.5-compact.zip new file mode 100644 index 000000000..f97feea56 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.5-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.6-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.6-compact.zip new file mode 100644 index 000000000..ba33866be Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.6-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.7-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.7-compact.zip new file mode 100644 index 000000000..7e054a456 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.7-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.8-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.8-compact.zip new file mode 100644 index 000000000..0e059a026 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/top_level_variable2-0.8.9-compact.zip b/tests/ast-parsing/compile/top_level_variable2-0.8.9-compact.zip new file mode 100644 index 000000000..757f39d45 Binary files /dev/null and b/tests/ast-parsing/compile/top_level_variable2-0.8.9-compact.zip differ diff --git a/tests/ast-parsing/compile/trycatch-0.8.12-compact.zip b/tests/ast-parsing/compile/trycatch-0.8.12-compact.zip new file mode 100644 index 000000000..c8015927f Binary files /dev/null and b/tests/ast-parsing/compile/trycatch-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/tupleexpression-0.8.12-compact.zip b/tests/ast-parsing/compile/tupleexpression-0.8.12-compact.zip new file mode 100644 index 000000000..3f680eb7b Binary files /dev/null and b/tests/ast-parsing/compile/tupleexpression-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/unaryexpression-0.8.12-compact.zip b/tests/ast-parsing/compile/unaryexpression-0.8.12-compact.zip new file mode 100644 index 000000000..0a417e227 Binary files /dev/null and b/tests/ast-parsing/compile/unaryexpression-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/unchecked-0.8.12-compact.zip b/tests/ast-parsing/compile/unchecked-0.8.12-compact.zip new file mode 100644 index 000000000..b87c45b99 Binary files /dev/null and b/tests/ast-parsing/compile/unchecked-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/units_and_global_variables-0.8.12-compact.zip b/tests/ast-parsing/compile/units_and_global_variables-0.8.12-compact.zip new file mode 100644 index 000000000..0026bf0dc Binary files /dev/null and b/tests/ast-parsing/compile/units_and_global_variables-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/using-for-0.8.12-compact.zip b/tests/ast-parsing/compile/using-for-0.8.12-compact.zip new file mode 100644 index 000000000..f7c5dad65 Binary files /dev/null and b/tests/ast-parsing/compile/using-for-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/variable-0.8.12-compact.zip b/tests/ast-parsing/compile/variable-0.8.12-compact.zip new file mode 100644 index 000000000..17eb105de Binary files /dev/null and b/tests/ast-parsing/compile/variable-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/variabledeclaration-0.8.12-compact.zip b/tests/ast-parsing/compile/variabledeclaration-0.8.12-compact.zip new file mode 100644 index 000000000..51cf8a3b8 Binary files /dev/null and b/tests/ast-parsing/compile/variabledeclaration-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/while-0.8.12-compact.zip b/tests/ast-parsing/compile/while-0.8.12-compact.zip new file mode 100644 index 000000000..a31adc48d Binary files /dev/null and b/tests/ast-parsing/compile/while-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.7.5-compact.zip b/tests/ast-parsing/compile/yul-0.7.5-compact.zip index 727fce452..03529b858 100644 Binary files a/tests/ast-parsing/compile/yul-0.7.5-compact.zip and b/tests/ast-parsing/compile/yul-0.7.5-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.7.5-legacy.zip b/tests/ast-parsing/compile/yul-0.7.5-legacy.zip index 8ea24fc98..97861f536 100644 Binary files a/tests/ast-parsing/compile/yul-0.7.5-legacy.zip and b/tests/ast-parsing/compile/yul-0.7.5-legacy.zip differ diff --git a/tests/ast-parsing/compile/yul-0.7.6-compact.zip b/tests/ast-parsing/compile/yul-0.7.6-compact.zip index 1c1253363..3df91e6fd 100644 Binary files a/tests/ast-parsing/compile/yul-0.7.6-compact.zip and b/tests/ast-parsing/compile/yul-0.7.6-compact.zip differ diff --git a/tests/ast-parsing/compile/yul-0.7.6-legacy.zip b/tests/ast-parsing/compile/yul-0.7.6-legacy.zip index 57245a7ef..11a6cf030 100644 Binary files a/tests/ast-parsing/compile/yul-0.7.6-legacy.zip and b/tests/ast-parsing/compile/yul-0.7.6-legacy.zip differ diff --git a/tests/ast-parsing/compile/yul-0.8.12-compact.zip b/tests/ast-parsing/compile/yul-0.8.12-compact.zip new file mode 100644 index 000000000..ae088766a Binary files /dev/null and b/tests/ast-parsing/compile/yul-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/expected/assembly-0.8.12-compact.json b/tests/ast-parsing/expected/assembly-0.8.12-compact.json new file mode 100644 index 000000000..d0a1cb33e --- /dev/null +++ b/tests/ast-parsing/expected/assembly-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: INLINE ASM 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/assignment-0.8.12-compact.json b/tests/ast-parsing/expected/assignment-0.8.12-compact.json new file mode 100644 index 000000000..8f9f9857b --- /dev/null +++ b/tests/ast-parsing/expected/assignment-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/binaryoperation-0.8.12-compact.json b/tests/ast-parsing/expected/binaryoperation-0.8.12-compact.json new file mode 100644 index 000000000..8939b57f2 --- /dev/null +++ b/tests/ast-parsing/expected/binaryoperation-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/break-0.8.12-compact.json b/tests/ast-parsing/expected/break-0.8.12-compact.json new file mode 100644 index 000000000..b9b7fc93e --- /dev/null +++ b/tests/ast-parsing/expected/break-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: BREAK 7\n\"];\n7->3;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: BREAK 20\n\"];\n20->16;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/call_to_variable-0.8.12-compact.json b/tests/ast-parsing/expected/call_to_variable-0.8.12-compact.json new file mode 100644 index 000000000..113bb5a14 --- /dev/null +++ b/tests/ast-parsing/expected/call_to_variable-0.8.12-compact.json @@ -0,0 +1,6 @@ +{ + "C": {}, + "D": { + "f(C)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/comment-0.8.12-compact.json b/tests/ast-parsing/expected/comment-0.8.12-compact.json new file mode 100644 index 000000000..a53745acd --- /dev/null +++ b/tests/ast-parsing/expected/comment-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/conditional-0.8.12-compact.json b/tests/ast-parsing/expected/conditional-0.8.12-compact.json new file mode 100644 index 000000000..6ef3d40e7 --- /dev/null +++ b/tests/ast-parsing/expected/conditional-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->6;\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->9;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n9->10;\n10[label=\"Node Type: IF 10\n\"];\n10->11[label=\"True\"];\n10->12[label=\"False\"];\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->13;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: END_IF 13\n\"];\n13->14;\n14[label=\"Node Type: IF 14\n\"];\n14->16[label=\"True\"];\n14->26[label=\"False\"];\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: END_IF 17\n\"];\n17->18;\n18[label=\"Node Type: IF 18\n\"];\n18->19[label=\"True\"];\n18->20[label=\"False\"];\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->21;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: IF 22\n\"];\n22->23[label=\"True\"];\n22->24[label=\"False\"];\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->25;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: END_IF 25\n\"];\n26[label=\"Node Type: IF 26\n\"];\n26->27[label=\"True\"];\n26->28[label=\"False\"];\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->29;\n28[label=\"Node Type: EXPRESSION 28\n\"];\n28->29;\n29[label=\"Node Type: END_IF 29\n\"];\n29->17;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/continue-0.8.12-compact.json b/tests/ast-parsing/expected/continue-0.8.12-compact.json new file mode 100644 index 000000000..bba15d9bd --- /dev/null +++ b/tests/ast-parsing/expected/continue-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n3->13;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: IF 6\n\"];\n6->7[label=\"True\"];\n6->8[label=\"False\"];\n7[label=\"Node Type: CONTINUE 7\n\"];\n7->2;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->5;\n11[label=\"Node Type: BEGIN_LOOP 11\n\"];\n11->14;\n12[label=\"Node Type: END_LOOP 12\n\"];\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->11;\n14[label=\"Node Type: IF_LOOP 14\n\"];\n14->17[label=\"True\"];\n14->12[label=\"False\"];\n15[label=\"Node Type: BEGIN_LOOP 15\n\"];\n15->18;\n16[label=\"Node Type: END_LOOP 16\n\"];\n16->24;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->15;\n18[label=\"Node Type: IF_LOOP 18\n\"];\n18->19[label=\"True\"];\n18->16[label=\"False\"];\n19[label=\"Node Type: IF 19\n\"];\n19->20[label=\"True\"];\n19->21[label=\"False\"];\n20[label=\"Node Type: CONTINUE 20\n\"];\n20->15;\n21[label=\"Node Type: END_IF 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->18;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->14;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/contract-0.8.12-compact.json b/tests/ast-parsing/expected/contract-0.8.12-compact.json new file mode 100644 index 000000000..1df28fb3d --- /dev/null +++ b/tests/ast-parsing/expected/contract-0.8.12-compact.json @@ -0,0 +1,19 @@ +{ + "A": {}, + "B": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "D": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "E": { + "constructor(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "F": {}, + "G": {}, + "H": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.10-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.11-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.14-compact.json b/tests/ast-parsing/expected/custom_error-0.4.14-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.14-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.14-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.16-compact.json b/tests/ast-parsing/expected/custom_error-0.4.16-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.16-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.16-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.21-compact.json b/tests/ast-parsing/expected/custom_error-0.4.21-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.21-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.21-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.22-compact.json b/tests/ast-parsing/expected/custom_error-0.4.22-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.22-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.22-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.23-compact.json b/tests/ast-parsing/expected/custom_error-0.4.23-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.23-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.23-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.24-compact.json b/tests/ast-parsing/expected/custom_error-0.4.24-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.24-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.24-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json b/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.4.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.0-compact.json b/tests/ast-parsing/expected/custom_error-0.5.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.14-compact.json b/tests/ast-parsing/expected/custom_error-0.5.14-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.14-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.14-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.3-compact.json b/tests/ast-parsing/expected/custom_error-0.5.3-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.3-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.4-compact.json b/tests/ast-parsing/expected/custom_error-0.5.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json b/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.5.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.0-compact.json b/tests/ast-parsing/expected/custom_error-0.6.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.1-compact.json b/tests/ast-parsing/expected/custom_error-0.6.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.2-compact.json b/tests/ast-parsing/expected/custom_error-0.6.2-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.2-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.2-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.5-compact.json b/tests/ast-parsing/expected/custom_error-0.6.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.7-compact.json b/tests/ast-parsing/expected/custom_error-0.6.7-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.7-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.8-compact.json b/tests/ast-parsing/expected/custom_error-0.6.8-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.8-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.9-compact.json b/tests/ast-parsing/expected/custom_error-0.6.9-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.9-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json b/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.6.9-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.0-compact.json b/tests/ast-parsing/expected/custom_error-0.7.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.1-compact.json b/tests/ast-parsing/expected/custom_error-0.7.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.4-compact.json b/tests/ast-parsing/expected/custom_error-0.7.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.5-compact.json b/tests/ast-parsing/expected/custom_error-0.7.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json b/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.7.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.0-compact.json b/tests/ast-parsing/expected/custom_error-0.8.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.12-compact.json b/tests/ast-parsing/expected/custom_error-0.8.12-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.12-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.4-compact.json b/tests/ast-parsing/expected/custom_error-0.8.4-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.4-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.6-compact.json b/tests/ast-parsing/expected/custom_error-0.8.6-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.6-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/custom_error-0.8.7-compact.json b/tests/ast-parsing/expected/custom_error-0.8.7-compact.json new file mode 100644 index 000000000..995b49f83 --- /dev/null +++ b/tests/ast-parsing/expected/custom_error-0.8.7-compact.json @@ -0,0 +1,16 @@ +{ + "VendingMachine": { + "err0()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err1()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "err2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "err3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "A": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "B": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "h()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/dowhile-0.8.12-compact.json b/tests/ast-parsing/expected/dowhile-0.8.12-compact.json new file mode 100644 index 000000000..1cf317575 --- /dev/null +++ b/tests/ast-parsing/expected/dowhile-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->4;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->9;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/emit-0.8.12-compact.json b/tests/ast-parsing/expected/emit-0.8.12-compact.json new file mode 100644 index 000000000..b043ced39 --- /dev/null +++ b/tests/ast-parsing/expected/emit-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "emitWithKeyword()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/enum-0.8.12-compact.json b/tests/ast-parsing/expected/enum-0.8.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/enum-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/event-0.8.12-compact.json b/tests/ast-parsing/expected/event-0.8.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/event-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/for-0.8.12-compact.json b/tests/ast-parsing/expected/for-0.8.12-compact.json new file mode 100644 index 000000000..fe24348d8 --- /dev/null +++ b/tests/ast-parsing/expected/for-0.8.12-compact.json @@ -0,0 +1,15 @@ +{ + "C": { + "normalLoopBlockBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopExprBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "normalLoopNoBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->5;\n}\n", + "loopNoPre()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoPreCond()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPrePost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->4[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n", + "loopNoCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->3;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->2;\n}\n", + "loopNoPreCondPost()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: BEGIN_LOOP 3\n\"];\n3->5;\n4[label=\"Node Type: END_LOOP 4\n\"];\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: BREAK 6\n\"];\n6->4;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->3;\n}\n", + "loopNoPreCondPostBody()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->1;\n1->2;\n2[label=\"Node Type: END_LOOP 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/function-0.8.12-compact.json b/tests/ast-parsing/expected/function-0.8.12-compact.json new file mode 100644 index 000000000..50465d36d --- /dev/null +++ b/tests/ast-parsing/expected/function-0.8.12-compact.json @@ -0,0 +1,52 @@ +{ + "C1": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C2": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "fallback()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "receive()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C3": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "modifierNoArgs()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "modifierWithArgs(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + }, + "C4": { + "hasArgs(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasReturns()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "hasArgsAndReturns(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C5": { + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n}\n" + }, + "C6": { + "abstractFunc()": "digraph{\n}\n", + "abstractFunc2()": "digraph{\n}\n" + }, + "C7": { + "abstractFunc3()": "digraph{\n}\n" + }, + "C8": { + "abstractFunc3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "abstractFunc2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "payableFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "externalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "publicFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "privateFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "pureFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "viewFunc()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/functioncall-0.8.12-compact.json b/tests/ast-parsing/expected/functioncall-0.8.12-compact.json new file mode 100644 index 000000000..f266b62b1 --- /dev/null +++ b/tests/ast-parsing/expected/functioncall-0.8.12-compact.json @@ -0,0 +1,10 @@ +{ + "I": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n}\n", + "publicTarget()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "internalTarget(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/if-0.8.12-compact.json b/tests/ast-parsing/expected/if-0.8.12-compact.json new file mode 100644 index 000000000..c0c884b4e --- /dev/null +++ b/tests/ast-parsing/expected/if-0.8.12-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "ifWithoutElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: END_IF 3\n\"];\n}\n", + "ifWithElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->4;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "ifWithElseIf()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->9;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->8;\n5[label=\"Node Type: IF 5\n\"];\n5->6[label=\"True\"];\n5->7[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n7->8;\n8[label=\"Node Type: END_IF 8\n\"];\n8->9;\n9[label=\"Node Type: END_IF 9\n\"];\n}\n", + "ifWithElseIfElse()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->7;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->6;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: END_IF 6\n\"];\n6->7;\n7[label=\"Node Type: END_IF 7\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.0-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.1-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.10-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.10-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.10-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.11-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.11-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.11-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.12-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.12-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.12-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.12-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.12-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.12-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.13-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.13-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.13-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.13-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.13-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.13-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.14-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.14-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.14-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.14-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.14-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.14-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.15-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.15-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.15-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.15-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.15-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.15-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.16-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.16-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.16-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.16-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.16-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.16-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.17-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.17-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.17-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.17-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.17-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.17-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.18-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.18-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.18-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.18-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.18-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.18-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.19-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.19-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.19-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.19-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.19-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.19-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.2-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.2-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.2-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.20-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.20-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.20-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.20-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.20-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.20-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.21-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.21-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.21-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.21-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.21-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.21-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.22-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.22-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.22-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.22-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.22-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.22-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.23-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.23-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.23-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.23-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.23-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.23-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.24-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.24-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.24-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.24-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.24-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.24-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.25-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.25-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.25-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.25-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.25-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.25-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.26-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.26-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.26-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.26-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.26-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.26-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.3-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.4-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.5-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.6-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.6-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.6-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.7-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.8-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.9-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.9-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.4.9-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.0-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.0-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.1-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.1-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.10-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.10-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.10-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.10-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.10-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.10-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.11-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.11-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.11-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.11-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.11-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.11-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.12-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.12-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.12-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.12-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.12-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.12-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.13-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.13-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.13-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.13-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.13-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.13-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.14-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.14-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.14-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.14-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.14-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.14-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.15-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.15-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.15-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.15-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.15-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.15-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.16-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.16-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.16-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.16-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.16-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.16-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.17-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.17-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.17-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.17-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.17-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.17-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.2-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.2-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.2-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.2-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.2-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.2-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.3-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.3-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.3-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.3-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.4-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.4-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.5-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.5-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.6-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.6-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.6-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.6-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.6-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.6-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.7-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.7-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.7-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.7-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.8-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.8-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.8-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.8-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.9-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.9-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.9-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.9-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.9-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.5.9-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.0-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.0-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.1-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.1-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.10-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.10-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.10-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.10-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.10-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.10-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.11-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.11-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.11-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.11-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.11-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.11-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.12-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.12-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.12-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.12-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.12-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.12-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.2-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.2-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.2-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.2-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.2-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.2-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.3-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.3-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.3-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.3-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.4-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.4-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.5-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.5-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.6-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.6-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.6-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.6-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.6-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.6-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.7-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.7-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.7-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.7-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.7-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.7-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.8-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.8-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.8-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.8-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.8-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.8-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.9-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.9-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.9-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.9-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.9-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.6.9-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.0-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.0-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.0-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.0-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.0-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.0-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.1-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.1-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.1-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.1-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.1-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.1-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.2-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.2-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.2-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.2-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.2-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.2-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.3-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.3-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.3-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.3-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.3-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.3-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.4-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.4-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.4-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.4-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.4-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.4-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.5-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.5-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.5-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.5-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.5-legacy.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.5-legacy.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.6-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.6-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.6-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.6-legacy.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.6-legacy.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.7.6-legacy.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.0-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.0-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.0-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.1-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.1-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.1-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.10-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.10-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.11-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.11-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.11-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.12-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.12-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.2-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.2-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.2-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.3-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.3-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.3-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.4-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.4-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.4-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.5-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.5-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.5-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.6-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.6-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.6-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.7-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.7-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.7-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.8-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.8-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.9-compact.json b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.9-compact.json new file mode 100644 index 000000000..355945be7 --- /dev/null +++ b/tests/ast-parsing/expected/import_interface_with_struct_from_top_level-0.8.9-compact.json @@ -0,0 +1,3 @@ +{ + "I": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexaccess-0.8.12-compact.json b/tests/ast-parsing/expected/indexaccess-0.8.12-compact.json new file mode 100644 index 000000000..43190fcd6 --- /dev/null +++ b/tests/ast-parsing/expected/indexaccess-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/indexrangeaccess-0.8.12-compact.json b/tests/ast-parsing/expected/indexrangeaccess-0.8.12-compact.json new file mode 100644 index 000000000..f4529bc86 --- /dev/null +++ b/tests/ast-parsing/expected/indexrangeaccess-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/library_implicit_conversion-0.8.12-compact.json b/tests/ast-parsing/expected/library_implicit_conversion-0.8.12-compact.json new file mode 100644 index 000000000..81b56547c --- /dev/null +++ b/tests/ast-parsing/expected/library_implicit_conversion-0.8.12-compact.json @@ -0,0 +1,23 @@ +{ + "LibByte": { + "t(uint256,bytes1)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestByte": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibUint": { + "t(uint256,uint8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUint": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n" + }, + "LibInt": { + "t(uint256,int8)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "t(uint256,int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "TestUintWithVariableiAndConversion": { + "test()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/literal-0.8.12-compact.json b/tests/ast-parsing/expected/literal-0.8.12-compact.json new file mode 100644 index 000000000..e1a35a0e7 --- /dev/null +++ b/tests/ast-parsing/expected/literal-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: EXPRESSION 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/memberaccess-0.8.12-compact.json b/tests/ast-parsing/expected/memberaccess-0.8.12-compact.json new file mode 100644 index 000000000..b66694f7a --- /dev/null +++ b/tests/ast-parsing/expected/memberaccess-0.8.12-compact.json @@ -0,0 +1,7 @@ +{ + "I": {}, + "F": {}, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/minmax-0.8.12-compact.json b/tests/ast-parsing/expected/minmax-0.8.12-compact.json new file mode 100644 index 000000000..228af371a --- /dev/null +++ b/tests/ast-parsing/expected/minmax-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/modifier-0.8.12-compact.json b/tests/ast-parsing/expected/modifier-0.8.12-compact.json new file mode 100644 index 000000000..34aad8ef1 --- /dev/null +++ b/tests/ast-parsing/expected/modifier-0.8.12-compact.json @@ -0,0 +1,8 @@ +{ + "C": { + "onePlaceholder()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "multiplePlaceholders()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n1->2;\n2[label=\"Node Type: _ 2\n\"];\n2->3;\n3[label=\"Node Type: _ 3\n\"];\n}\n", + "acceptsVar(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n", + "noParams()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: _ 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/newexpression-0.8.12-compact.json b/tests/ast-parsing/expected/newexpression-0.8.12-compact.json new file mode 100644 index 000000000..e46dafe75 --- /dev/null +++ b/tests/ast-parsing/expected/newexpression-0.8.12-compact.json @@ -0,0 +1,8 @@ +{ + "B": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + }, + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/pragma-0.8.12-compact.json b/tests/ast-parsing/expected/pragma-0.8.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/pragma-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/push-0.8.12-compact.json b/tests/ast-parsing/expected/push-0.8.12-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/push-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/return-0.8.12-compact.json b/tests/ast-parsing/expected/return-0.8.12-compact.json new file mode 100644 index 000000000..7eddd38f6 --- /dev/null +++ b/tests/ast-parsing/expected/return-0.8.12-compact.json @@ -0,0 +1,9 @@ +{ + "C": { + "returnConstant()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "returnVariable()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "returnTuple()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "returnTernary()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->3;\n3[label=\"Node Type: IF 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: RETURN 4\n\"];\n5[label=\"Node Type: RETURN 5\n\"];\n}\n", + "returnDelete()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/scope-0.8.12-compact.json b/tests/ast-parsing/expected/scope-0.8.12-compact.json new file mode 100644 index 000000000..00c3dbb1a --- /dev/null +++ b/tests/ast-parsing/expected/scope-0.8.12-compact.json @@ -0,0 +1,8 @@ +{ + "Scope": { + "nested_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n}\n", + "if_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: IF 1\n\"];\n1->2[label=\"True\"];\n1->3[label=\"False\"];\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->4;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: END_IF 4\n\"];\n}\n", + "while_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n}\n", + "for_scope()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/struct-0.8.12-compact.json b/tests/ast-parsing/expected/struct-0.8.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/struct-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/throw-0.8.12-compact.json b/tests/ast-parsing/expected/throw-0.8.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/throw-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-0.8.12-compact.json b/tests/ast-parsing/expected/top-level-0.8.12-compact.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/tests/ast-parsing/expected/top-level-0.8.12-compact.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-0.8.12-compact.json b/tests/ast-parsing/expected/top-level-import-0.8.12-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-import-bis-0.8.12-compact.json b/tests/ast-parsing/expected/top-level-import-bis-0.8.12-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-import-bis-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top-level-nested-import-0.8.12-compact.json b/tests/ast-parsing/expected/top-level-nested-import-0.8.12-compact.json new file mode 100644 index 000000000..a1a35e654 --- /dev/null +++ b/tests/ast-parsing/expected/top-level-nested-import-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.0-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.1-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.10-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.10-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.10-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.11-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.11-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.11-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.12-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.12-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.12-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.12-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.12-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.12-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.13-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.13-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.13-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.13-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.13-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.13-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.14-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.14-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.14-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.14-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.14-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.14-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.15-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.15-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.15-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.15-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.15-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.15-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.16-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.16-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.16-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.16-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.16-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.16-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.17-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.17-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.17-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.17-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.17-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.17-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.18-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.18-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.18-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.18-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.18-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.18-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.19-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.19-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.19-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.19-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.19-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.19-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.2-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.20-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.20-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.20-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.20-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.20-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.20-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.21-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.21-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.21-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.21-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.21-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.21-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.22-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.22-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.22-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.22-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.22-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.22-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.23-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.23-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.23-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.23-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.23-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.23-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.24-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.24-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.24-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.24-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.24-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.24-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.25-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.25-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.25-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.25-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.25-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.25-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.26-compact.json b/tests/ast-parsing/expected/top_level_variable-0.4.26-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.26-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.26-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.26-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.26-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.3-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.4-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.5-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.6-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.7-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.7-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.7-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.8-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.8-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.8-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.4.9-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.4.9-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.4.9-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.0-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.0-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.0-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.0-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.1-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.1-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.1-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.1-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.10-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.10-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.10-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.10-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.10-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.10-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.11-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.11-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.11-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.11-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.11-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.11-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.12-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.12-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.12-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.12-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.12-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.12-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.13-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.13-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.13-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.13-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.13-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.13-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.14-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.14-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.14-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.14-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.14-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.14-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.15-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.15-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.15-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.15-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.15-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.15-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.16-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.16-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.16-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.16-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.16-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.16-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.17-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.17-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.17-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.17-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.17-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.17-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.2-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.2-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.2-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.2-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.3-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.3-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.3-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.3-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.4-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.4-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.4-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.4-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.5-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.5-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.5-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.5-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.6-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.6-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.6-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.6-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.7-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.7-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.7-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.7-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.7-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.7-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.8-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.8-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.8-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.8-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.8-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.8-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.9-compact.json b/tests/ast-parsing/expected/top_level_variable-0.5.9-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.9-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.5.9-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.5.9-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.5.9-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.0-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.0-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.0-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.0-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.1-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.1-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.1-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.1-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.10-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.10-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.10-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.10-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.10-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.10-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.11-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.11-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.11-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.11-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.11-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.11-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.12-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.12-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.12-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.12-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.12-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.12-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.2-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.2-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.2-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.2-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.3-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.3-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.3-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.3-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.4-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.4-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.4-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.4-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.5-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.5-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.5-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.5-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.6-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.6-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.6-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.6-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.7-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.7-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.7-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.7-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.7-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.7-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.8-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.8-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.8-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.8-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.8-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.8-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.9-compact.json b/tests/ast-parsing/expected/top_level_variable-0.6.9-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.9-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.6.9-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.6.9-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.6.9-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.0-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.0-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.0-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.0-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.1-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.1-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.1-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.1-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.2-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.2-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.2-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.2-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.3-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.3-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.3-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.3-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.4-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.4-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.4-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.4-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.5-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.5-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.5-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.5-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.6-compact.json b/tests/ast-parsing/expected/top_level_variable-0.7.6-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.6-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.7.6-legacy.json b/tests/ast-parsing/expected/top_level_variable-0.7.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.7.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.0-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.0-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.0-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.1-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.1-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.1-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.10-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.10-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.10-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.11-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.11-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.11-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.12-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.12-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.2-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.2-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.2-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.3-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.3-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.3-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.4-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.4-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.4-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.5-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.5-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.5-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.6-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.6-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.6-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.7-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.7-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.7-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.8-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.8-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.8-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable-0.8.9-compact.json b/tests/ast-parsing/expected/top_level_variable-0.8.9-compact.json new file mode 100644 index 000000000..35c752376 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable-0.8.9-compact.json @@ -0,0 +1,5 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.0-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.1-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.10-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.10-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.10-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.11-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.11-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.11-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.12-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.12-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.12-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.12-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.12-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.12-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.13-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.13-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.13-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.13-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.13-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.13-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.14-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.14-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.14-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.14-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.14-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.14-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.15-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.15-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.15-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.15-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.15-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.15-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.16-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.16-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.16-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.16-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.16-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.16-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.17-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.17-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.17-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.17-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.17-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.17-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.18-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.18-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.18-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.18-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.18-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.18-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.19-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.19-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.19-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.19-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.19-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.19-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.2-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.20-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.20-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.20-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.20-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.20-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.20-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.21-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.21-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.21-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.21-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.21-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.21-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.22-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.22-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.22-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.22-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.22-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.22-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.23-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.23-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.23-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.23-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.23-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.23-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.24-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.24-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.24-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.24-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.24-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.24-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.25-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.25-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.25-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.25-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.25-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.25-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.26-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.4.26-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.26-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.26-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.26-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.26-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.3-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.4-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.5-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.6-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.7-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.7-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.7-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.8-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.8-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.8-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.4.9-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.4.9-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.4.9-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.0-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.0-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.0-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.0-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.1-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.1-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.1-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.1-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.10-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.10-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.10-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.10-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.10-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.10-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.11-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.11-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.11-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.11-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.11-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.11-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.12-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.12-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.12-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.12-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.12-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.12-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.13-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.13-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.13-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.13-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.13-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.13-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.14-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.14-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.14-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.14-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.14-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.14-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.15-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.15-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.15-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.15-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.15-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.15-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.16-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.16-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.16-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.16-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.16-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.16-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.17-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.17-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.17-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.17-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.17-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.17-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.2-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.2-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.2-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.2-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.3-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.3-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.3-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.3-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.4-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.4-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.4-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.4-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.5-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.5-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.5-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.5-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.6-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.6-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.6-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.6-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.7-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.7-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.7-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.7-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.7-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.7-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.8-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.8-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.8-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.8-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.8-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.8-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.9-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.5.9-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.9-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.5.9-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.5.9-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.5.9-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.0-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.0-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.0-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.0-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.1-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.1-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.1-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.1-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.10-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.10-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.10-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.10-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.10-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.10-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.11-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.11-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.11-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.11-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.11-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.11-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.12-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.12-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.12-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.12-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.12-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.12-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.2-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.2-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.2-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.2-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.3-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.3-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.3-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.3-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.4-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.4-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.4-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.4-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.5-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.5-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.5-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.5-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.6-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.6-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.6-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.6-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.7-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.7-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.7-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.7-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.7-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.7-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.8-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.8-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.8-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.8-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.8-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.8-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.9-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.6.9-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.9-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.6.9-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.6.9-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.6.9-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.0-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.0-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.0-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.0-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.0-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.0-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.1-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.1-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.1-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.1-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.1-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.1-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.2-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.2-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.2-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.2-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.2-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.2-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.3-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.3-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.3-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.3-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.3-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.3-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.4-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.4-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.4-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.4-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.4-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.4-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.5-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.5-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.5-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.5-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.5-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.5-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.6-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.7.6-compact.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.6-compact.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.7.6-legacy.json b/tests/ast-parsing/expected/top_level_variable2-0.7.6-legacy.json new file mode 100644 index 000000000..7caa60cf7 --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.7.6-legacy.json @@ -0,0 +1,3 @@ +{ + "A": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.0-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.0-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.0-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.1-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.1-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.1-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.10-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.10-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.10-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.11-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.11-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.11-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.12-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.12-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.12-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.2-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.2-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.2-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.3-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.3-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.3-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.4-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.4-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.4-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.5-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.5-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.5-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.6-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.6-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.6-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.7-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.7-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.7-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.8-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.8-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.8-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/top_level_variable2-0.8.9-compact.json b/tests/ast-parsing/expected/top_level_variable2-0.8.9-compact.json new file mode 100644 index 000000000..503a5cebd --- /dev/null +++ b/tests/ast-parsing/expected/top_level_variable2-0.8.9-compact.json @@ -0,0 +1,8 @@ +{ + "T": { + "g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" + }, + "T2": { + "h(uint256[10])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/trycatch-0.8.12-compact.json b/tests/ast-parsing/expected/trycatch-0.8.12-compact.json new file mode 100644 index 000000000..6099f6be4 --- /dev/null +++ b/tests/ast-parsing/expected/trycatch-0.8.12-compact.json @@ -0,0 +1,9 @@ +{ + "ERC20": { + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": { + "tryCatchFunctionCall()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: TRY 2\n\"];\n2->3;\n2->5;\n2->7;\n3[label=\"Node Type: CATCH 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->7;\n5[label=\"Node Type: CATCH 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: TRY 7\n\"];\n7->8;\n7->10;\n7->12;\n8[label=\"Node Type: CATCH 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->12;\n10[label=\"Node Type: CATCH 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: TRY 12\n\"];\n12->13;\n12->15;\n12->17;\n12->19;\n13[label=\"Node Type: CATCH 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->19;\n15[label=\"Node Type: CATCH 15\n\"];\n15->16;\n16[label=\"Node Type: EXPRESSION 16\n\"];\n16->19;\n17[label=\"Node Type: CATCH 17\n\"];\n17->18;\n18[label=\"Node Type: EXPRESSION 18\n\"];\n18->19;\n19[label=\"Node Type: TRY 19\n\"];\n19->20;\n19->21;\n20[label=\"Node Type: CATCH 20\n\"];\n21[label=\"Node Type: CATCH 21\n\"];\n21->22;\n22[label=\"Node Type: EXPRESSION 22\n\"];\n}\n", + "tryCatchContractDeployment()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: TRY 1\n\"];\n1->2;\n1->6;\n2[label=\"Node Type: CATCH 2\n\"];\n2->3;\n3[label=\"Node Type: TRY 3\n\"];\n3->4;\n3->5;\n4[label=\"Node Type: CATCH 4\n\"];\n5[label=\"Node Type: CATCH 5\n\"];\n6[label=\"Node Type: CATCH 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/tupleexpression-0.8.12-compact.json b/tests/ast-parsing/expected/tupleexpression-0.8.12-compact.json new file mode 100644 index 000000000..b5912e6b8 --- /dev/null +++ b/tests/ast-parsing/expected/tupleexpression-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unaryexpression-0.8.12-compact.json b/tests/ast-parsing/expected/unaryexpression-0.8.12-compact.json new file mode 100644 index 000000000..f7fcf9203 --- /dev/null +++ b/tests/ast-parsing/expected/unaryexpression-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/unchecked-0.8.12-compact.json b/tests/ast-parsing/expected/unchecked-0.8.12-compact.json new file mode 100644 index 000000000..557c3d932 --- /dev/null +++ b/tests/ast-parsing/expected/unchecked-0.8.12-compact.json @@ -0,0 +1,6 @@ +{ + "C": { + "f(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "g(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/units_and_global_variables-0.8.12-compact.json b/tests/ast-parsing/expected/units_and_global_variables-0.8.12-compact.json new file mode 100644 index 000000000..74226bae7 --- /dev/null +++ b/tests/ast-parsing/expected/units_and_global_variables-0.8.12-compact.json @@ -0,0 +1,17 @@ +{ + "A": {}, + "I": {}, + "Test": { + "ether_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n", + "time_unit()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n", + "block_and_transactions()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n}\n", + "abi_encode()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n}\n", + "error_handling()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n}\n", + "math_and_crypto()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: EXPRESSION 10\n\"];\n}\n", + "address_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n}\n", + "return_addr()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "address_edge_case()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", + "contract_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", + "type_related()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/using-for-0.8.12-compact.json b/tests/ast-parsing/expected/using-for-0.8.12-compact.json new file mode 100644 index 000000000..27fa7c323 --- /dev/null +++ b/tests/ast-parsing/expected/using-for-0.8.12-compact.json @@ -0,0 +1,9 @@ +{ + "L1": { + "f(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "L2": { + "f(bytes32)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variable-0.8.12-compact.json b/tests/ast-parsing/expected/variable-0.8.12-compact.json new file mode 100644 index 000000000..97689fda1 --- /dev/null +++ b/tests/ast-parsing/expected/variable-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "basic()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: NEW VARIABLE 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n11->12;\n12[label=\"Node Type: NEW VARIABLE 12\n\"];\n12->13;\n13[label=\"Node Type: NEW VARIABLE 13\n\"];\n13->14;\n14[label=\"Node Type: NEW VARIABLE 14\n\"];\n14->15;\n15[label=\"Node Type: NEW VARIABLE 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: NEW VARIABLE 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: NEW VARIABLE 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: NEW VARIABLE 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: NEW VARIABLE 23\n\"];\n23->24;\n24[label=\"Node Type: NEW VARIABLE 24\n\"];\n24->25;\n25[label=\"Node Type: NEW VARIABLE 25\n\"];\n25->26;\n26[label=\"Node Type: NEW VARIABLE 26\n\"];\n26->27;\n27[label=\"Node Type: NEW VARIABLE 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: NEW VARIABLE 29\n\"];\n29->30;\n30[label=\"Node Type: NEW VARIABLE 30\n\"];\n30->31;\n31[label=\"Node Type: NEW VARIABLE 31\n\"];\n31->32;\n32[label=\"Node Type: NEW VARIABLE 32\n\"];\n32->33;\n33[label=\"Node Type: NEW VARIABLE 33\n\"];\n33->34;\n34[label=\"Node Type: NEW VARIABLE 34\n\"];\n34->35;\n35[label=\"Node Type: NEW VARIABLE 35\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/variabledeclaration-0.8.12-compact.json b/tests/ast-parsing/expected/variabledeclaration-0.8.12-compact.json new file mode 100644 index 000000000..f9182c607 --- /dev/null +++ b/tests/ast-parsing/expected/variabledeclaration-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: NEW VARIABLE 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: NEW VARIABLE 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->12;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: NEW VARIABLE 11\n\"];\n12[label=\"Node Type: IF 12\n\"];\n12->13[label=\"True\"];\n12->14[label=\"False\"];\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->15;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: END_IF 15\n\"];\n15->10;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/while-0.8.12-compact.json b/tests/ast-parsing/expected/while-0.8.12-compact.json new file mode 100644 index 000000000..4d9657391 --- /dev/null +++ b/tests/ast-parsing/expected/while-0.8.12-compact.json @@ -0,0 +1,5 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->3;\n3[label=\"Node Type: IF_LOOP 3\n\"];\n3->4[label=\"True\"];\n3->5[label=\"False\"];\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->3;\n5[label=\"Node Type: END_LOOP 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: BEGIN_LOOP 7\n\"];\n7->8;\n8[label=\"Node Type: IF_LOOP 8\n\"];\n8->9[label=\"True\"];\n8->10[label=\"False\"];\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->8;\n10[label=\"Node Type: END_LOOP 10\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.7.5-compact.json b/tests/ast-parsing/expected/yul-0.7.5-compact.json index 04cb49aa8..c180eeda7 100644 --- a/tests/ast-parsing/expected/yul-0.7.5-compact.json +++ b/tests/ast-parsing/expected/yul-0.7.5-compact.json @@ -1,6 +1,5 @@ { - "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.7.5-legacy.json b/tests/ast-parsing/expected/yul-0.7.5-legacy.json index a9569a2fb..915f1d3c4 100644 --- a/tests/ast-parsing/expected/yul-0.7.5-legacy.json +++ b/tests/ast-parsing/expected/yul-0.7.5-legacy.json @@ -1,6 +1,5 @@ { - "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.7.6-compact.json b/tests/ast-parsing/expected/yul-0.7.6-compact.json index 04cb49aa8..c180eeda7 100644 --- a/tests/ast-parsing/expected/yul-0.7.6-compact.json +++ b/tests/ast-parsing/expected/yul-0.7.6-compact.json @@ -1,6 +1,5 @@ { - "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n" + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.7.6-legacy.json b/tests/ast-parsing/expected/yul-0.7.6-legacy.json index a9569a2fb..915f1d3c4 100644 --- a/tests/ast-parsing/expected/yul-0.7.6-legacy.json +++ b/tests/ast-parsing/expected/yul-0.7.6-legacy.json @@ -1,6 +1,5 @@ { - "L": {}, "C": { - "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n}\n" + "f(bytes)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n}\n" } } \ No newline at end of file diff --git a/tests/ast-parsing/expected/yul-0.8.12-compact.json b/tests/ast-parsing/expected/yul-0.8.12-compact.json new file mode 100644 index 000000000..c7716d2db --- /dev/null +++ b/tests/ast-parsing/expected/yul-0.8.12-compact.json @@ -0,0 +1,7 @@ +{ + "L": {}, + "C": { + "f(uint256,uint256[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: INLINE ASM 3\n\"];\n3->4;\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: NEW VARIABLE 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: NEW VARIABLE 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: NEW VARIABLE 10\n\"];\n10->11;\n11[label=\"Node Type: EXPRESSION 11\n\"];\n11->12;\n12[label=\"Node Type: EXPRESSION 12\n\"];\n12->13;\n13[label=\"Node Type: EXPRESSION 13\n\"];\n13->14;\n14[label=\"Node Type: EXPRESSION 14\n\"];\n14->15;\n15[label=\"Node Type: EXPRESSION 15\n\"];\n15->16;\n16[label=\"Node Type: NEW VARIABLE 16\n\"];\n16->17;\n17[label=\"Node Type: EXPRESSION 17\n\"];\n17->18;\n18[label=\"Node Type: NEW VARIABLE 18\n\"];\n18->19;\n19[label=\"Node Type: EXPRESSION 19\n\"];\n19->20;\n20[label=\"Node Type: NEW VARIABLE 20\n\"];\n20->21;\n21[label=\"Node Type: EXPRESSION 21\n\"];\n21->22;\n22[label=\"Node Type: NEW VARIABLE 22\n\"];\n22->23;\n23[label=\"Node Type: EXPRESSION 23\n\"];\n23->24;\n24[label=\"Node Type: EXPRESSION 24\n\"];\n24->25;\n25[label=\"Node Type: EXPRESSION 25\n\"];\n25->26;\n26[label=\"Node Type: EXPRESSION 26\n\"];\n26->27;\n27[label=\"Node Type: EXPRESSION 27\n\"];\n27->28;\n28[label=\"Node Type: NEW VARIABLE 28\n\"];\n28->29;\n29[label=\"Node Type: EXPRESSION 29\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: INLINE ASM 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/helper/interface_with_struct.sol b/tests/ast-parsing/helper/interface_with_struct.sol new file mode 100644 index 000000000..777d8f824 --- /dev/null +++ b/tests/ast-parsing/helper/interface_with_struct.sol @@ -0,0 +1,6 @@ + +interface I{ + struct St{ + uint a; + } +} diff --git a/tests/ast-parsing/import_interface_with_struct_from_top_level-0.4.0.sol b/tests/ast-parsing/import_interface_with_struct_from_top_level-0.4.0.sol new file mode 100644 index 000000000..8b1a39374 --- /dev/null +++ b/tests/ast-parsing/import_interface_with_struct_from_top_level-0.4.0.sol @@ -0,0 +1 @@ +// empty diff --git a/tests/ast-parsing/import_interface_with_struct_from_top_level-0.7.6.sol b/tests/ast-parsing/import_interface_with_struct_from_top_level-0.7.6.sol new file mode 100644 index 000000000..d4c488363 --- /dev/null +++ b/tests/ast-parsing/import_interface_with_struct_from_top_level-0.7.6.sol @@ -0,0 +1,5 @@ +import "./helper/interface_with_struct.sol"; + +struct St{ + I.St st; +} diff --git a/tests/ast-parsing/top_level_variable-0.4.0.sol b/tests/ast-parsing/top_level_variable-0.4.0.sol new file mode 100644 index 000000000..0071aeb23 --- /dev/null +++ b/tests/ast-parsing/top_level_variable-0.4.0.sol @@ -0,0 +1 @@ +contract A{} // not available before 0.8 diff --git a/tests/ast-parsing/top_level_variable-0.8.0.sol b/tests/ast-parsing/top_level_variable-0.8.0.sol new file mode 100644 index 000000000..c3f76f301 --- /dev/null +++ b/tests/ast-parsing/top_level_variable-0.8.0.sol @@ -0,0 +1,17 @@ +uint constant A = 10; + +struct St{ + uint[A] b; +} + +function f() returns(uint){ + return A; +} + +contract T{ + function g() public{ + f(); + } + +} + diff --git a/tests/ast-parsing/top_level_variable2-0.4.0.sol b/tests/ast-parsing/top_level_variable2-0.4.0.sol new file mode 100644 index 000000000..0071aeb23 --- /dev/null +++ b/tests/ast-parsing/top_level_variable2-0.4.0.sol @@ -0,0 +1 @@ +contract A{} // not available before 0.8 diff --git a/tests/ast-parsing/top_level_variable2-0.8.0.sol b/tests/ast-parsing/top_level_variable2-0.8.0.sol new file mode 100644 index 000000000..de99f56a8 --- /dev/null +++ b/tests/ast-parsing/top_level_variable2-0.8.0.sol @@ -0,0 +1,7 @@ +import "./top_level_variable-0.8.0.sol"; + +contract T2{ + + function h(uint[A] memory) public{ + } +} diff --git a/tests/ast-parsing/units_and_global_variables-0.8.12.sol b/tests/ast-parsing/units_and_global_variables-0.8.12.sol new file mode 100644 index 000000000..11a467304 --- /dev/null +++ b/tests/ast-parsing/units_and_global_variables-0.8.12.sol @@ -0,0 +1,119 @@ +pragma experimental ABIEncoderV2; + +contract A{} + +interface I{} + +contract Test{ + + function ether_unit() public{ + 1 wei; + 1 ether; + } + + function time_unit() public{ + 1 seconds; + 1 minutes; + 1 hours; + 1 days; + 1 weeks; + } + + function block_and_transactions() payable public{ + blockhash(0); + block.basefee; + block.chainid; + block.coinbase; + block.difficulty; + block.gaslimit; + block.number; + block.timestamp; + gasleft(); + msg.data; + msg.sender; + msg.sig; + msg.value; + block.timestamp; + tx.gasprice; + tx.origin; + } + + function abi_encode() public{ + bytes memory m; + abi.decode(m, (uint, uint)); + abi.encode(10); + abi.encodePacked(uint(10)); + bytes4 selector; + abi.encodeWithSelector(selector, 10); + string memory signature; + abi.encodeWithSignature(signature, 10); + } + + function member() public{ + bytes1 b1; + bytes32 b32; + bytes.concat(b1, b32); + string.concat("", ""); + } + + function error_handling() public{ + assert(true); + require(true); + require(true, "something"); + revert(); + revert("something"); + } + + function math_and_crypto() public{ + addmod(0, 0, 1); + mulmod(0, 0, 1); + keccak256(""); + sha256(""); + ripemd160(""); + bytes32 hash; + uint8 v; + bytes32 r; + bytes32 s; + ecrecover(hash,v,r,s); + } + + function address_related() public{ + address payable a; + a.balance; + a.code; + a.codehash; + a.send(0); + a.transfer(0); + a.call(""); + a.delegatecall(""); + a.staticcall(""); + } + + + function return_addr() internal returns(address){} + function address_edge_case() public{ + // For now slithIR loss precision on this edge case + // And create a Ref variable instead of a Temporary one + return_addr().balance; + return_addr().code; + return_addr().codehash; + } + + + function contract_related() public{ + this; + address payable a; + selfdestruct(a); + } + + function type_related() public{ + type(A).name; + type(A).creationCode; + type(A).runtimeCode; + type(I).interfaceId; + type(uint256).min; + type(uint256).min; + } + + +} diff --git a/tests/ast-parsing/yul-0.7.5.sol b/tests/ast-parsing/yul-0.7.5.sol new file mode 100644 index 000000000..a5692d48c --- /dev/null +++ b/tests/ast-parsing/yul-0.7.5.sol @@ -0,0 +1,9 @@ +contract C { + function f(bytes calldata paramA) external returns (uint256 retA) { + assembly { + retA := paramA.offset + retA := add(retA, paramA.length) + } + } + +} diff --git a/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json b/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json index dde3da906..9f63212d8 100644 --- a/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json +++ b/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json @@ -309,19 +309,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 540, - "length": 61, + "start": 1296, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -441,42 +441,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } }, { "type": "node", - "name": "this.bad0_external(bad_arr)", + "name": "event1_bad(bad_arr)", "source_mapping": { - "start": 569, - "length": 27, + "start": 1415, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 22 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 540, - "length": 61, + "start": 1296, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -596,16 +596,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } } } } ], - "description": "Function A.bad0() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#21-23) trigger an abi encoding bug:\n\t- this.bad0_external(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#22)\n", - "markdown": "Function [A.bad0()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23) trigger an abi encoding bug:\n\t- [this.bad0_external(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L22)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23", - "id": "3752da45df0ba78cc9ac01a10b398e4ad74e6ddd572764cf2f361e523a43a998", + "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#45)\n", + "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L45)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46", + "id": "144c77aebb4037fe38c2864892ecb888a4fb7d5e92e321e664b2d2226658a166", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -614,19 +614,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 726, - "length": 63, + "start": 540, + "length": 61, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31 + 21, + 22, + 23 ], "starting_column": 3, "ending_column": 4 @@ -746,42 +746,42 @@ "ending_column": 2 } }, - "signature": "bad1(A.S[3])" + "signature": "bad0()" } }, { "type": "node", - "name": "this.bad1_external(s)", + "name": "this.bad0_external(bad_arr)", "source_mapping": { - "start": 763, - "length": 21, + "start": 569, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 30 + 22 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 726, - "length": 63, + "start": 540, + "length": 61, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31 + 21, + 22, + 23 ], "starting_column": 3, "ending_column": 4 @@ -901,16 +901,16 @@ "ending_column": 2 } }, - "signature": "bad1(A.S[3])" + "signature": "bad0()" } } } } ], - "description": "Function A.bad1(A.S[3]) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#29-31) trigger an abi encoding bug:\n\t- this.bad1_external(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#30)\n", - "markdown": "Function [A.bad1(A.S[3])](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31) trigger an abi encoding bug:\n\t- [this.bad1_external(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L30)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31", - "id": "3febdd98f71332c80290c9557c5ef89ea9dbea4f520a084b0307f21b00da5010", + "description": "Function A.bad0() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#21-23) trigger an abi encoding bug:\n\t- this.bad0_external(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#22)\n", + "markdown": "Function [A.bad0()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23) trigger an abi encoding bug:\n\t- [this.bad0_external(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L22)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23", + "id": "3752da45df0ba78cc9ac01a10b398e4ad74e6ddd572764cf2f361e523a43a998", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -919,19 +919,19 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1511, - "length": 142, + "start": 726, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 29, + 30, + 31 ], "starting_column": 3, "ending_column": 4 @@ -1051,42 +1051,42 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1(A.S[3])" } }, { "type": "node", - "name": "event2_bad(s)", + "name": "this.bad1_external(s)", "source_mapping": { - "start": 1630, - "length": 18, + "start": 763, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 50 + 30 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1511, - "length": 142, + "start": 726, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 29, + 30, + 31 ], "starting_column": 3, "ending_column": 4 @@ -1206,16 +1206,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1(A.S[3])" } } } } ], - "description": "Function A.bad5() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#49-51) trigger an abi encoding bug:\n\t- event2_bad(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#50)\n", - "markdown": "Function [A.bad5()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51) trigger an abi encoding bug:\n\t- [event2_bad(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L50)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51", - "id": "e77767c95f4548636027a859ca0c63402cfb50af242f116dd3cfc5b038a4128e", + "description": "Function A.bad1(A.S[3]) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#29-31) trigger an abi encoding bug:\n\t- this.bad1_external(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#30)\n", + "markdown": "Function [A.bad1(A.S[3])](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31) trigger an abi encoding bug:\n\t- [this.bad1_external(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L30)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31", + "id": "3febdd98f71332c80290c9557c5ef89ea9dbea4f520a084b0307f21b00da5010", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1224,19 +1224,19 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 1296, - "length": 148, + "start": 852, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1356,42 +1356,42 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad2()" } }, { "type": "node", - "name": "event1_bad(bad_arr)", + "name": "b = abi.encode(bad_arr)", "source_mapping": { - "start": 1415, - "length": 24, + "start": 971, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 45 + 35 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 41 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 1296, - "length": 148, + "start": 852, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1511,16 +1511,16 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad2()" } } } } ], - "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#45)\n", - "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L45)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46", - "id": "144c77aebb4037fe38c2864892ecb888a4fb7d5e92e321e664b2d2226658a166", + "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#35)\n", + "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L35)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36", + "id": "d5860309d331920d1e3f44508fea706df75a4a7c2e93666ca96ca00ef32d7e01", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1529,19 +1529,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 852, - "length": 160, + "start": 1511, + "length": 142, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 49, + 50, + 51 ], "starting_column": 3, "ending_column": 4 @@ -1661,42 +1661,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" } }, { "type": "node", - "name": "b = abi.encode(bad_arr)", + "name": "event2_bad(s)", "source_mapping": { - "start": 971, - "length": 36, + "start": 1630, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 35 + 50 ], "starting_column": 5, - "ending_column": 41 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 852, - "length": 160, + "start": 1511, + "length": 142, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 49, + 50, + 51 ], "starting_column": 3, "ending_column": 4 @@ -1816,16 +1816,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" } } } } ], - "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#35)\n", - "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L35)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36", - "id": "d5860309d331920d1e3f44508fea706df75a4a7c2e93666ca96ca00ef32d7e01", + "description": "Function A.bad5() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#49-51) trigger an abi encoding bug:\n\t- event2_bad(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#50)\n", + "markdown": "Function [A.bad5()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51) trigger an abi encoding bug:\n\t- [event2_bad(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L50)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51", + "id": "e77767c95f4548636027a859ca0c63402cfb50af242f116dd3cfc5b038a4128e", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" diff --git a/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json b/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json index 3b7f30c22..4313bb02a 100644 --- a/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json +++ b/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json @@ -309,19 +309,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 877, - "length": 160, + "start": 1101, + "length": 154, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 39, + 40, + 41 ], "starting_column": 3, "ending_column": 4 @@ -441,42 +441,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } }, { "type": "node", - "name": "b = abi.encode(bad_arr)", + "name": "b = abi.encode(s)", "source_mapping": { - "start": 996, - "length": 36, + "start": 1220, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 35 + 40 ], "starting_column": 5, - "ending_column": 41 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 877, - "length": 160, + "start": 1101, + "length": 154, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 39, + 40, + 41 ], "starting_column": 3, "ending_column": 4 @@ -596,16 +596,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } } } } ], - "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#35)\n", - "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L35)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36", - "id": "e976cd11118a9f5aaacfe5715cef990140fd67c7a35682446aedc878b63b3b24", + "description": "Function A.bad3() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#39-41) trigger an abi encoding bug:\n\t- b = abi.encode(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#40)\n", + "markdown": "Function [A.bad3()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41) trigger an abi encoding bug:\n\t- [b = abi.encode(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L40)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41", + "id": "37e980d8d34fcffe10d2533052de986dd57c1d45700f02234332b275b532c71d", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -919,19 +919,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 1101, - "length": 154, + "start": 1321, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -1051,42 +1051,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad4()" } }, { "type": "node", - "name": "b = abi.encode(s)", + "name": "event1_bad(bad_arr)", "source_mapping": { - "start": 1220, - "length": 30, + "start": 1440, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 40 + 45 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 1101, - "length": 154, + "start": 1321, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -1206,16 +1206,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad4()" } } } } ], - "description": "Function A.bad3() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#39-41) trigger an abi encoding bug:\n\t- b = abi.encode(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#40)\n", - "markdown": "Function [A.bad3()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41) trigger an abi encoding bug:\n\t- [b = abi.encode(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L40)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41", - "id": "37e980d8d34fcffe10d2533052de986dd57c1d45700f02234332b275b532c71d", + "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#45)\n", + "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L45)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46", + "id": "6e9dfeb7f6ea7c989276fa8c5e27d71ab0f6b63ee878fb3f761dab9d07942246", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1529,19 +1529,19 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 1321, - "length": 148, + "start": 877, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1661,42 +1661,42 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad2()" } }, { "type": "node", - "name": "event1_bad(bad_arr)", + "name": "b = abi.encode(bad_arr)", "source_mapping": { - "start": 1440, - "length": 24, + "start": 996, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 45 + 35 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 41 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 1321, - "length": 148, + "start": 877, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1816,16 +1816,16 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad2()" } } } } ], - "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#45)\n", - "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L45)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46", - "id": "6e9dfeb7f6ea7c989276fa8c5e27d71ab0f6b63ee878fb3f761dab9d07942246", + "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#35)\n", + "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L35)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36", + "id": "e976cd11118a9f5aaacfe5715cef990140fd67c7a35682446aedc878b63b3b24", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" diff --git a/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json b/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json index 54595becc..b215f0e96 100644 --- a/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json +++ b/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 147, - "length": 79, + "start": 301, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -80,42 +80,42 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } }, { "type": "node", - "name": "msg.sender.send(address(this).balance)", + "name": "destination.send(address(this).balance)", "source_mapping": { - "start": 181, - "length": 38, + "start": 337, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 12 + 20 ], "starting_column": 9, - "ending_column": 47 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 147, - "length": 79, + "start": 301, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -179,16 +179,16 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } } } } ], - "description": "Test.direct() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#12)\n", - "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L12)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13", - "id": "477cc1ab9fa3d2263400e47d09146eaed3e478f5eecf7856b59d49a2a5093a1c", + "description": "Test.indirect() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#20)\n", + "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L20)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21", + "id": "4759805615df746a3d8a6c068ce885d2c18c46edf411f83ae004593958caafe7", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" @@ -197,19 +197,19 @@ "elements": [ { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 301, - "length": 82, + "start": 147, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -273,42 +273,42 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } }, { "type": "node", - "name": "destination.send(address(this).balance)", + "name": "msg.sender.send(address(this).balance)", "source_mapping": { - "start": 337, - "length": 39, + "start": 181, + "length": 38, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 20 + 12 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 301, - "length": 82, + "start": 147, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -372,16 +372,16 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } } } } ], - "description": "Test.indirect() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#20)\n", - "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L20)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21", - "id": "4759805615df746a3d8a6c068ce885d2c18c46edf411f83ae004593958caafe7", + "description": "Test.direct() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#12)\n", + "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L12)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13", + "id": "477cc1ab9fa3d2263400e47d09146eaed3e478f5eecf7856b59d49a2a5093a1c", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json b/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json index a87969ad5..0f0fe4d57 100644 --- a/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json +++ b/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 162, - "length": 79, + "start": 316, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -80,42 +80,42 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } }, { "type": "node", - "name": "msg.sender.send(address(this).balance)", + "name": "destination.send(address(this).balance)", "source_mapping": { - "start": 196, - "length": 38, + "start": 352, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 12 + 20 ], "starting_column": 9, - "ending_column": 47 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 162, - "length": 79, + "start": 316, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -179,16 +179,16 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } } } } ], - "description": "Test.direct() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#12)\n", - "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L12)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13", - "id": "90d9178119fb586af18c2298136d7f1af4d33a9b702b94d2ca0fcdbe6ee783c6", + "description": "Test.indirect() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#20)\n", + "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L20)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21", + "id": "3bf41470de6f5fec21d1da5741e7d63ee1d3b63cfd2646d697274f4495e3f1a9", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" @@ -197,19 +197,19 @@ "elements": [ { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 316, - "length": 82, + "start": 162, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -273,42 +273,42 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } }, { "type": "node", - "name": "destination.send(address(this).balance)", + "name": "msg.sender.send(address(this).balance)", "source_mapping": { - "start": 352, - "length": 39, + "start": 196, + "length": 38, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 20 + 12 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 316, - "length": 82, + "start": 162, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -372,16 +372,16 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } } } } ], - "description": "Test.indirect() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#20)\n", - "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L20)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21", - "id": "3bf41470de6f5fec21d1da5741e7d63ee1d3b63cfd2646d697274f4495e3f1a9", + "description": "Test.direct() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#12)\n", + "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L12)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13", + "id": "90d9178119fb586af18c2298136d7f1af4d33a9b702b94d2ca0fcdbe6ee783c6", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json b/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json index c6ed351f1..26dab9b12 100644 --- a/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 855, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 686, + "start": 688, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 822, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 688, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 571, + "length": 113, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 855, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 688, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 822, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 688, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 571, - "length": 113, + "start": 498, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 686, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 686, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 67, + "start": 571, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 4, 5, 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 571, - "length": 113, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 686, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 855, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 688, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 822, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 688, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 67, + "start": 571, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 855, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 688, - "length": 440, + "start": 0, + "length": 686, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 822, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 688, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 686, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 571, - "length": 113, + "start": 498, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json b/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json index 724e17bf2..ff0c4e610 100644 --- a/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 869, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 700, + "start": 702, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 836, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 578, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 869, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 836, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 4, 5, 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 578, - "length": 120, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 869, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 836, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 869, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 702, - "length": 440, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 836, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 702, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 700, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json b/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json index c6dcc82f8..20fdaf675 100644 --- a/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 869, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 700, + "start": 702, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 836, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 578, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 869, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 836, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 4, 5, 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 578, - "length": 120, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 869, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 836, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 869, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 702, - "length": 440, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 836, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 702, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 700, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json b/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json index 65bea0e79..bbf6688b3 100644 --- a/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 869, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 700, + "start": 702, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 836, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 578, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 869, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 836, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 4, 5, 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 578, - "length": 120, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 869, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 836, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 869, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 702, - "length": 440, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 836, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 702, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 700, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json b/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json index 95e4a9ebc..497e0eae9 100644 --- a/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json +++ b/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json @@ -4,23 +4,39 @@ "elements": [ { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -87,48 +103,82 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 708, - "length": 104, + "start": 995, + "length": 671, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 ], - "starting_column": 13, - "ending_column": 14 + "starting_column": 9, + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -195,16 +245,16 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } } } } ], - "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#16-18)\n", - "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L16-L18)\n", - "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20", - "id": "a8d71513166310212c49c4edecbdf8fbc3040b1cb5b5756f0ad1971ae7d4cdb1", + "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#24-44)\n", + "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L24-L44)\n", + "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45", + "id": "5964c7440a9efb78bf78544bcdc60c789e3d9dff73438108bcb07ac98d60876a", "check": "assembly", "impact": "Informational", "confidence": "High" @@ -213,39 +263,23 @@ "elements": [ { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -312,82 +346,48 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 995, - "length": 671, + "start": 708, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44 + 16, + 17, + 18 ], - "starting_column": 9, - "ending_column": 10 + "starting_column": 13, + "ending_column": 14 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -454,16 +454,16 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } } } } ], - "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#24-44)\n", - "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L24-L44)\n", - "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45", - "id": "5964c7440a9efb78bf78544bcdc60c789e3d9dff73438108bcb07ac98d60876a", + "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#16-18)\n", + "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L16-L18)\n", + "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20", + "id": "a8d71513166310212c49c4edecbdf8fbc3040b1cb5b5756f0ad1971ae7d4cdb1", "check": "assembly", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json b/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json index a0f88f577..be646d7e6 100644 --- a/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json +++ b/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json @@ -4,23 +4,39 @@ "elements": [ { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -87,48 +103,82 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 708, - "length": 104, + "start": 995, + "length": 671, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 ], - "starting_column": 13, - "ending_column": 14 + "starting_column": 9, + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -195,16 +245,16 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } } } } ], - "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#16-18)\n", - "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L16-L18)\n", - "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20", - "id": "a83582beb2c0460617fa82fbdfc38a050004e285749b17141b63e8051062248b", + "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#24-44)\n", + "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L24-L44)\n", + "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45", + "id": "5cafb3e9d7d87c17203cf2c296eeec7de6b774b2a8d71908f8cfc9b8d916cb4b", "check": "assembly", "impact": "Informational", "confidence": "High" @@ -213,39 +263,23 @@ "elements": [ { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -312,82 +346,48 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 995, - "length": 671, + "start": 708, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44 + 16, + 17, + 18 ], - "starting_column": 9, - "ending_column": 10 + "starting_column": 13, + "ending_column": 14 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -454,16 +454,16 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } } } } ], - "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#24-44)\n", - "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L24-L44)\n", - "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45", - "id": "5cafb3e9d7d87c17203cf2c296eeec7de6b774b2a8d71908f8cfc9b8d916cb4b", + "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#16-18)\n", + "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L16-L18)\n", + "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20", + "id": "a83582beb2c0460617fa82fbdfc38a050004e285749b17141b63e8051062248b", "check": "assembly", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json b/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json index c12612b52..1cef2f152 100644 --- a/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -78,42 +78,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "assert(bool)((s_a += 1) > 10)", + "name": "assert(bool)(bad2_callee())", "source_mapping": { - "start": 106, - "length": 23, + "start": 427, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 7 + 20 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -175,16 +175,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "A.bad0() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8", - "id": "a01104ede08ddc5107a2d63d851930d477642029aeef70d6cb44eb2a640b282a", + "description": "A.bad2() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21", + "id": "47c8c39b084f8d339822d44f892cb049c1a3834f52fd48d2dcef80bac56996a3", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -382,19 +382,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -456,42 +456,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "assert(bool)(bad2_callee())", + "name": "assert(bool)((s_a += 1) > 10)", "source_mapping": { - "start": 427, - "length": 21, + "start": 106, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 20 + 7 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -553,16 +553,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "A.bad2() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21", - "id": "47c8c39b084f8d339822d44f892cb049c1a3834f52fd48d2dcef80bac56996a3", + "description": "A.bad0() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8", + "id": "a01104ede08ddc5107a2d63d851930d477642029aeef70d6cb44eb2a640b282a", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json b/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json index 4a8bd498b..b4d566bd4 100644 --- a/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 77, - "length": 57, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -78,14 +78,14 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(uint256)" } }, { "type": "node", - "name": "assert(bool)((s_a += 1) > 10)", + "name": "assert(bool)((s_a += a) > 10)", "source_mapping": { - "start": 106, + "start": 224, "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", @@ -93,7 +93,7 @@ "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, "ending_column": 28 @@ -101,19 +101,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 77, - "length": 57, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -175,16 +175,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(uint256)" } } } } ], - "description": "A.bad0() (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8", - "id": "ed7344e23d057576887c7e524b215bd0b52464ce035f686bab51b271460e43a0", + "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13", + "id": "ea912d34e8adabfd2ce93ecd5723df8d2e7ebec7e66de5fc56f3304c780488b3", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -193,19 +193,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 186, - "length": 66, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -267,14 +267,14 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad0()" } }, { "type": "node", - "name": "assert(bool)((s_a += a) > 10)", + "name": "assert(bool)((s_a += 1) > 10)", "source_mapping": { - "start": 224, + "start": 106, "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", @@ -282,7 +282,7 @@ "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 12 + 7 ], "starting_column": 5, "ending_column": 28 @@ -290,19 +290,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 186, - "length": 66, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -364,16 +364,16 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad0()" } } } } ], - "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13", - "id": "ea912d34e8adabfd2ce93ecd5723df8d2e7ebec7e66de5fc56f3304c780488b3", + "description": "A.bad0() (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8", + "id": "ed7344e23d057576887c7e524b215bd0b52464ce035f686bab51b271460e43a0", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json b/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json index 32198c56d..3c1e476b2 100644 --- a/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json @@ -193,19 +193,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 186, - "length": 66, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -267,42 +267,42 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad2()" } }, { "type": "node", - "name": "assert(bool)((s_a += a) > 10)", + "name": "assert(bool)(bad2_callee())", "source_mapping": { - "start": 224, - "length": 23, + "start": 427, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 12 + 20 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 186, - "length": 66, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -364,16 +364,16 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad2()" } } } } ], - "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13", - "id": "c27ede68d9d7c6159032f3aef6bf9fa491390317da33307fa783a93c1b675bd7", + "description": "A.bad2() (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21", + "id": "6f4b2360043bf3035cc152b583d3462d8cc98e91de8577091fe3a0af569d5285", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -382,19 +382,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 398, - "length": 55, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -456,42 +456,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(uint256)" } }, { "type": "node", - "name": "assert(bool)(bad2_callee())", + "name": "assert(bool)((s_a += a) > 10)", "source_mapping": { - "start": 427, - "length": 21, + "start": 224, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 20 + 12 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 398, - "length": 55, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -553,16 +553,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(uint256)" } } } } ], - "description": "A.bad2() (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21", - "id": "6f4b2360043bf3035cc152b583d3462d8cc98e91de8577091fe3a0af569d5285", + "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13", + "id": "c27ede68d9d7c6159032f3aef6bf9fa491390317da33307fa783a93c1b675bd7", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json b/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json index e54d92406..98f36c0cd 100644 --- a/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -78,42 +78,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "assert(bool)((s_a += 1) > 10)", + "name": "assert(bool)(bad2_callee())", "source_mapping": { - "start": 106, - "length": 23, + "start": 427, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 7 + 20 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -175,16 +175,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "A.bad0() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8", - "id": "a710d11e5510f0eb3acb2c1ec524779253f25bf2931bce4cb9c5c048ec586b80", + "description": "A.bad2() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21", + "id": "4b31923b05dec7d68f1bf133b986b4ec06fcc82ff3b8f0414d3ee3d623b69265", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -382,19 +382,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -456,42 +456,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "assert(bool)(bad2_callee())", + "name": "assert(bool)((s_a += 1) > 10)", "source_mapping": { - "start": 427, - "length": 21, + "start": 106, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 20 + 7 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -553,16 +553,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "A.bad2() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21", - "id": "4b31923b05dec7d68f1bf133b986b4ec06fcc82ff3b8f0414d3ee3d623b69265", + "description": "A.bad0() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8", + "id": "a710d11e5510f0eb3acb2c1ec524779253f25bf2931bce4cb9c5c048ec586b80", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json index 65ca6e8cc..493f5a04c 100644 --- a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json @@ -1,148 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 173, - "length": 150, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoopBase", - "source_mapping": { - "start": 0, - "length": 325, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "destinations_base[i].transfer(i)", - "source_mapping": { - "start": 274, - "length": 32, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 11 - ], - "starting_column": 13, - "ending_column": 45 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 173, - "length": 150, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoopBase", - "source_mapping": { - "start": 0, - "length": 325, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations_base[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations_base[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L11)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13", - "id": "66e6cb3d36ce6385ebe80eb42e75cfcc0be03eee32eb49b287c75258de7433f6", - "check": "calls-loop", - "impact": "Low", - "confidence": "Medium" - }, { "elements": [ { @@ -330,24 +187,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 671, - "length": 245, + "start": 1074, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -404,47 +256,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal(address,uint256)" } }, { "type": "node", - "name": "destinations[i].transfer(i)", + "name": "a.transfer(i)", "source_mapping": { - "start": 872, - "length": 27, + "start": 1135, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 35 + 46 ], - "starting_column": 13, - "ending_column": 40 + "starting_column": 9, + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 671, - "length": 245, + "start": 1074, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -501,16 +348,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal(address,uint256)" } } } } ], - "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#35)\n", - "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L35)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37", - "id": "bcf4888be2bdca9c6e3794ed50d3a0c4cbffe97f6cafdd8c9f6b2a940f92330d", + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: a.transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [a.transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47", + "id": "29874ab93647beebd98e69e6e02bfb9e8d07d22d82990b77e1e33ea9d64caddc", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -519,19 +366,167 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad_base", "source_mapping": { - "start": 1074, - "length": 81, + "start": 173, + "length": 150, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoopBase", + "source_mapping": { + "start": 0, + "length": 325, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "destinations_base[i].transfer(i)", + "source_mapping": { + "start": 274, + "length": 32, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 11 + ], + "starting_column": 13, + "ending_column": 45 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 173, + "length": 150, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoopBase", + "source_mapping": { + "start": 0, + "length": 325, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations_base[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations_base[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L11)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13", + "id": "66e6cb3d36ce6385ebe80eb42e75cfcc0be03eee32eb49b287c75258de7433f6", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 671, + "length": 245, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -588,42 +583,47 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad2()" } }, { "type": "node", - "name": "a.transfer(i)", + "name": "destinations[i].transfer(i)", "source_mapping": { - "start": 1135, - "length": 13, + "start": 872, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 46 + 35 ], - "starting_column": 9, - "ending_column": 22 + "starting_column": 13, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1074, - "length": 81, + "start": 671, + "length": 245, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -680,16 +680,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad2()" } } } } ], - "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: a.transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#46)\n", - "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [a.transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L46)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47", - "id": "29874ab93647beebd98e69e6e02bfb9e8d07d22d82990b77e1e33ea9d64caddc", + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37", + "id": "bcf4888be2bdca9c6e3794ed50d3a0c4cbffe97f6cafdd8c9f6b2a940f92330d", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json index db0e5ff93..845e856d6 100644 --- a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json @@ -1,5 +1,194 @@ [ [ + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 922, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 35 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37", + "id": "25c86080b32e786ebc200a68d29ce99aac3f426760b120f9bd359930a78e1e31", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, { "elements": [ { @@ -326,195 +515,6 @@ "impact": "Low", "confidence": "Medium" }, - { - "elements": [ - { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 721, - "length": 263, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoop", - "source_mapping": { - "start": 352, - "length": 892, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" - } - }, - { - "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", - "source_mapping": { - "start": 922, - "length": 45, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 35 - ], - "starting_column": 13, - "ending_column": 58 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 721, - "length": 263, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoop", - "source_mapping": { - "start": 352, - "length": 892, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" - } - } - } - } - ], - "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#35)\n", - "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L35)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37", - "id": "25c86080b32e786ebc200a68d29ce99aac3f426760b120f9bd359930a78e1e31", - "check": "calls-loop", - "impact": "Low", - "confidence": "Medium" - }, { "elements": [ { diff --git a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json index adc2eed6c..15ba782b7 100644 --- a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json @@ -4,21 +4,24 @@ "elements": [ { "type": "function", - "name": "bad_base", + "name": "bad2", "source_mapping": { - "start": 180, - "length": 168, + "start": 721, + "length": 263, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -26,73 +29,96 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad2()" } }, { "type": "node", - "name": "address(uint160(destinations_base[i])).transfer(i)", + "name": "address(uint160(destinations[i])).transfer(i)", "source_mapping": { - "start": 281, - "length": 50, + "start": 922, + "length": 45, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 11 + 35 ], "starting_column": 13, - "ending_column": 63 + "ending_column": 58 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_base", + "name": "bad2", "source_mapping": { - "start": 180, - "length": 168, + "start": 721, + "length": 263, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -100,45 +126,65 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad2()" } } } } ], - "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L11)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13", - "id": "676f5509699708442e5b513a2250f8e0e64781b139d2eafd86273c17528a16ce", + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37", + "id": "3b1948778e97667e6e749205edf70beeac8b8db364e68da43900136e2e7f4c8b", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -330,24 +376,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad_base", "source_mapping": { - "start": 721, - "length": 263, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -355,96 +398,73 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 922, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 35 + 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad_base", "source_mapping": { - "start": 721, - "length": 263, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -452,65 +472,45 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#35)\n", - "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L35)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37", - "id": "3b1948778e97667e6e749205edf70beeac8b8db364e68da43900136e2e7f4c8b", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L11)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13", + "id": "676f5509699708442e5b513a2250f8e0e64781b139d2eafd86273c17528a16ce", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json index ec02650f1..e57b9b63d 100644 --- a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json @@ -4,21 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_base", + "name": "bad3_internal", "source_mapping": { - "start": 180, - "length": 168, + "start": 1142, + "length": 99, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -26,73 +24,91 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad3_internal(address,uint256)" } }, { "type": "node", - "name": "address(uint160(destinations_base[i])).transfer(i)", + "name": "address(uint160(a)).transfer(i)", "source_mapping": { - "start": 281, - "length": 50, + "start": 1203, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 11 + 46 ], - "starting_column": 13, - "ending_column": 63 + "starting_column": 9, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_base", + "name": "bad3_internal", "source_mapping": { - "start": 180, - "length": 168, + "start": 1142, + "length": 99, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -100,45 +116,65 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad3_internal(address,uint256)" } } } } ], - "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13", - "id": "2cb70798cc39fa47453799bd93bf9275930f21bcbfb2746e57cf2b77700b8cd8", + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47", + "id": "2834a80b6dbcd04a8c58bd803038e5f03936c886067d1ee39d0a31d0bb9e88ae", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -147,21 +183,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 562, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -169,93 +205,73 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 653, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 26 + 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 562, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -263,65 +279,45 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#26)\n", - "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L26)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28", - "id": "f11a3c532d51a71adce3b5df738ce354d0a70ea3be928459582028cb72b5fdbd", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13", + "id": "2cb70798cc39fa47453799bd93bf9275930f21bcbfb2746e57cf2b77700b8cd8", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -519,19 +515,21 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad", "source_mapping": { - "start": 1142, - "length": 99, + "start": 562, + "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -588,42 +586,44 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad()" } }, { "type": "node", - "name": "address(uint160(a)).transfer(i)", + "name": "address(uint160(destinations[i])).transfer(i)", "source_mapping": { - "start": 1203, - "length": 31, + "start": 653, + "length": 45, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 46 + 26 ], - "starting_column": 9, - "ending_column": 40 + "starting_column": 13, + "ending_column": 58 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad", "source_mapping": { - "start": 1142, - "length": 99, + "start": 562, + "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -680,16 +680,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad()" } } } } ], - "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#46)\n", - "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L46)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47", - "id": "2834a80b6dbcd04a8c58bd803038e5f03936c886067d1ee39d0a31d0bb9e88ae", + "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#26)\n", + "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L26)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28", + "id": "f11a3c532d51a71adce3b5df738ce354d0a70ea3be928459582028cb72b5fdbd", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json index eda067155..8f6ef570b 100644 --- a/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json index 2850554d5..176391911 100644 --- a/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json index f8abb572e..0400ec6bd 100644 --- a/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json index 06c372051..a55359c4e 100644 --- a/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json b/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json index 6c948ac12..dde8683e5 100644 --- a/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json +++ b/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "test_view_bug", + "name": "test_constant_bug", "source_mapping": { - "start": 45, - "length": 58, + "start": 113, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constant-function-state/0.4.25/constant.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constant-function-state/0.4.25/constant.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -64,7 +64,7 @@ "ending_column": 2 } }, - "signature": "test_view_bug()" + "signature": "test_constant_bug()" } }, { @@ -130,10 +130,10 @@ } } ], - "description": "Constant.test_view_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", - "markdown": "[Constant.test_view_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", - "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7", - "id": "4dee61d8835d20c6f1f7c195d8bd1e9de5dbcc096396a5b8db391136f9f5fdf1", + "description": "Constant.test_constant_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", + "markdown": "[Constant.test_constant_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", + "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11", + "id": "145e2d34dfc5b932c8d67d480c0eaec9baa8c728e2a310529572c0c4a5c6046a", "additional_fields": { "contains_assembly": false }, @@ -145,19 +145,19 @@ "elements": [ { "type": "function", - "name": "test_constant_bug", + "name": "test_view_bug", "source_mapping": { - "start": 113, - "length": 66, + "start": 45, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constant-function-state/0.4.25/constant.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constant-function-state/0.4.25/constant.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 5, + 6, + 7 ], "starting_column": 5, "ending_column": 6 @@ -205,7 +205,7 @@ "ending_column": 2 } }, - "signature": "test_constant_bug()" + "signature": "test_view_bug()" } }, { @@ -271,10 +271,10 @@ } } ], - "description": "Constant.test_constant_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", - "markdown": "[Constant.test_constant_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", - "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11", - "id": "145e2d34dfc5b932c8d67d480c0eaec9baa8c728e2a310529572c0c4a5c6046a", + "description": "Constant.test_view_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", + "markdown": "[Constant.test_view_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", + "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7", + "id": "4dee61d8835d20c6f1f7c195d8bd1e9de5dbcc096396a5b8db391136f9f5fdf1", "additional_fields": { "contains_assembly": false }, diff --git a/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json b/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json index 94fc909e0..9b24da276 100644 --- a/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json +++ b/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json @@ -268,20 +268,20 @@ }, { "type": "node", - "name": "a.x.length = param", + "name": "b.subStruct.x.length = param + 1", "source_mapping": { - "start": 818, - "length": 18, + "start": 964, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "is_dependency": false, "lines": [ - 36 + 41 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 41 }, "type_specific_fields": { "parent": { @@ -394,10 +394,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#36)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L36)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- b.subStruct.x.length = param + 1 (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#41)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [b.subStruct.x.length = param + 1](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L41)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46", - "id": "f455c672028771f21282b59fb58b5eac51185eae4ac44e65a2e1f4df6db0c6e4", + "id": "82175a5c24c40a1afe4c59f4271a2c12e577ad25e89e6e319e47b4f8f2a76943", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" @@ -469,20 +469,20 @@ }, { "type": "node", - "name": "b.subStruct.x.length = param + 1", + "name": "a.x.length = param", "source_mapping": { - "start": 964, - "length": 32, + "start": 818, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "is_dependency": false, "lines": [ - 41 + 36 ], "starting_column": 9, - "ending_column": 41 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -595,10 +595,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- b.subStruct.x.length = param + 1 (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#41)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [b.subStruct.x.length = param + 1](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L41)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#36)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L36)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46", - "id": "82175a5c24c40a1afe4c59f4271a2c12e577ad25e89e6e319e47b4f8f2a76943", + "id": "f455c672028771f21282b59fb58b5eac51185eae4ac44e65a2e1f4df6db0c6e4", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json b/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json index 23ff3a166..58c382f8a 100644 --- a/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json +++ b/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json @@ -67,9 +67,9 @@ }, { "type": "node", - "name": "arr.length = param", + "name": "a.x.length = param", "source_mapping": { - "start": 527, + "start": 818, "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", @@ -77,10 +77,10 @@ "filename_short": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", "is_dependency": false, "lines": [ - 26 + 36 ], - "starting_column": 13, - "ending_column": 31 + "starting_column": 9, + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -193,10 +193,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- arr.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#26)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [arr.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L26)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#36)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L36)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46", - "id": "5120add82e5b674971638ddcd430301e4fd0ff0abc12b425d78bb09baa519dd0", + "id": "3ee7c4c1f07506f88bcd3b42a86641b32b24a3978768cbcb99301bd8a1fcb975", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" @@ -268,9 +268,9 @@ }, { "type": "node", - "name": "a.x.length = param", + "name": "arr.length = param", "source_mapping": { - "start": 818, + "start": 527, "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", @@ -278,10 +278,10 @@ "filename_short": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", "is_dependency": false, "lines": [ - 36 + 26 ], - "starting_column": 9, - "ending_column": 27 + "starting_column": 13, + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -394,10 +394,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#36)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L36)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- arr.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#26)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [arr.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L26)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46", - "id": "3ee7c4c1f07506f88bcd3b42a86641b32b24a3978768cbcb99301bd8a1fcb975", + "id": "5120add82e5b674971638ddcd430301e4fd0ff0abc12b425d78bb09baa519dd0", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json b/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json index 568e9e66f..2416b6981 100644 --- a/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json +++ b/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json @@ -4,20 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -65,43 +64,42 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(data)", + "name": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": { - "start": 201, - "length": 27, + "start": 400, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 10 + 19 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 57 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -149,16 +147,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } } } } ], - "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#10)\n", - "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L10)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11", - "id": "90d4f387ca3c669975a3ed4d7a5b09665b786a1078e16ced61adf1c3f9f6efb8", + "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#19)\n", + "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L19)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20", + "id": "12d6ba2d0139326b442352b37028ff77dfbdc625870a5ae858e6107cfa89cfbb", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" @@ -167,19 +165,20 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -227,42 +226,43 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(abi.encode(func_id,data))", + "name": "addr_bad.delegatecall(data)", "source_mapping": { - "start": 400, - "length": 48, + "start": 201, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 19 + 10 ], "starting_column": 9, - "ending_column": 57 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -310,16 +310,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } } } } ], - "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#19)\n", - "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L19)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20", - "id": "12d6ba2d0139326b442352b37028ff77dfbdc625870a5ae858e6107cfa89cfbb", + "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#10)\n", + "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L10)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11", + "id": "90d4f387ca3c669975a3ed4d7a5b09665b786a1078e16ced61adf1c3f9f6efb8", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json b/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json index b7aece8b0..499f7eca4 100644 --- a/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json +++ b/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json @@ -4,20 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -65,43 +64,42 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(data)", + "name": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": { - "start": 201, - "length": 27, + "start": 400, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 10 + 19 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 57 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -149,16 +147,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } } } } ], - "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#10)\n", - "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L10)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11", - "id": "bed67f615a2f3a872e24eedf23fdedbdfbe5a540dc3f3ea4ca1430581997a8f6", + "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#19)\n", + "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L19)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20", + "id": "82fc8a33f6b16eff457087ec9961f2bce3c61289628dac8284009c8275cea790", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" @@ -167,19 +165,20 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -227,42 +226,43 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(abi.encode(func_id,data))", + "name": "addr_bad.delegatecall(data)", "source_mapping": { - "start": 400, - "length": 48, + "start": 201, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 19 + 10 ], "starting_column": 9, - "ending_column": 57 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -310,16 +310,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } } } } ], - "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#19)\n", - "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L19)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20", - "id": "82fc8a33f6b16eff457087ec9961f2bce3c61289628dac8284009c8275cea790", + "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#10)\n", + "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L10)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11", + "id": "bed67f615a2f3a872e24eedf23fdedbdfbe5a540dc3f3ea4ca1430581997a8f6", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json b/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json index 9de54f65d..1ec75f762 100644 --- a/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json +++ b/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json @@ -4,20 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -65,43 +64,42 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(data)", + "name": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": { - "start": 201, - "length": 27, + "start": 400, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 10 + 19 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 57 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -149,16 +147,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } } } } ], - "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#10)\n", - "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L10)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11", - "id": "59a70e53c14de214629ffde4abab9700cbb3bc66a99e281954e3b9f285a28c2d", + "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#19)\n", + "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L19)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20", + "id": "04a4aed45b4c803d9fa03d70198a8f6d7f4228d2fd5e06bd61c4c68431be2c90", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" @@ -167,19 +165,20 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -227,42 +226,43 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(abi.encode(func_id,data))", + "name": "addr_bad.delegatecall(data)", "source_mapping": { - "start": 400, - "length": 48, + "start": 201, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 19 + 10 ], "starting_column": 9, - "ending_column": 57 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -310,16 +310,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } } } } ], - "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#19)\n", - "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L19)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20", - "id": "04a4aed45b4c803d9fa03d70198a8f6d7f4228d2fd5e06bd61c4c68431be2c90", + "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#10)\n", + "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L10)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11", + "id": "59a70e53c14de214629ffde4abab9700cbb3bc66a99e281954e3b9f285a28c2d", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json index c7852dff3..345256091 100644 --- a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json @@ -4,158 +4,24 @@ "elements": [ { "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "state_variable_base ++", - "source_mapping": { - "start": 271, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 7, - "ending_column": 28 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#7)\n", - "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9", - "id": "a5134568bf722ac31d7c4d41595c23e1a5ff9b79902e9502f78ccfe9a430b87a", - "check": "costly-loop", - "impact": "Informational", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +96,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", @@ -245,7 +111,7 @@ "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 31 ], "starting_column": 7, "ending_column": 23 @@ -253,21 +119,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +211,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "92dbac16da1c357bad3a24661de0e92213ac3a701d80655fadb64359ff98d21d", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "0cde1ae7c1410e0eb0d07ff2c21adc20b1c7f7a654780c8d41069ad3a34e73b4", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +229,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +318,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", @@ -467,7 +333,7 @@ "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 7, "ending_column": 23 @@ -475,24 +341,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +430,153 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "0cde1ae7c1410e0eb0d07ff2c21adc20b1c7f7a654780c8d41069ad3a34e73b4", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "92dbac16da1c357bad3a24661de0e92213ac3a701d80655fadb64359ff98d21d", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "a5134568bf722ac31d7c4d41595c23e1a5ff9b79902e9502f78ccfe9a430b87a", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json index 43b104933..6b68acaa0 100644 --- a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json @@ -141,21 +141,19 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +228,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1894, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -245,29 +243,27 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 42 ], - "starting_column": 7, - "ending_column": 23 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +338,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "94a7ffd0d3ada78ae8ace1304b276d677415a08dcdff51fc05889122e14633da", + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "6ebf2ecedb330a477079a9b72f1ba6ffc5717e08017f700538ec42d3eeab355b", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +356,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +445,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -467,7 +460,7 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 7, "ending_column": 23 @@ -475,24 +468,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +557,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "c0c91898e5b5af12af49b6aefdc4790190101774bffad8e446ba9c857ff86525", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "94a7ffd0d3ada78ae8ace1304b276d677415a08dcdff51fc05889122e14633da", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -585,19 +575,24 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -672,14 +667,14 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1894, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -687,27 +682,32 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 42 + 31 ], - "starting_column": 5, - "ending_column": 21 + "starting_column": 7, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -782,16 +782,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#42)\n", - "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L42)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43", - "id": "6ebf2ecedb330a477079a9b72f1ba6ffc5717e08017f700538ec42d3eeab355b", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "c0c91898e5b5af12af49b6aefdc4790190101774bffad8e446ba9c857ff86525", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json index a24d3b9c5..6ee6d140c 100644 --- a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json @@ -4,158 +4,24 @@ "elements": [ { "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "state_variable_base ++", - "source_mapping": { - "start": 271, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 7, - "ending_column": 28 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#7)\n", - "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9", - "id": "53602b905c8ae68d5325f0c11263f1c9b905406799ec70ca13638f4b1094c37f", - "check": "costly-loop", - "impact": "Informational", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +96,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -245,7 +111,7 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 31 ], "starting_column": 7, "ending_column": 23 @@ -253,21 +119,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +211,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "a4f559a14007167a13506a3c865345fb2c050b8d2c660804cc5e301db553822a", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "3a1b0ff0bee83dfad403a074eb81c6d845c5da8e99e98433004ba72c1b2c624c", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +229,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 1131, - "length": 343, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +316,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 1894, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -467,32 +331,27 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 42 ], - "starting_column": 7, - "ending_column": 23 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 1131, - "length": 343, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +426,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "3a1b0ff0bee83dfad403a074eb81c6d845c5da8e99e98433004ba72c1b2c624c", + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "4bb89ccd252e2233f67cccaf8b40354da7edcb7c5b36df1edfeab0cafed05b74", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -585,19 +444,158 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad_base", "source_mapping": { - "start": 1855, - "length": 60, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "53602b905c8ae68d5325f0c11263f1c9b905406799ec70ca13638f4b1094c37f", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -672,14 +670,14 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1894, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -687,27 +685,29 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 42 + 22 ], - "starting_column": 5, - "ending_column": 21 + "starting_column": 7, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad", "source_mapping": { - "start": 1855, - "length": 60, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -782,16 +782,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#42)\n", - "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L42)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43", - "id": "4bb89ccd252e2233f67cccaf8b40354da7edcb7c5b36df1edfeab0cafed05b74", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "a4f559a14007167a13506a3c865345fb2c050b8d2c660804cc5e301db553822a", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json index 265519ed2..aacfff434 100644 --- a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json @@ -4,158 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "state_variable_base ++", - "source_mapping": { - "start": 271, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 7, - "ending_column": 28 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#7)\n", - "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9", - "id": "a150cde3056e29877ab4fc8d64ce48a08db143bcb5dc2bcccae8f7848e666940", - "check": "costly-loop", - "impact": "Informational", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +91,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1894, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -245,29 +106,27 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 42 ], - "starting_column": 7, - "ending_column": 23 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +201,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "c92490750428b640ff46202b5fe9d0eb62ab98a70419cef5ca80530c15b14180", + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "77bb0a1e0308312bb9696553d6384270c433fcbebd6311e053c6979d4bdc2128", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +219,158 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad_base", "source_mapping": { - "start": 1131, - "length": 343, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "a150cde3056e29877ab4fc8d64ce48a08db143bcb5dc2bcccae8f7848e666940", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +445,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -467,7 +460,7 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 7, "ending_column": 23 @@ -475,24 +468,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +557,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "f7ebc0c37f31c1a68b8fbfe7530fd66f3c590e5631478cc88d03eeaa8c09f6a6", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "c92490750428b640ff46202b5fe9d0eb62ab98a70419cef5ca80530c15b14180", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -585,19 +575,24 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -672,14 +667,14 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1894, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -687,27 +682,32 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 42 + 31 ], - "starting_column": 5, - "ending_column": 21 + "starting_column": 7, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -782,16 +782,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#42)\n", - "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L42)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43", - "id": "77bb0a1e0308312bb9696553d6384270c433fcbebd6311e053c6979d4bdc2128", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "f7ebc0c37f31c1a68b8fbfe7530fd66f3c590e5631478cc88d03eeaa8c09f6a6", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/dead-code/0.8.0/dead-code.sol b/tests/detectors/dead-code/0.8.0/dead-code.sol index 050793f9d..309c8fb76 100644 --- a/tests/detectors/dead-code/0.8.0/dead-code.sol +++ b/tests/detectors/dead-code/0.8.0/dead-code.sol @@ -27,3 +27,7 @@ contract Test4 is Test2{ } } + +abstract contract Test5 { + function unused_but_abstract() internal virtual; +} diff --git a/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json b/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json index 01574ed8f..13b453532 100644 --- a/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json +++ b/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "unused", + "name": "unused_but_shadowed", "source_mapping": { - "start": 19, - "length": 34, + "start": 319, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4 + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -24,34 +24,34 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test", + "name": "Test4", "source_mapping": { - "start": 0, - "length": 55, + "start": 290, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5 + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "unused()" + "signature": "unused_but_shadowed()" } } ], - "description": "Test.unused() (tests/detectors/dead-code/0.8.0/dead-code.sol#2-4) is never used and should be removed\n", - "markdown": "[Test.unused()](tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4) is never used and should be removed\n", - "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4", - "id": "a7c13823116566bbbbb68e8a7efa78fe64785fcb8582069373eda7f27c523cb3", + "description": "Test4.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#26-28) is never used and should be removed\n", + "markdown": "[Test4.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28) is never used and should be removed\n", + "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28", + "id": "74ea8421cf7fa9e04d243014b61f3eee7a9c7648df98316c3881dd4f1f2ab3f7", "check": "dead-code", "impact": "Informational", "confidence": "Medium" @@ -60,19 +60,19 @@ "elements": [ { "type": "function", - "name": "unused_but_shadowed", + "name": "unused", "source_mapping": { - "start": 79, - "length": 55, + "start": 19, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 2, + 3, + 4 ], "starting_column": 5, "ending_column": 6 @@ -80,35 +80,34 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Test", "source_mapping": { - "start": 58, - "length": 78, + "start": 0, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12, - 13 + 1, + 2, + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "unused_but_shadowed()" + "signature": "unused()" } } ], - "description": "Test2.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#10-12) is never used and should be removed\n", - "markdown": "[Test2.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12) is never used and should be removed\n", - "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12", - "id": "aaba496684b73955e90b555de174e1cd03f0fee337849c4d58c10ef76ff93582", + "description": "Test.unused() (tests/detectors/dead-code/0.8.0/dead-code.sol#2-4) is never used and should be removed\n", + "markdown": "[Test.unused()](tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4) is never used and should be removed\n", + "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4", + "id": "a7c13823116566bbbbb68e8a7efa78fe64785fcb8582069373eda7f27c523cb3", "check": "dead-code", "impact": "Informational", "confidence": "Medium" @@ -119,17 +118,17 @@ "type": "function", "name": "unused_but_shadowed", "source_mapping": { - "start": 319, - "length": 56, + "start": 79, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28 + 10, + 11, + 12 ], "starting_column": 5, "ending_column": 6 @@ -137,21 +136,22 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test4", + "name": "Test2", "source_mapping": { - "start": 290, - "length": 87, + "start": 58, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29 + 8, + 9, + 10, + 11, + 12, + 13 ], "starting_column": 1, "ending_column": 2 @@ -161,10 +161,10 @@ } } ], - "description": "Test4.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#26-28) is never used and should be removed\n", - "markdown": "[Test4.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28) is never used and should be removed\n", - "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28", - "id": "74ea8421cf7fa9e04d243014b61f3eee7a9c7648df98316c3881dd4f1f2ab3f7", + "description": "Test2.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#10-12) is never used and should be removed\n", + "markdown": "[Test2.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12) is never used and should be removed\n", + "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12", + "id": "aaba496684b73955e90b555de174e1cd03f0fee337849c4d58c10ef76ff93582", "check": "dead-code", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json index 87a7649c6..a50603974 100644 --- a/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json @@ -4,21 +4,23 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -75,14 +77,14 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 188, + "start": 931, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", @@ -90,29 +92,31 @@ "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 7 + 28 ], - "starting_column": 13, - "ending_column": 101 + "starting_column": 17, + "ending_column": 105 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -169,16 +173,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9", - "id": "e057dff3814f9be2d5eca53fe80f41323b8ed90d20bb1e33600bb4e043c40b66", + "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#28)\n", + "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L28)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31", + "id": "77dda07eb6e2fe62ccfc45730422fa556ee775c1f6686148258f1ccc76c86491", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -370,23 +374,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 738, - "length": 312, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -443,14 +445,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 931, + "start": 188, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", @@ -458,31 +460,29 @@ "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 28 + 7 ], - "starting_column": 17, - "ending_column": 105 + "starting_column": 13, + "ending_column": 101 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 738, - "length": 312, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -539,16 +539,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#28)\n", - "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L28)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31", - "id": "77dda07eb6e2fe62ccfc45730422fa556ee775c1f6686148258f1ccc76c86491", + "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9", + "id": "e057dff3814f9be2d5eca53fe80f41323b8ed90d20bb1e33600bb4e043c40b66", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json index a4e0ae28e..191dee79b 100644 --- a/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json @@ -4,21 +4,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 232, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -75,14 +75,14 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 188, + "start": 627, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", @@ -90,7 +90,7 @@ "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 7 + 21 ], "starting_column": 13, "ending_column": 101 @@ -98,21 +98,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 232, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -169,16 +169,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address[])" } } } } ], - "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9", - "id": "dfa0a166dfe43235e3fbeab4eadd8b0c7c612cd2fefe3cf281d909129b3b824e", + "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#21)\n", + "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L21)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23", + "id": "50e1b9196dcf1e1d7678184956c7a9d3ba470ab23d7be04163d366b092e2df41", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -187,21 +187,21 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -258,14 +258,14 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 627, + "start": 188, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", @@ -273,7 +273,7 @@ "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 21 + 7 ], "starting_column": 13, "ending_column": 101 @@ -281,21 +281,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -352,16 +352,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#21)\n", - "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L21)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23", - "id": "50e1b9196dcf1e1d7678184956c7a9d3ba470ab23d7be04163d366b092e2df41", + "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9", + "id": "dfa0a166dfe43235e3fbeab4eadd8b0c7c612cd2fefe3cf281d909129b3b824e", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json index f0e3397ef..826185128 100644 --- a/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json @@ -187,21 +187,23 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 496, - "length": 236, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -258,14 +260,14 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad3(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 627, + "start": 931, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", @@ -273,29 +275,31 @@ "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 21 + 28 ], - "starting_column": 13, - "ending_column": 101 + "starting_column": 17, + "ending_column": 105 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 496, - "length": 236, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -352,16 +356,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#21)\n", - "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L21)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23", - "id": "a7f58e5431f4817c8f3e39d7efdb1b1633316d9be3fd73669e509ec33b6bd2d3", + "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#28)\n", + "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L28)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31", + "id": "40cecf9f87caeb930a800e6eb9c668fd6ca5077af3176e48af13c4892bcaf419", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -370,23 +374,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -443,14 +445,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 931, + "start": 627, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", @@ -458,31 +460,29 @@ "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 28 + 21 ], - "starting_column": 17, - "ending_column": 105 + "starting_column": 13, + "ending_column": 101 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -539,16 +539,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#28)\n", - "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L28)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31", - "id": "40cecf9f87caeb930a800e6eb9c668fd6ca5077af3176e48af13c4892bcaf419", + "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#21)\n", + "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L21)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23", + "id": "a7f58e5431f4817c8f3e39d7efdb1b1633316d9be3fd73669e509ec33b6bd2d3", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json index 2d1d81a84..dbddda99c 100644 --- a/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json @@ -4,21 +4,23 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -75,14 +77,14 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 188, + "start": 931, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", @@ -90,29 +92,31 @@ "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 7 + 28 ], - "starting_column": 13, - "ending_column": 101 + "starting_column": 17, + "ending_column": 105 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -169,16 +173,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9", - "id": "b810117268c82cb0e2ba1fce4549cef820197f59c877fd5f0701661a0f7bbf47", + "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#28)\n", + "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L28)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31", + "id": "0bacdb8b28979c680bd97f07b6a7e17d687dde34b125b23d9d71514d37d5e863", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -187,21 +191,21 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -258,14 +262,14 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 627, + "start": 188, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", @@ -273,7 +277,7 @@ "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 21 + 7 ], "starting_column": 13, "ending_column": 101 @@ -281,21 +285,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -352,16 +356,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#21)\n", - "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L21)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23", - "id": "c09bee70334dcac1e61b8295e12f2928ec522c8a0682f6068e6c283361ab1e59", + "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9", + "id": "b810117268c82cb0e2ba1fce4549cef820197f59c877fd5f0701661a0f7bbf47", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -370,23 +374,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -443,14 +445,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 931, + "start": 627, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", @@ -458,31 +460,29 @@ "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 28 + 21 ], - "starting_column": 17, - "ending_column": 105 + "starting_column": 13, + "ending_column": 101 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -539,16 +539,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#28)\n", - "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L28)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31", - "id": "0bacdb8b28979c680bd97f07b6a7e17d687dde34b125b23d9d71514d37d5e863", + "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#21)\n", + "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L21)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23", + "id": "c09bee70334dcac1e61b8295e12f2928ec522c8a0682f6068e6c283361ab1e59", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json index d15b49ba2..04072e38a 100644 --- a/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1090, - "length": 53, + "start": 1148, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1148, - "length": 59, + "start": 1090, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json index 8229619e6..f3aaa1eea 100644 --- a/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1090, - "length": 53, + "start": 1148, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1148, - "length": 59, + "start": 1090, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json index 762efcbbb..ab323ee58 100644 --- a/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1204, - "length": 53, + "start": 1262, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1262, - "length": 59, + "start": 1204, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json index 37cae9bd2..b9930721b 100644 --- a/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1204, - "length": 53, + "start": 1262, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1262, - "length": 59, + "start": 1204, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json index 39425ad2e..de19c0391 100644 --- a/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 46, - "length": 51, + "start": 102, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 56 + "ending_column": 60 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 102, - "length": 55, + "start": 319, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 60 + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 162, - "length": 69, + "start": 273, + "length": 41, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 74 + "ending_column": 46 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 236, - "length": 32, + "start": 162, + "length": 69, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 37 + "ending_column": 74 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 273, - "length": 41, + "start": 236, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 46 + "ending_column": 37 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 319, - "length": 60, + "start": 46, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 65 + "ending_column": 56 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json index c1495435c..aa29d1e15 100644 --- a/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 49, - "length": 51, + "start": 105, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 56 + "ending_column": 60 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 105, - "length": 55, + "start": 322, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 60 + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 165, - "length": 69, + "start": 276, + "length": 41, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 74 + "ending_column": 46 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 239, - "length": 32, + "start": 165, + "length": 69, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 37 + "ending_column": 74 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 276, - "length": 41, + "start": 239, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 46 + "ending_column": 37 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 322, - "length": 60, + "start": 49, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 65 + "ending_column": 56 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json index a8cdb0cf2..fc5ca5ff1 100644 --- a/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 58, - "length": 59, + "start": 122, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 68 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 122, - "length": 63, + "start": 371, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 68 + "ending_column": 73 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 190, - "length": 77, + "start": 317, + "length": 49, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 82 + "ending_column": 54 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 272, - "length": 40, + "start": 190, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 45 + "ending_column": 82 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 317, - "length": 49, + "start": 272, + "length": 40, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 54 + "ending_column": 45 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 371, - "length": 68, + "start": 58, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 73 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json index 3817f3cbc..5bf734be6 100644 --- a/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 58, - "length": 59, + "start": 122, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 68 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 122, - "length": 63, + "start": 371, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 68 + "ending_column": 73 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 190, - "length": 77, + "start": 317, + "length": 49, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 82 + "ending_column": 54 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 272, - "length": 40, + "start": 190, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 45 + "ending_column": 82 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 317, - "length": 49, + "start": 272, + "length": 40, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 54 + "ending_column": 45 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 371, - "length": 68, + "start": 58, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 73 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json index 59ceb015b..76e458068 100644 --- a/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json @@ -32,50 +32,58 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 50, - "length": 56, + "start": 723, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 53 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 26, - "length": 82, + "start": 109, + "length": 739, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 140, - "length": 44, + "start": 549, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 189, - "length": 44, + "start": 351, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 101 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 238, - "length": 108, + "start": 140, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 113 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 351, - "length": 96, + "start": 189, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 101 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 549, - "length": 78, + "start": 50, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 83 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 109, - "length": 739, + "start": 26, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 723, - "length": 48, + "start": 238, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 53 + "ending_column": 113 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json index 6d2d85db1..a13a1c586 100644 --- a/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json @@ -32,50 +32,58 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 53, - "length": 56, + "start": 735, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 53 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 29, - "length": 82, + "start": 112, + "length": 748, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 143, - "length": 44, + "start": 561, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 192, - "length": 44, + "start": 363, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 101 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 241, - "length": 117, + "start": 143, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 122 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 363, - "length": 96, + "start": 192, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 101 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 561, - "length": 78, + "start": 53, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 83 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 112, - "length": 748, + "start": 29, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 735, - "length": 48, + "start": 241, + "length": 117, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 53 + "ending_column": 122 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json index 114390883..4ff50f733 100644 --- a/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json @@ -32,9 +32,9 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 53, + "start": 800, "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", @@ -42,7 +42,7 @@ "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, "ending_column": 61 @@ -50,32 +50,40 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 29, - "length": 82, + "start": 112, + "length": 829, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 152, - "length": 52, + "start": 610, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 91 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 209, - "length": 52, + "start": 396, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 109 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 266, - "length": 125, + "start": 152, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 130 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 396, - "length": 104, + "start": 209, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 109 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 610, - "length": 86, + "start": 53, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 91 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 112, - "length": 829, + "start": 29, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 800, - "length": 56, + "start": 266, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 130 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json index c39d35d66..3932e5fa2 100644 --- a/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json @@ -32,9 +32,9 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 53, + "start": 800, "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", @@ -42,7 +42,7 @@ "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, "ending_column": 61 @@ -50,32 +50,40 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 29, - "length": 82, + "start": 112, + "length": 829, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 152, - "length": 52, + "start": 610, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 91 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 209, - "length": 52, + "start": 396, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 109 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 266, - "length": 125, + "start": 152, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 130 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 396, - "length": 104, + "start": 209, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 109 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 610, - "length": 86, + "start": 53, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 91 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 112, - "length": 829, + "start": 29, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 800, - "length": 56, + "start": 266, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 130 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json b/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json index 69ac9726d..59060a901 100644 --- a/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json @@ -219,19 +219,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -306,14 +307,14 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 421, + "start": 552, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", @@ -321,7 +322,7 @@ "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 25 ], "starting_column": 5, "ending_column": 21 @@ -329,19 +330,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +418,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21", - "id": "b2bf34ab3d02054c5f803cd517689d1e3d055b46ca612b2457d845d8d4b94731", + "description": "Bug.bad2(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#25) \n", + "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L25) \n", + "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26", + "id": "9411f6b4b3e6f3833a72789f341adf88796bcb58b4a12a47a6f7117746d09c53", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -434,20 +436,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -522,14 +523,14 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 552, + "start": 421, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", @@ -537,7 +538,7 @@ "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 25 + 20 ], "starting_column": 5, "ending_column": 21 @@ -545,20 +546,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -633,16 +633,16 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad2(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#25) \n", - "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L25) \n", - "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26", - "id": "9411f6b4b3e6f3833a72789f341adf88796bcb58b4a12a47a6f7117746d09c53", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21", + "id": "b2bf34ab3d02054c5f803cd517689d1e3d055b46ca612b2457d845d8d4b94731", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json b/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json index fa6822d62..5fd204de5 100644 --- a/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 284, - "length": 76, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -91,42 +92,43 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2(address)" } }, { "type": "node", - "name": "owner = msg.sender", + "name": "owner = newOwner", "source_mapping": { - "start": 325, - "length": 18, + "start": 552, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 16 + 25 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 284, - "length": 76, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -201,16 +203,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } } } ], - "description": "Bug.bad0() (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#16) \n", - "markdown": "[Bug.bad0()](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L16) \n", - "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17", - "id": "99e09713b41d4b164cc0f4a88f48e6d0bd94128636c57b1bee357ac1fda130d7", + "description": "Bug.bad2(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#25) \n", + "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L25) \n", + "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26", + "id": "1562e590ef85efee605bdbf837a010ad06cdb04cec40ac4a7ca7c8cc25cf4161", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -219,19 +221,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -306,42 +308,42 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } }, { "type": "node", - "name": "owner = newOwner", + "name": "owner = msg.sender", "source_mapping": { - "start": 421, - "length": 16, + "start": 325, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 16 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +418,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21", - "id": "a8b5423d1085668a105afd674978791ad0b57f1c9ab15b7db682c3dfac7a49b2", + "description": "Bug.bad0() (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#16) \n", + "markdown": "[Bug.bad0()](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L16) \n", + "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17", + "id": "99e09713b41d4b164cc0f4a88f48e6d0bd94128636c57b1bee357ac1fda130d7", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -434,20 +436,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -522,14 +523,14 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 552, + "start": 421, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", @@ -537,7 +538,7 @@ "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 25 + 20 ], "starting_column": 5, "ending_column": 21 @@ -545,20 +546,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -633,16 +633,16 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad2(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#25) \n", - "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L25) \n", - "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26", - "id": "1562e590ef85efee605bdbf837a010ad06cdb04cec40ac4a7ca7c8cc25cf4161", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21", + "id": "a8b5423d1085668a105afd674978791ad0b57f1c9ab15b7db682c3dfac7a49b2", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json b/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json index 56ea7e2fd..6065b5f9c 100644 --- a/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 284, - "length": 76, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -91,42 +91,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } }, { "type": "node", - "name": "owner = msg.sender", + "name": "owner = newOwner", "source_mapping": { - "start": 325, - "length": 18, + "start": 421, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 16 + 20 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 284, - "length": 76, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -201,16 +201,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad0() (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#16) \n", - "markdown": "[Bug.bad0()](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L16) \n", - "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17", - "id": "81ef3707d2eed91cd30ba6e7368fa40206ec32eec757bb0af632c4b7885bd92c", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21", + "id": "7dd824ee9b2f6100abf2b1e95d84c1b1393a4ab27a06676b2a5d7da164788a00", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -219,19 +219,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -306,42 +306,42 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } }, { "type": "node", - "name": "owner = newOwner", + "name": "owner = msg.sender", "source_mapping": { - "start": 421, - "length": 16, + "start": 325, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 16 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +416,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21", - "id": "7dd824ee9b2f6100abf2b1e95d84c1b1393a4ab27a06676b2a5d7da164788a00", + "description": "Bug.bad0() (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#16) \n", + "markdown": "[Bug.bad0()](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L16) \n", + "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17", + "id": "81ef3707d2eed91cd30ba6e7368fa40206ec32eec757bb0af632c4b7885bd92c", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json b/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json index 0b1ba01ff..719b1fb59 100644 --- a/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json @@ -219,19 +219,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -306,14 +307,14 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 421, + "start": 552, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", @@ -321,7 +322,7 @@ "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 25 ], "starting_column": 5, "ending_column": 21 @@ -329,19 +330,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +418,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21", - "id": "d319284c1ad2023a792ace9e7b2371966f789c5acf5ab90b1cc5935060f855f0", + "description": "Bug.bad2(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#25) \n", + "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L25) \n", + "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26", + "id": "3b63f24bd57a54fab8af7d3292bd8444c3dc834bf43dfd96be0e06ca0027299c", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -434,20 +436,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -522,14 +523,14 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 552, + "start": 421, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", @@ -537,7 +538,7 @@ "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 25 + 20 ], "starting_column": 5, "ending_column": 21 @@ -545,20 +546,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -633,16 +633,16 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad2(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#25) \n", - "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L25) \n", - "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26", - "id": "3b63f24bd57a54fab8af7d3292bd8444c3dc834bf43dfd96be0e06ca0027299c", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21", + "id": "d319284c1ad2023a792ace9e7b2371966f789c5acf5ab90b1cc5935060f855f0", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json b/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json index 45837cbba..80bade847 100644 --- a/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json +++ b/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 392, - "length": 71, + "start": 535, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 22, - 23, - 24 + 30, + 31, + 32 ], "starting_column": 3, "ending_column": 4 @@ -111,42 +111,42 @@ "ending_column": 2 } }, - "signature": "bad0(uint8)" + "signature": "bad1(int16)" } }, { "type": "node", - "name": "uprice8 = _price", + "name": "iprice16 = _price", "source_mapping": { - "start": 442, - "length": 16, + "start": 585, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 23 + 31 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 392, - "length": 71, + "start": 535, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 22, - 23, - 24 + 30, + 31, + 32 ], "starting_column": 3, "ending_column": 4 @@ -241,16 +241,16 @@ "ending_column": 2 } }, - "signature": "bad0(uint8)" + "signature": "bad1(int16)" } } } } ], - "description": "Bug.bad0(uint8) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#22-24) should emit an event for: \n\t- uprice8 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#23) \n", - "markdown": "[Bug.bad0(uint8)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24) should emit an event for: \n\t- [uprice8 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L23) \n", - "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24", - "id": "833efa3b1dab85aef7a00a7bf77bfe290cb2933e11eed34150a1e54a9644a093", + "description": "Bug.bad1(int16) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#30-32) should emit an event for: \n\t- iprice16 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#31) \n", + "markdown": "[Bug.bad1(int16)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32) should emit an event for: \n\t- [iprice16 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L31) \n", + "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32", + "id": "22cd7f2678dfbd4185d6254ad55b620bd3b20a406d88d9f53412ca97d9c3bf03", "check": "events-maths", "impact": "Low", "confidence": "Medium" @@ -259,19 +259,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 535, - "length": 72, + "start": 392, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32 + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -366,42 +366,42 @@ "ending_column": 2 } }, - "signature": "bad1(int16)" + "signature": "bad0(uint8)" } }, { "type": "node", - "name": "iprice16 = _price", + "name": "uprice8 = _price", "source_mapping": { - "start": 585, - "length": 17, + "start": 442, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 31 + 23 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 535, - "length": 72, + "start": 392, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32 + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -496,16 +496,16 @@ "ending_column": 2 } }, - "signature": "bad1(int16)" + "signature": "bad0(uint8)" } } } } ], - "description": "Bug.bad1(int16) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#30-32) should emit an event for: \n\t- iprice16 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#31) \n", - "markdown": "[Bug.bad1(int16)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32) should emit an event for: \n\t- [iprice16 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L31) \n", - "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32", - "id": "22cd7f2678dfbd4185d6254ad55b620bd3b20a406d88d9f53412ca97d9c3bf03", + "description": "Bug.bad0(uint8) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#22-24) should emit an event for: \n\t- uprice8 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#23) \n", + "markdown": "[Bug.bad0(uint8)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24) should emit an event for: \n\t- [uprice8 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L23) \n", + "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24", + "id": "833efa3b1dab85aef7a00a7bf77bfe290cb2933e11eed34150a1e54a9644a093", "check": "events-maths", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json b/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json index 0aea04515..75e76126d 100644 --- a/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json +++ b/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "start": 1420, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "start": 1381, + "length": 234, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.4.25/external_function.sol#32-39)\n", - "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.4.25/external_function.sol#L32-L39)\n", - "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L32-L39", - "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", + "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.4.25/external_function.sol#74-76)\n", + "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.4.25/external_function.sol#L74-L76)\n", + "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L74-L76", + "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", "check": "external-function", "impact": "Optimization", "confidence": "High" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "start": 554, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "start": 473, + "length": 408, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.4.25/external_function.sol#74-76)\n", - "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.4.25/external_function.sol#L74-L76)\n", - "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L74-L76", - "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", + "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.4.25/external_function.sol#32-39)\n", + "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.4.25/external_function.sol#L32-L39)\n", + "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L32-L39", + "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", "check": "external-function", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json b/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json index 340c8107a..4d947de06 100644 --- a/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json +++ b/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "start": 1420, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "start": 1381, + "length": 234, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.5.16/external_function.sol#32-39)\n", - "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.5.16/external_function.sol#L32-L39)\n", - "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L32-L39", - "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", + "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.5.16/external_function.sol#74-76)\n", + "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.5.16/external_function.sol#L74-L76)\n", + "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L74-L76", + "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", "check": "external-function", "impact": "Optimization", "confidence": "High" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "start": 554, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "start": 473, + "length": 408, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.5.16/external_function.sol#74-76)\n", - "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.5.16/external_function.sol#L74-L76)\n", - "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L74-L76", - "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", + "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.5.16/external_function.sol#32-39)\n", + "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.5.16/external_function.sol#L32-L39)\n", + "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L32-L39", + "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", "check": "external-function", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json b/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json index eee61a19f..7f600c37d 100644 --- a/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json +++ b/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "start": 1420, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.6.11/external_function.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "start": 1381, + "length": 234, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.6.11/external_function.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.6.11/external_function.sol#32-39)\n", - "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.6.11/external_function.sol#L32-L39)\n", - "first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L32-L39", - "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", + "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.6.11/external_function.sol#74-76)\n", + "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.6.11/external_function.sol#L74-L76)\n", + "first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L74-L76", + "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", "check": "external-function", "impact": "Optimization", "confidence": "High" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "start": 554, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.6.11/external_function.sol", "is_dependency": false, "lines": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "start": 473, + "length": 408, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.6.11/external_function.sol", "is_dependency": false, "lines": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.6.11/external_function.sol#74-76)\n", - "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.6.11/external_function.sol#L74-L76)\n", - "first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L74-L76", - "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", + "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.6.11/external_function.sol#32-39)\n", + "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.6.11/external_function.sol#L32-L39)\n", + "first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L32-L39", + "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", "check": "external-function", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json b/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json index 6e90c47ab..dc3662a91 100644 --- a/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json +++ b/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "start": 1420, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.7.6/external_function.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "start": 1381, + "length": 234, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.7.6/external_function.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.7.6/external_function.sol#32-39)\n", - "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.7.6/external_function.sol#L32-L39)\n", - "first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L32-L39", - "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", + "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.7.6/external_function.sol#74-76)\n", + "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.7.6/external_function.sol#L74-L76)\n", + "first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L74-L76", + "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", "check": "external-function", "impact": "Optimization", "confidence": "High" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "start": 554, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.7.6/external_function.sol", "is_dependency": false, "lines": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "start": 473, + "length": 408, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.7.6/external_function.sol", "is_dependency": false, "lines": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.7.6/external_function.sol#74-76)\n", - "markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.7.6/external_function.sol#L74-L76)\n", - "first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L74-L76", - "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", + "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.7.6/external_function.sol#32-39)\n", + "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.7.6/external_function.sol#L32-L39)\n", + "first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L32-L39", + "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", "check": "external-function", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json b/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json index bf6612ee9..cf71e9f09 100644 --- a/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json b/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json index 8ac1bfd7f..4b86fa6b3 100644 --- a/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json b/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json index 001ac77c1..fafb2911d 100644 --- a/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json b/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json index ec0366a43..a9666a183 100644 --- a/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json index c708e7cac..03c6befcb 100644 --- a/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json @@ -6,17 +6,18 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 404, - "length": 101, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -24,76 +25,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 165, - "length": 445, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", + "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", "source_mapping": { - "start": 455, - "length": 43, + "start": 683, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 22 + 33 ], "starting_column": 9, - "ending_column": 52 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad0", "source_mapping": { - "start": 404, - "length": 101, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -101,50 +152,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 165, - "length": 445, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad0()" } } } } ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23", - "id": "d887566c310fa756ee60c8a838f09bf3165adda30dff76b4d8f7bd85f6561610", + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35", + "id": "126f956451cb4dcbdac6edb66148b23eabc789962d4fa3a8bd22a682c6c5bfd4", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -153,19 +253,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad6", "source_mapping": { - "start": 511, - "length": 97, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -173,160 +276,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 562, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 511, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27", - "id": "a962a2c49344b2acce83236c339daa07cce98d240dd8869bb7d8c5e96d412ff0", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 648, - "length": 133, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestContractBalance", - "source_mapping": { - "start": 612, - "length": 1754, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", @@ -406,43 +359,45 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } }, { "type": "node", - "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 683, - "length": 51, + "start": 1635, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 33 + 68 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad6", "source_mapping": { - "start": 648, - "length": 133, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -533,16 +488,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } } } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35", - "id": "126f956451cb4dcbdac6edb66148b23eabc789962d4fa3a8bd22a682c6c5bfd4", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71", + "id": "2cc246058513fdfe2178c6e9b552bcae42d3c29bc104c3b95734323aeda57396", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -551,20 +506,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -655,43 +612,45 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 822, - "length": 51, + "start": 1450, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 61 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -782,16 +741,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40", - "id": "de67d7a1010855e47722500e73f1156c1c2c222414e661624300ea395102af1a", + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64", + "id": "781645f52e6eb4c7a0e38a58537907a6421ded2703ae8b18be68251a02901e7a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,9 +759,9 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 926, + "start": 1056, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -810,10 +769,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -904,14 +863,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 961, + "start": 1091, "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -919,7 +878,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 48 ], "starting_column": 9, "ending_column": 51 @@ -927,9 +886,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 926, + "start": 1056, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -937,10 +896,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -1031,16 +990,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45", - "id": "b6c0963403d985cfcd3eda6d43bc2716eaebcd0d936d9a57d35df4adfbb01e46", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50", + "id": "8f08cca8ee4d2d51c2bf5717f78aa1dd13c6499e430a43b89e5309f20920b11d", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,20 +1008,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, - "length": 124, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1070,126 +1028,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 1091, - "length": 42, + "start": 3106, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 132 ], "starting_column": 9, - "ending_column": 51 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, - "length": 124, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1197,99 +1123,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad3()" + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50", - "id": "8f08cca8ee4d2d51c2bf5717f78aa1dd13c6499e430a43b89e5309f20920b11d", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133", + "id": "a65d9228ffbebf6de7f455df00a0de91ee0e23c7f13a306bdc90e16e69a043b3", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1298,22 +1193,19 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1186, - "length": 170, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -1321,128 +1213,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad1(ERC20Variable)" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", "source_mapping": { - "start": 1274, - "length": 19, + "start": 562, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 54 + 26 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1186, - "length": 170, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -1450,99 +1290,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#54)\n", - "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L54)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57", - "id": "b7b40be64de7150ba57e0f2b6379c672ee431675bbab8b607a82acdd29338d42", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27", + "id": "a962a2c49344b2acce83236c339daa07cce98d240dd8869bb7d8c5e96d412ff0", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1342,205 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad0", "source_mapping": { - "start": 1362, - "length": 170, + "start": 2935, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2368, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "require(bool)(now == 0)", + "source_mapping": { + "start": 2969, + "length": 18, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 124 + ], + "starting_column": 9, + "ending_column": 27 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2935, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2368, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125", + "id": "abcb113fde0b01cb4a653968a235bf5f3ee70a6f97ae3fa68c3a161c8ca5f6b8", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 926, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1657,45 +1631,43 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(address(this).balance == 10000000000000000000)", "source_mapping": { - "start": 1450, - "length": 19, + "start": 961, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 43 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1362, - "length": 170, + "start": 926, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1786,16 +1758,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64", - "id": "781645f52e6eb4c7a0e38a58537907a6421ded2703ae8b18be68251a02901e7a", + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45", + "id": "b6c0963403d985cfcd3eda6d43bc2716eaebcd0d936d9a57d35df4adfbb01e46", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1804,22 +1776,22 @@ "elements": [ { "type": "function", - "name": "bad6", + "name": "bad4", "source_mapping": { - "start": 1538, - "length": 179, + "start": 1186, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -1910,14 +1882,14 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad4()" } }, { "type": "node", "name": "balance == 10000000000000000000", "source_mapping": { - "start": 1635, + "start": 1274, "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -1925,7 +1897,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 68 + 54 ], "starting_column": 13, "ending_column": 32 @@ -1933,22 +1905,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad6", + "name": "bad4", "source_mapping": { - "start": 1538, - "length": 179, + "start": 1186, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -2039,16 +2011,16 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad4()" } } } } ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71", - "id": "2cc246058513fdfe2178c6e9b552bcae42d3c29bc104c3b95734323aeda57396", + "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#54)\n", + "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L54)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57", + "id": "b7b40be64de7150ba57e0f2b6379c672ee431675bbab8b607a82acdd29338d42", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2057,19 +2029,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -2129,42 +2101,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(now == 0)", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 2969, - "length": 18, + "start": 3034, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 124 + 128 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -2224,16 +2196,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125", - "id": "abcb113fde0b01cb4a653968a235bf5f3ee70a6f97ae3fa68c3a161c8ca5f6b8", + "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#128)\n", + "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L128)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129", + "id": "d17755463242fbfeef570c2504ff13729a74d8633ade693da26127635b145892", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2242,19 +2214,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2262,94 +2234,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 3034, - "length": 25, + "start": 455, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 128 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2357,68 +2311,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#128)\n", - "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L128)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129", - "id": "d17755463242fbfeef570c2504ff13729a74d8633ade693da26127635b145892", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23", + "id": "d887566c310fa756ee60c8a838f09bf3165adda30dff76b4d8f7bd85f6561610", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2363,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 3072, - "length": 67, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2384,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 3106, - "length": 26, + "start": 822, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 38 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 3072, - "length": 67, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2511,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133", - "id": "a65d9228ffbebf6de7f455df00a0de91ee0e23c7f13a306bdc90e16e69a043b3", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40", + "id": "de67d7a1010855e47722500e73f1156c1c2c222414e661624300ea395102af1a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json index 30fe83e32..2fa0608b6 100644 --- a/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 404, - "length": 101, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -24,76 +24,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 165, - "length": 445, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 455, - "length": 43, + "start": 3034, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 22 + 128 ], "starting_column": 9, - "ending_column": 52 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 404, - "length": 101, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -101,50 +119,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 165, - "length": 445, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } } } } ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23", - "id": "f1b10c19ed186a854e281f6b2f29e08d5da8892045a928b0565355802998088a", + "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#128)\n", + "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L128)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129", + "id": "27fb1eed66075f0883f327ce69bfa39000a4cc6841a39342114cb892a1a0b23b", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -153,19 +189,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad6", "source_mapping": { - "start": 511, - "length": 97, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -173,160 +212,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 562, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", + "name": "TestContractBalance", "source_mapping": { - "start": 511, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27", - "id": "43d01e301a135af4627eded0afd320a3cc986834dcd0c77ccec4d85e7ac05b57", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 648, - "length": 133, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestContractBalance", - "source_mapping": { - "start": 612, - "length": 1754, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", @@ -406,43 +295,45 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } }, { "type": "node", - "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 683, - "length": 51, + "start": 1635, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 33 + 68 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad6", "source_mapping": { - "start": 648, - "length": 133, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -533,16 +424,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } } } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35", - "id": "d00ea5300293e9fe66a52421f56fbb2e48ba4ba942f1d8845e3c2e5bfbbbe66f", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71", + "id": "280c7848636dd05a32dbdff744714307aa1350aebc6031dd862af9aeb6bdebe3", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -551,20 +442,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -655,43 +548,45 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 822, - "length": 51, + "start": 1450, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 61 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -782,16 +677,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40", - "id": "aee531d35272d761a573246a7f901716f6d1aa6906a0eab19bee4f6f570eb166", + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64", + "id": "2fddf13889b45374114f11585944ef935efb365935aff518b505f01d4f6c1c97", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,20 +695,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 926, - "length": 124, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -821,126 +715,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(ERC20Variable)" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", "source_mapping": { - "start": 961, - "length": 42, + "start": 562, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 26 ], "starting_column": 9, - "ending_column": 51 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 926, - "length": 124, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -948,99 +792,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45", - "id": "7d0195ec395960b56eb4249c96481aec69f59da34ea15128734721ff1844d469", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27", + "id": "43d01e301a135af4627eded0afd320a3cc986834dcd0c77ccec4d85e7ac05b57", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,9 +844,9 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, + "start": 926, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", @@ -1059,10 +854,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1153,14 +948,14 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "require(bool)(address(this).balance == 10000000000000000000)", "source_mapping": { - "start": 1091, + "start": 961, "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", @@ -1168,7 +963,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 43 ], "starting_column": 9, "ending_column": 51 @@ -1176,9 +971,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, + "start": 926, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", @@ -1186,10 +981,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1280,16 +1075,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50", - "id": "a987ef061c48551aeeb83ad7556a7d00d13d4dc5fade167c6dc6d586738bda14", + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45", + "id": "7d0195ec395960b56eb4249c96481aec69f59da34ea15128734721ff1844d469", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1346,19 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1362, - "length": 170, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1574,128 +1366,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 1450, - "length": 19, + "start": 3106, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 132 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1362, - "length": 170, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1703,99 +1461,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64", - "id": "2fddf13889b45374114f11585944ef935efb365935aff518b505f01d4f6c1c97", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133", + "id": "9adfb849a88f90efbe4e42ae4daea709e51db6af3ae0a8bb2427d8053a832d04", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1804,22 +1531,19 @@ "elements": [ { "type": "function", - "name": "bad6", + "name": "bad0", "source_mapping": { - "start": 1538, - "length": 179, + "start": 2935, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 123, + 124, + 125 ], "starting_column": 5, "ending_column": 6 @@ -1827,30 +1551,216 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "require(bool)(now == 0)", + "source_mapping": { + "start": 2969, + "length": 18, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 124 + ], + "starting_column": 9, + "ending_column": 27 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2935, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2368, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125", + "id": "9f08ac90026e6fb8bcd20c0ab8f967fe7680689841262bb91747d967ac2564c4", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 1056, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 47, + 48, + 49, + 50 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestContractBalance", + "source_mapping": { + "start": 612, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, 44, 45, 46, @@ -1910,45 +1820,43 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad3()" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 1635, - "length": 19, + "start": 1091, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 68 + 48 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad6", + "name": "bad3", "source_mapping": { - "start": 1538, - "length": 179, + "start": 1056, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -2039,16 +1947,16 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71", - "id": "280c7848636dd05a32dbdff744714307aa1350aebc6031dd862af9aeb6bdebe3", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50", + "id": "a987ef061c48551aeeb83ad7556a7d00d13d4dc5fade167c6dc6d586738bda14", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2057,19 +1965,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2077,94 +1986,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(now == 0)", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 2969, - "length": 18, + "start": 822, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 124 + 38 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2172,68 +2113,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125", - "id": "9f08ac90026e6fb8bcd20c0ab8f967fe7680689841262bb91747d967ac2564c4", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40", + "id": "aee531d35272d761a573246a7f901716f6d1aa6906a0eab19bee4f6f570eb166", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2242,19 +2214,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2262,94 +2235,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", "source_mapping": { - "start": 3034, - "length": 25, + "start": 683, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 128 + 33 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2357,68 +2362,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + "start": 612, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#128)\n", - "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L128)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129", - "id": "27fb1eed66075f0883f327ce69bfa39000a4cc6841a39342114cb892a1a0b23b", + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35", + "id": "d00ea5300293e9fe66a52421f56fbb2e48ba4ba942f1d8845e3c2e5bfbbbe66f", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2463,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3072, - "length": 67, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2483,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 3106, - "length": 26, + "start": 455, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 22 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3072, - "length": 67, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2560,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133", - "id": "9adfb849a88f90efbe4e42ae4daea709e51db6af3ae0a8bb2427d8053a832d04", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23", + "id": "f1b10c19ed186a854e281f6b2f29e08d5da8892045a928b0565355802998088a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json index 367074b6e..6ce8aa280 100644 --- a/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json @@ -1,303 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 421, - "length": 101, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 21, - 22, - 23 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad0(ERC20Function)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", - "source_mapping": { - "start": 472, - "length": 43, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 22 - ], - "starting_column": 9, - "ending_column": 52 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 421, - "length": 101, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 21, - 22, - 23 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad0(ERC20Function)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23", - "id": "df1ee72930fcaa7dc7a92d390be6007c57953a3392aef588a852373da388d850", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 528, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 579, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 528, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27", - "id": "4d1635766db4dc0687873af3c03047d746b770bcce326793c79210ac16a5c824", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -539,10 +241,195 @@ } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35", - "id": "20756b1d1c5eb722a3edb44b8c7b2a62ca935e4e1a2491bce50856f7f4cf3f4c", + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35", + "id": "20756b1d1c5eb722a3edb44b8c7b2a62ca935e4e1a2491bce50856f7f4cf3f4c", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2952, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "require(bool)(now == 0)", + "source_mapping": { + "start": 2986, + "length": 18, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 124 + ], + "starting_column": 9, + "ending_column": 27 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2952, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125", + "id": "24de80ae388956295db544441f5ab9326af42bd4fcb34e232a23af952d7fe333", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -551,20 +438,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 804, - "length": 133, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -655,43 +542,43 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 839, - "length": 51, + "start": 1108, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 48 ], "starting_column": 9, - "ending_column": 60 + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 804, - "length": 133, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -782,16 +669,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40", - "id": "9363dbd2bb3f41b42351b088f7a973902e04ccae0081e5c99354de90890fe6ab", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50", + "id": "3cf7fef3822d0628cc1f441162960a6753d6cdcad5b8c56c84584dba741e806b", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,20 +687,22 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 943, - "length": 124, + "start": 1379, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -904,43 +793,45 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 978, - "length": 42, + "start": 1467, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 61 ], - "starting_column": 9, - "ending_column": 51 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 943, - "length": 124, + "start": 1379, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -1031,16 +922,165 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" + } + } + } + } + ], + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64", + "id": "3e416561dc117d230bbee97788f5a0ff851da92f1def8fb5d7b94461ee6bfbc0", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 528, + "length": 97, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ERC20TestBalance", + "source_mapping": { + "start": 182, + "length": 445, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1(ERC20Variable)" + } + }, + { + "type": "node", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", + "source_mapping": { + "start": 579, + "length": 39, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 26 + ], + "starting_column": 9, + "ending_column": 48 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 528, + "length": 97, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ERC20TestBalance", + "source_mapping": { + "start": 182, + "length": 445, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45", - "id": "50ab6a747d027b81a24ae04b84e6362bd184a5f23080e2af1b6a859ee144f637", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27", + "id": "4d1635766db4dc0687873af3c03047d746b770bcce326793c79210ac16a5c824", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,9 +1089,9 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1073, + "start": 943, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", @@ -1059,10 +1099,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1153,14 +1193,14 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "require(bool)(address(this).balance == 10000000000000000000)", "source_mapping": { - "start": 1108, + "start": 978, "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", @@ -1168,7 +1208,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 43 ], "starting_column": 9, "ending_column": 51 @@ -1176,9 +1216,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1073, + "start": 943, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", @@ -1186,10 +1226,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1280,16 +1320,201 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50", - "id": "3cf7fef3822d0628cc1f441162960a6753d6cdcad5b8c56c84584dba741e806b", + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45", + "id": "50ab6a747d027b81a24ae04b84e6362bd184a5f23080e2af1b6a859ee144f637", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 3017, + "length": 66, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 127, + 128, + 129 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1()" + } + }, + { + "type": "node", + "name": "require(bool)(block.number == 0)", + "source_mapping": { + "start": 3051, + "length": 25, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 128 + ], + "starting_column": 9, + "ending_column": 34 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 3017, + "length": 66, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 127, + 128, + 129 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#128)\n", + "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L128)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129", + "id": "60917b5197ecd42e5554643c32624ec6fc2a46bc8da2b3627eddcd68cf2ce9f5", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1776,20 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1379, - "length": 170, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -1657,45 +1880,43 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 1467, - "length": 19, + "start": 839, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 38 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1379, - "length": 170, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -1786,16 +2007,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64", - "id": "3e416561dc117d230bbee97788f5a0ff851da92f1def8fb5d7b94461ee6bfbc0", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40", + "id": "9363dbd2bb3f41b42351b088f7a973902e04ccae0081e5c99354de90890fe6ab", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2002,238 +2223,53 @@ 63, 64, 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad6()" - } - } - } - } - ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71", - "id": "9a6a2aee598cf4c282006337a3b8599c708487d1942e9ddfe3193581cbe1708e", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 2952, - "length": 59, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 123, - 124, - 125 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestSolidityKeyword", - "source_mapping": { - "start": 2385, - "length": 774, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad0()" - } - }, - { - "type": "node", - "name": "require(bool)(now == 0)", - "source_mapping": { - "start": 2986, - "length": 18, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 124 - ], - "starting_column": 9, - "ending_column": 27 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 2952, - "length": 59, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 123, - 124, - 125 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestSolidityKeyword", - "source_mapping": { - "start": 2385, - "length": 774, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125", - "id": "24de80ae388956295db544441f5ab9326af42bd4fcb34e232a23af952d7fe333", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71", + "id": "9a6a2aee598cf4c282006337a3b8599c708487d1942e9ddfe3193581cbe1708e", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2242,19 +2278,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 3017, - "length": 66, + "start": 3089, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -2314,42 +2350,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } }, { "type": "node", "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 3051, - "length": 25, + "start": 3123, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 128 + 132 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 3017, - "length": 66, + "start": 3089, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -2409,16 +2445,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } } } } ], - "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#128)\n", - "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L128)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129", - "id": "60917b5197ecd42e5554643c32624ec6fc2a46bc8da2b3627eddcd68cf2ce9f5", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133", + "id": "9efb75e5f6647209e01d4053c1bf76e69bf07d6578864711e2302336f250d72e", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2463,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3089, - "length": 67, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2483,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 774, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 3123, - "length": 26, + "start": 472, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 22 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3089, - "length": 67, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2560,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 774, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133", - "id": "9efb75e5f6647209e01d4053c1bf76e69bf07d6578864711e2302336f250d72e", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23", + "id": "df1ee72930fcaa7dc7a92d390be6007c57953a3392aef588a852373da388d850", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json index 777627263..e499975d0 100644 --- a/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 101, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -24,76 +25,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 182, - "length": 445, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 472, - "length": 43, + "start": 839, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 22 + 38 ], "starting_column": 9, - "ending_column": 52 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 101, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -101,50 +152,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 182, - "length": 445, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } } } } ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23", - "id": "867a3b92771da558ee2693d8c81dc2c154b0effac8153ca43ccb183b05245310", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40", + "id": "00429822fd7d6870bca827c11ac6f1f552b243431b3db4a937da8c0c616aabb9", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -153,19 +253,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad4", "source_mapping": { - "start": 528, - "length": 97, + "start": 1203, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -173,160 +276,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 579, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 528, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27", - "id": "22a2bf7ecbe8d0217cce4d0304fc02a45968167dd408ad85ad4bfb0ed5012dd0", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 665, - "length": 133, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestContractBalance", - "source_mapping": { - "start": 629, - "length": 1754, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", @@ -406,43 +359,45 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } }, { "type": "node", - "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 700, - "length": 51, + "start": 1291, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 33 + 54 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 665, - "length": 133, + "start": 1203, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -533,16 +488,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } } } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35", - "id": "c64584a1db93863bfb52a62fae244e6c2f6bc0c1dd1a5662f50965428d978a15", + "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#54)\n", + "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L54)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57", + "id": "03481d21bd25c9db2606e6ac246fbf5a047d5fb094422fe19a5fabf7032e1818", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -553,18 +508,17 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 804, - "length": 133, + "start": 528, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -572,126 +526,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 629, - "length": 1754, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad1(ERC20Variable)" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", "source_mapping": { - "start": 839, - "length": 51, + "start": 579, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 26 ], "starting_column": 9, - "ending_column": 60 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad1", "source_mapping": { - "start": 804, - "length": 133, + "start": 528, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -699,99 +603,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 629, - "length": 1754, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40", - "id": "00429822fd7d6870bca827c11ac6f1f552b243431b3db4a937da8c0c616aabb9", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27", + "id": "22a2bf7ecbe8d0217cce4d0304fc02a45968167dd408ad85ad4bfb0ed5012dd0", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,20 +655,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 943, - "length": 124, + "start": 2964, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 123, + 124, + 125 ], "starting_column": 5, "ending_column": 6 @@ -821,126 +675,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 978, - "length": 42, + "start": 2998, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 124 ], "starting_column": 9, - "ending_column": 51 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 943, - "length": 124, + "start": 2964, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 123, + 124, + 125 ], "starting_column": 5, "ending_column": 6 @@ -948,99 +770,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45", - "id": "d848b883cd27d256e7ea367c14afae2cc206b22bc62e0023eeff561e4bc9bee6", + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125", + "id": "41fcdc7b875eec5595e7d7518953b246ab69a7baac064512fde30b157c0595f2", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,20 +840,22 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad6", "source_mapping": { - "start": 1073, - "length": 124, + "start": 1555, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -1153,43 +946,45 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad6()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 1108, - "length": 42, + "start": 1652, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 68 ], - "starting_column": 9, - "ending_column": 51 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad6", "source_mapping": { - "start": 1073, - "length": 124, + "start": 1555, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -1280,16 +1075,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad6()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50", - "id": "746e8e07ef37b33e1f1e49ae013311ea0873d62d00caacaf08988735eb939ddc", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71", + "id": "48fdf24089d0b55885acd69fec55d6860251775e0e1b0317182476ff9015bd8d", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1298,9 +1093,9 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1203, + "start": 1379, "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", @@ -1308,15 +1103,15 @@ "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 - ], - "starting_column": 5, - "ending_column": 6 + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -1404,14 +1199,14 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad5()" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 1291, + "start": 1467, "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", @@ -1419,7 +1214,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 54 + 61 ], "starting_column": 13, "ending_column": 32 @@ -1427,9 +1222,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1203, + "start": 1379, "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", @@ -1437,12 +1232,12 @@ "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -1533,16 +1328,16 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad5()" } } } } ], - "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#54)\n", - "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L54)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57", - "id": "03481d21bd25c9db2606e6ac246fbf5a047d5fb094422fe19a5fabf7032e1818", + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64", + "id": "4c491b63ac50b7636f4718de626a471d8172b614b1355e937d7a071aec148691", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1346,20 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1379, - "length": 170, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -1657,45 +1450,43 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad3()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 1467, - "length": 19, + "start": 1108, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 48 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1379, - "length": 170, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -1786,16 +1577,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64", - "id": "4c491b63ac50b7636f4718de626a471d8172b614b1355e937d7a071aec148691", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50", + "id": "746e8e07ef37b33e1f1e49ae013311ea0873d62d00caacaf08988735eb939ddc", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1804,22 +1595,19 @@ "elements": [ { "type": "function", - "name": "bad6", + "name": "bad2", "source_mapping": { - "start": 1555, - "length": 179, + "start": 3113, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1827,128 +1615,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad2()" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 1652, - "length": 19, + "start": 3147, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 68 + 132 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad6", + "name": "bad2", "source_mapping": { - "start": 1555, - "length": 179, + "start": 3113, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1956,99 +1710,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71", - "id": "48fdf24089d0b55885acd69fec55d6860251775e0e1b0317182476ff9015bd8d", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133", + "id": "78aad151c32e2fa0c7cb17095afae17fad81d613a486d78dabb016b26396ed12", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2059,17 +1782,17 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 2964, - "length": 71, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2077,94 +1800,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 2998, - "length": 30, + "start": 472, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 124 + 22 ], "starting_column": 9, - "ending_column": 39 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad0", "source_mapping": { - "start": 2964, - "length": 71, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2172,68 +1877,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125", - "id": "41fcdc7b875eec5595e7d7518953b246ab69a7baac064512fde30b157c0595f2", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23", + "id": "867a3b92771da558ee2693d8c81dc2c154b0effac8153ca43ccb183b05245310", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2114,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3113, - "length": 67, + "start": 665, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2135,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", "source_mapping": { - "start": 3147, - "length": 26, + "start": 700, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 33 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3113, - "length": 67, + "start": 665, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2262,348 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" - } - } - } - } - ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133", - "id": "78aad151c32e2fa0c7cb17095afae17fad81d613a486d78dabb016b26396ed12", + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35", + "id": "c64584a1db93863bfb52a62fae244e6c2f6bc0c1dd1a5662f50965428d978a15", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 943, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestContractBalance", + "source_mapping": { + "start": 629, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "require(bool)(address(this).balance == 10000000000000000000)", + "source_mapping": { + "start": 978, + "length": 42, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 43 + ], + "starting_column": 9, + "ending_column": 51 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 943, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestContractBalance", + "source_mapping": { + "start": 629, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45", + "id": "d848b883cd27d256e7ea367c14afae2cc206b22bc62e0023eeff561e4bc9bee6", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json index bfb2d8224..13906812e 100644 --- a/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json index 257869740..5f9d1a535 100644 --- a/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json index c6023add7..d2f7ec560 100644 --- a/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json index 8d70ff617..2b032eacc 100644 --- a/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json b/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json index 6f00f629e..de342098e 100644 --- a/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json +++ b/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json @@ -1,68 +1,5 @@ [ [ - { - "elements": [ - { - "type": "variable", - "name": "c", - "source_mapping": { - "start": 42, - "length": 13, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "is_dependency": false, - "lines": [ - 4 - ], - "starting_column": 3, - "ending_column": 16 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 204, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - } - ], - "description": "C.c (tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#4) uses an dangerous unary operator: (b = + 1)\n", - "markdown": "[C.c](tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4) uses an dangerous unary operator: (b = + 1)\n", - "first_markdown_element": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4", - "id": "98d05a4acbe13ff0e6fa795af35dc2002541cc7607f3f4d7ffb356f9d33681bd", - "check": "incorrect-unary", - "impact": "Low", - "confidence": "Medium" - }, { "elements": [ { @@ -533,6 +470,69 @@ "check": "incorrect-unary", "impact": "Low", "confidence": "Medium" + }, + { + "elements": [ + { + "type": "variable", + "name": "c", + "source_mapping": { + "start": 42, + "length": 13, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "is_dependency": false, + "lines": [ + 4 + ], + "starting_column": 3, + "ending_column": 16 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 204, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ], + "starting_column": 1, + "ending_column": 2 + } + } + } + } + ], + "description": "C.c (tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#4) uses an dangerous unary operator: (b = + 1)\n", + "markdown": "[C.c](tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4) uses an dangerous unary operator: (b = + 1)\n", + "first_markdown_element": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4", + "id": "98d05a4acbe13ff0e6fa795af35dc2002541cc7607f3f4d7ffb356f9d33681bd", + "check": "incorrect-unary", + "impact": "Low", + "confidence": "Medium" } ] ] \ No newline at end of file diff --git a/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json b/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json index b8abfa2e5..77bd9ffc1 100644 --- a/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json +++ b/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json @@ -1,188 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 70, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 158, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "deleteSt(Lib.MyStruct[1])" - } - }, - { - "type": "struct", - "name": "MyStruct", - "source_mapping": { - "start": 47, - "length": 61, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 158, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - }, - { - "type": "node", - "name": "delete st[0]", - "source_mapping": { - "start": 165, - "length": 12, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 10 - ], - "starting_column": 9, - "ending_column": 21 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 70, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 158, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "deleteSt(Lib.MyStruct[1])" - } - } - } - } - ], - "description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#10)\n", - "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L10)\n", - "first_markdown_element": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11", - "id": "8c8313f12eb11c77c9acf1f683fe6d44a79ca1445e0d92cffd79c04a3462d3e9", - "check": "mapping-deletion", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -422,6 +239,189 @@ "check": "mapping-deletion", "impact": "Medium", "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 70, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 158, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deleteSt(Lib.MyStruct[1])" + } + }, + { + "type": "struct", + "name": "MyStruct", + "source_mapping": { + "start": 47, + "length": 61, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 158, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + } + } + }, + { + "type": "node", + "name": "delete st[0]", + "source_mapping": { + "start": 165, + "length": 12, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 10 + ], + "starting_column": 9, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 70, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 158, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deleteSt(Lib.MyStruct[1])" + } + } + } + } + ], + "description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#10)\n", + "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L10)\n", + "first_markdown_element": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11", + "id": "8c8313f12eb11c77c9acf1f683fe6d44a79ca1445e0d92cffd79c04a3462d3e9", + "check": "mapping-deletion", + "impact": "Medium", + "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json b/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json index deaf2750d..5ea22de8f 100644 --- a/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json +++ b/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json @@ -1,188 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 80, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 168, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "deleteSt(Lib.MyStruct[1])" - } - }, - { - "type": "struct", - "name": "MyStruct", - "source_mapping": { - "start": 47, - "length": 61, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 168, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - }, - { - "type": "node", - "name": "delete st[0]", - "source_mapping": { - "start": 175, - "length": 12, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 10 - ], - "starting_column": 9, - "ending_column": 21 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 80, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 168, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "deleteSt(Lib.MyStruct[1])" - } - } - } - } - ], - "description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#10)\n", - "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L10)\n", - "first_markdown_element": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11", - "id": "4c08076815986fec8b813cb66a7f7fe7002a5e87179bbd46e59279da2f46e992", - "check": "mapping-deletion", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -425,6 +242,189 @@ "check": "mapping-deletion", "impact": "Medium", "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 80, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 168, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deleteSt(Lib.MyStruct[1])" + } + }, + { + "type": "struct", + "name": "MyStruct", + "source_mapping": { + "start": 47, + "length": 61, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 168, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + } + } + }, + { + "type": "node", + "name": "delete st[0]", + "source_mapping": { + "start": 175, + "length": 12, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 10 + ], + "starting_column": 9, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 80, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 168, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deleteSt(Lib.MyStruct[1])" + } + } + } + } + ], + "description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#10)\n", + "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L10)\n", + "first_markdown_element": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11", + "id": "4c08076815986fec8b813cb66a7f7fe7002a5e87179bbd46e59279da2f46e992", + "check": "mapping-deletion", + "impact": "Medium", + "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json b/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json index d7a4397fc..16d2dcd94 100644 --- a/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json +++ b/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json @@ -1,188 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 80, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 168, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "deleteSt(Lib.MyStruct[1])" - } - }, - { - "type": "struct", - "name": "MyStruct", - "source_mapping": { - "start": 47, - "length": 61, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 168, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - }, - { - "type": "node", - "name": "delete st[0]", - "source_mapping": { - "start": 175, - "length": 12, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 10 - ], - "starting_column": 9, - "ending_column": 21 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 80, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Lib", - "source_mapping": { - "start": 29, - "length": 168, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "deleteSt(Lib.MyStruct[1])" - } - } - } - } - ], - "description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#10)\n", - "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L10)\n", - "first_markdown_element": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11", - "id": "a6c44f7353505e72d74433eef65af07e90cc95c3797d5b395766255f0ecb91e1", - "check": "mapping-deletion", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -425,6 +242,189 @@ "check": "mapping-deletion", "impact": "Medium", "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 80, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 168, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deleteSt(Lib.MyStruct[1])" + } + }, + { + "type": "struct", + "name": "MyStruct", + "source_mapping": { + "start": 47, + "length": 61, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 168, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + } + } + }, + { + "type": "node", + "name": "delete st[0]", + "source_mapping": { + "start": 175, + "length": 12, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 10 + ], + "starting_column": 9, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 80, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Lib", + "source_mapping": { + "start": 29, + "length": 168, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deleteSt(Lib.MyStruct[1])" + } + } + } + } + ], + "description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#10)\n", + "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L10)\n", + "first_markdown_element": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11", + "id": "a6c44f7353505e72d74433eef65af07e90cc95c3797d5b395766255f0ecb91e1", + "check": "mapping-deletion", + "impact": "Medium", + "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json index 720e4350c..a6a4f75fd 100644 --- a/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json @@ -4,37 +4,37 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 393, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 19 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 26, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad2_transfer", "source_mapping": { - "start": 125, - "length": 108, + "start": 370, + "length": 114, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +128,44 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad2_transfer(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 188, - "length": 17, + "start": 427, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 20 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad2_transfer", "source_mapping": { - "start": 125, - "length": 108, + "start": 370, + "length": 114, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -259,16 +259,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10", - "id": "4215a731670a0150f45d8cd682dc81ed85ffd5268cbad6ac9fe8bd044e54f74d", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19", + "id": "16629b342aad1ee3e0d3f933781eea91f1cb34b1770f84cb38a5d911e15b3476", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -279,7 +279,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 256, + "start": 511, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", @@ -287,28 +287,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 23 ], - "starting_column": 22, - "ending_column": 34 + "starting_column": 26, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 129, + "start": 488, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -402,45 +402,45 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 290, - "length": 20, + "start": 545, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 24 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 129, + "start": 488, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -534,45 +534,55 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } - }, + } + ], + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23", + "id": "27318d51c369e1e169a889a6c2678a023a22e1e3a691ab41a429684e338d2d1e", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 340, - "length": 20, + "start": 706, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 28 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 22, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad4_call", "source_mapping": { - "start": 237, - "length": 129, + "start": 687, + "length": 112, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -666,55 +676,44 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad4_call(address)" } } } - } - ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14", - "id": "dd2af335a7782a70944073bf1cf5dea69845ddcf6a45ea86a9fcf59793b151c8", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.call.value(msg.value)()", "source_mapping": { - "start": 393, - "length": 12, + "start": 740, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 29 ], - "starting_column": 26, - "ending_column": 38 + "starting_column": 5, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad4_call", "source_mapping": { - "start": 370, - "length": 114, + "start": 687, + "length": 112, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -808,44 +807,55 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad4_call(address)" } } } - }, + } + ], + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28", + "id": "34b73dbecfa159bc5631cb95ff2343c92792d80f448fc425b7d1bba399108073", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.transfer(msg.value)", + "type": "variable", + "name": "new_owner", "source_mapping": { - "start": 427, - "length": 24, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 10 ], - "starting_column": 5, - "ending_column": 29 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 370, - "length": 114, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -939,56 +949,44 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad0_set_owner(address)" } } } - } - ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19", - "id": "16629b342aad1ee3e0d3f933781eea91f1cb34b1770f84cb38a5d911e15b3476", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "owner = new_owner", "source_mapping": { - "start": 511, - "length": 12, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 11 ], - "starting_column": 26, - "ending_column": 38 + "starting_column": 5, + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 488, - "length": 195, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -1082,45 +1080,56 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad0_set_owner(address)" } } } - }, + } + ], + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10", + "id": "4215a731670a0150f45d8cd682dc81ed85ffd5268cbad6ac9fe8bd044e54f74d", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.transfer(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 545, - "length": 24, + "start": 256, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 14 ], - "starting_column": 5, - "ending_column": 29 + "starting_column": 22, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad1_send", "source_mapping": { - "start": 488, - "length": 195, + "start": 237, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -1214,55 +1223,45 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad1_send(address)" } } } - } - ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23", - "id": "27318d51c369e1e169a889a6c2678a023a22e1e3a691ab41a429684e338d2d1e", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 706, - "length": 12, + "start": 290, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 15 ], - "starting_column": 22, - "ending_column": 34 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad1_send", "source_mapping": { - "start": 687, - "length": 112, + "start": 237, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1355,45 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "addr.call.value(msg.value)()", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 740, - "length": 30, + "start": 340, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 16 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad1_send", "source_mapping": { - "start": 687, - "length": 112, + "start": 237, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad1_send(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28", - "id": "34b73dbecfa159bc5631cb95ff2343c92792d80f448fc425b7d1bba399108073", + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14", + "id": "dd2af335a7782a70944073bf1cf5dea69845ddcf6a45ea86a9fcf59793b151c8", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json index ff1e00c60..ebb98a36b 100644 --- a/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json @@ -4,37 +4,38 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 256, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +129,45 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 188, - "length": 17, + "start": 298, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 15 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -259,27 +261,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } - } - ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10", - "id": "ac59285350b35c2b885a6e9efe641474ae51b830fad5856f622fe264096e44cd", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 256, + "start": 348, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -287,10 +278,10 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 16 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -406,12 +397,23 @@ } } } - }, + } + ], + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14", + "id": "3d9ba6630d8f1357ab26196f519d74d6410a8e52994ae341d26a17d466200308", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 298, + "start": 401, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -419,28 +421,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 19 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad2_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -534,45 +535,44 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad2_transfer(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 348, - "length": 20, + "start": 443, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 20 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad2_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -666,16 +666,16 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14", - "id": "3d9ba6630d8f1357ab26196f519d74d6410a8e52994ae341d26a17d466200308", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19", + "id": "654c703c39420ad30e6624b6a98892faffc5e90820e7aabfd3cd66fe8870b7b8", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -686,7 +686,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 401, + "start": 527, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -694,7 +694,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 23 ], "starting_column": 26, "ending_column": 46 @@ -702,19 +702,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad3_transfer", "source_mapping": { - "start": 378, - "length": 122, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -808,7 +809,7 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad3_transfer(address)" } } } @@ -817,7 +818,7 @@ "type": "node", "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 443, + "start": 569, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -825,7 +826,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 24 ], "starting_column": 5, "ending_column": 29 @@ -833,19 +834,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad3_transfer", "source_mapping": { - "start": 378, - "length": 122, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -939,16 +941,16 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad3_transfer(address)" } } } } ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19", - "id": "654c703c39420ad30e6624b6a98892faffc5e90820e7aabfd3cd66fe8870b7b8", + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23", + "id": "98f43dd716a11685725ad4c615b07dd773bcf0f1c7710357fa1a5606084dd999", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -959,7 +961,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 527, + "start": 730, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -967,28 +969,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 28 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1082,45 +1083,44 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "addr.call.value(msg.value)()", "source_mapping": { - "start": 569, - "length": 24, + "start": 772, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 29 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1214,16 +1214,16 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } } ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23", - "id": "98f43dd716a11685725ad4c615b07dd773bcf0f1c7710357fa1a5606084dd999", + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28", + "id": "aa90b9a8002d093f5996492eae0d441bde928e8187fc6d2790f973f6383d6095", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -1232,37 +1232,37 @@ "elements": [ { "type": "variable", - "name": "addr", + "name": "new_owner", "source_mapping": { - "start": 730, - "length": 20, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 10 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad0_set_owner", "source_mapping": { - "start": 711, - "length": 120, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1356,44 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad0_set_owner(address)" } } } }, { "type": "node", - "name": "addr.call.value(msg.value)()", + "name": "owner = new_owner", "source_mapping": { - "start": 772, - "length": 30, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 11 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad0_set_owner", "source_mapping": { - "start": 711, - "length": 120, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad0_set_owner(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28", - "id": "aa90b9a8002d093f5996492eae0d441bde928e8187fc6d2790f973f6383d6095", + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10", + "id": "ac59285350b35c2b885a6e9efe641474ae51b830fad5856f622fe264096e44cd", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json index 65f8c779f..3cba59cdc 100644 --- a/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json @@ -4,37 +4,37 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 730, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 28 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad4_call", "source_mapping": { - "start": 125, - "length": 108, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +128,44 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad4_call(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.call.value(msg.value)()", "source_mapping": { - "start": 188, - "length": 17, + "start": 772, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 29 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad4_call", "source_mapping": { - "start": 125, - "length": 108, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -259,16 +259,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad4_call(address)" } } } } ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10", - "id": "1d2f6294ee0cfc4aae290fe04610e1df21d508008e75000ef017463482d78f95", + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28", + "id": "174a4f81c4e872deda0a31c10f8136b52d60adc89ba9be1548b308a09e225763", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -277,38 +277,37 @@ "elements": [ { "type": "variable", - "name": "addr", + "name": "new_owner", "source_mapping": { - "start": 256, - "length": 20, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 10 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad0_set_owner", "source_mapping": { - "start": 237, - "length": 137, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -402,45 +401,44 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad0_set_owner(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "owner = new_owner", "source_mapping": { - "start": 298, - "length": 20, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 11 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad0_set_owner", "source_mapping": { - "start": 237, - "length": 137, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -534,16 +532,27 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad0_set_owner(address)" } } } - }, + } + ], + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10", + "id": "1d2f6294ee0cfc4aae290fe04610e1df21d508008e75000ef017463482d78f95", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 348, + "start": 256, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -551,10 +560,10 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 14 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { @@ -670,23 +679,12 @@ } } } - } - ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14", - "id": "21de216080f0f27154e9b3cd2fef7ead38dacc945160b619923c33344d636826", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 401, + "start": 298, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -694,27 +692,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 15 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad1_send", "source_mapping": { - "start": 378, - "length": 122, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -808,44 +807,45 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 443, - "length": 24, + "start": 348, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 16 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad1_send", "source_mapping": { - "start": 378, - "length": 122, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -939,16 +939,16 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad1_send(address)" } } } } ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19", - "id": "3d8300f19d40cb2f76fcb587f94e3dfc751319b119bd83af4cd7f962b680feb8", + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14", + "id": "21de216080f0f27154e9b3cd2fef7ead38dacc945160b619923c33344d636826", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -959,7 +959,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 527, + "start": 401, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -967,7 +967,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 19 ], "starting_column": 26, "ending_column": 46 @@ -975,20 +975,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad2_transfer", "source_mapping": { - "start": 504, - "length": 203, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1082,7 +1081,7 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad2_transfer(address)" } } } @@ -1091,7 +1090,7 @@ "type": "node", "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 569, + "start": 443, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -1099,7 +1098,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 20 ], "starting_column": 5, "ending_column": 29 @@ -1107,20 +1106,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad2_transfer", "source_mapping": { - "start": 504, - "length": 203, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1214,16 +1212,16 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23", - "id": "efee9ceff8491c62ed42aab7c70b0a8d9c7731af8ecb304e6deafcc64a20c6f4", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19", + "id": "3d8300f19d40cb2f76fcb587f94e3dfc751319b119bd83af4cd7f962b680feb8", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -1234,7 +1232,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 730, + "start": 527, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -1242,27 +1240,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 23 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad3_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1355,45 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad3_transfer(address)" } } } }, { "type": "node", - "name": "addr.call.value(msg.value)()", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 772, - "length": 30, + "start": 569, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 24 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad3_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad3_transfer(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28", - "id": "174a4f81c4e872deda0a31c10f8136b52d60adc89ba9be1548b308a09e225763", + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23", + "id": "efee9ceff8491c62ed42aab7c70b0a8d9c7731af8ecb304e6deafcc64a20c6f4", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json index b9e14ce41..b719bf58c 100644 --- a/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json @@ -4,37 +4,38 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 256, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +129,45 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 188, - "length": 17, + "start": 298, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 15 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -259,27 +261,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } - } - ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10", - "id": "2c8db81e6ce5a16bd76db4dd9d27d931037b6b06bacd06afa427e35f4dd22aa6", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 256, + "start": 348, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -287,10 +278,10 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 16 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -406,12 +397,23 @@ } } } - }, + } + ], + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14", + "id": "1a145c4f40c60c9db09f5743139503a60b40be83dda9c57f8c47a400f1bc5b8a", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 298, + "start": 527, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -419,28 +421,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 23 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -534,45 +536,45 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 348, - "length": 20, + "start": 569, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 24 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -666,16 +668,16 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } } ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14", - "id": "1a145c4f40c60c9db09f5743139503a60b40be83dda9c57f8c47a400f1bc5b8a", + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23", + "id": "1cc3cad32b73e31e6d6f214b9a99b19c5bd5633ddf3ab58267a5870051c22a02", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -684,37 +686,37 @@ "elements": [ { "type": "variable", - "name": "addr", + "name": "new_owner", "source_mapping": { - "start": 401, - "length": 20, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 10 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 378, - "length": 122, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -808,44 +810,44 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad0_set_owner(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "owner = new_owner", "source_mapping": { - "start": 443, - "length": 24, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 11 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 378, - "length": 122, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -939,16 +941,16 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad0_set_owner(address)" } } } } ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19", - "id": "f7028c02d7b7a78ef72a33c7b976bcb047206b9c82a9acc39cdf11a5e188208f", + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10", + "id": "2c8db81e6ce5a16bd76db4dd9d27d931037b6b06bacd06afa427e35f4dd22aa6", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -959,7 +961,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 527, + "start": 730, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -967,28 +969,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 28 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1082,45 +1083,44 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "addr.call{value: msg.value}()", "source_mapping": { - "start": 569, - "length": 24, + "start": 772, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 29 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1214,16 +1214,16 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } } ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23", - "id": "1cc3cad32b73e31e6d6f214b9a99b19c5bd5633ddf3ab58267a5870051c22a02", + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call{value: msg.value}() (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call{value: msg.value}()](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28", + "id": "64e549d94c8869ed8c827ad3ee766cb23d4e8a64bc9b19e06d593fa8942363b4", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -1234,7 +1234,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 730, + "start": 401, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -1242,27 +1242,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 19 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad2_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1356,44 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad2_transfer(address)" } } } }, { "type": "node", - "name": "addr.call{value: msg.value}()", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 772, - "length": 30, + "start": 443, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 20 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad2_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call{value: msg.value}() (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call{value: msg.value}()](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28", - "id": "64e549d94c8869ed8c827ad3ee766cb23d4e8a64bc9b19e06d593fa8942363b4", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19", + "id": "f7028c02d7b7a78ef72a33c7b976bcb047206b9c82a9acc39cdf11a5e188208f", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json b/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json index 9b3f96591..ec876a5c6 100644 --- a/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json +++ b/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json @@ -4,21 +4,19 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -71,44 +69,42 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } }, { "type": "node", - "name": "balances[receivers[i]] += msg.value", + "name": "balances[a] += msg.value", "source_mapping": { - "start": 188, - "length": 35, + "start": 478, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 7 + 18 ], - "starting_column": 13, - "ending_column": 48 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -161,16 +157,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } } } } ], - "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9", - "id": "b8e2b147c51a880dc38a635915a0511954ade8ffeab3efd16e389a370e0c0b1b", + "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#18)\n", + "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L18)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19", + "id": "84b39e0706b72e42b4cf069a649c5825e35ed842871350cc064c8123396b6f96", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" @@ -179,19 +175,21 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 425, - "length": 84, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -244,42 +242,44 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad(address[])" } }, { "type": "node", - "name": "balances[a] += msg.value", + "name": "balances[receivers[i]] += msg.value", "source_mapping": { - "start": 478, - "length": 24, + "start": 188, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 18 + 7 ], - "starting_column": 9, - "ending_column": 33 + "starting_column": 13, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 425, - "length": 84, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -332,16 +332,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad(address[])" } } } } ], - "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#18)\n", - "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L18)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19", - "id": "84b39e0706b72e42b4cf069a649c5825e35ed842871350cc064c8123396b6f96", + "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9", + "id": "b8e2b147c51a880dc38a635915a0511954ade8ffeab3efd16e389a370e0c0b1b", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json b/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json index 15ce57037..c436e39be 100644 --- a/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json +++ b/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json @@ -4,21 +4,19 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -71,44 +69,42 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } }, { "type": "node", - "name": "balances[receivers[i]] += msg.value", + "name": "balances[a] += msg.value", "source_mapping": { - "start": 188, - "length": 35, + "start": 478, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 7 + 18 ], - "starting_column": 13, - "ending_column": 48 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -161,16 +157,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } } } } ], - "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9", - "id": "fd0c2f6abecbecd689c995b2cd3c30c9f1bd3763e34f4d5cb91788604f8ec3da", + "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#18)\n", + "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L18)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19", + "id": "0fd3ac1c8051090ec1fe86fa9e1e5f8e7381d8eef3f252fede8dc3bb07e87104", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" @@ -179,19 +175,23 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 425, - "length": 84, + "start": 515, + "length": 245, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -244,42 +244,46 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad3(address[])" } }, { "type": "node", - "name": "balances[a] += msg.value", + "name": "balances[receivers[j]] += msg.value", "source_mapping": { - "start": 478, - "length": 24, + "start": 694, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 18 + 24 ], - "starting_column": 9, - "ending_column": 33 + "starting_column": 17, + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 425, - "length": 84, + "start": 515, + "length": 245, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -332,16 +336,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#18)\n", - "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L18)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19", - "id": "0fd3ac1c8051090ec1fe86fa9e1e5f8e7381d8eef3f252fede8dc3bb07e87104", + "description": "C.bad3(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#21-27) use msg.value in a loop: balances[receivers[j]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#24)\n", + "markdown": "[C.bad3(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27) use msg.value in a loop: [balances[receivers[j]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L24)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27", + "id": "9a021823637092277317750625e1f63b1b6f4b394a5dd1fdde50088af8d9e805", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" @@ -350,23 +354,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 515, - "length": 245, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -419,14 +421,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } }, { "type": "node", - "name": "balances[receivers[j]] += msg.value", + "name": "balances[receivers[i]] += msg.value", "source_mapping": { - "start": 694, + "start": 188, "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", @@ -434,31 +436,29 @@ "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 24 + 7 ], - "starting_column": 17, - "ending_column": 52 + "starting_column": 13, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 515, - "length": 245, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -511,16 +511,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#21-27) use msg.value in a loop: balances[receivers[j]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#24)\n", - "markdown": "[C.bad3(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27) use msg.value in a loop: [balances[receivers[j]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L24)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27", - "id": "9a021823637092277317750625e1f63b1b6f4b394a5dd1fdde50088af8d9e805", + "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9", + "id": "fd0c2f6abecbecd689c995b2cd3c30c9f1bd3763e34f4d5cb91788604f8ec3da", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json b/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json index b627e1e59..62ed3b3c2 100644 --- a/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json +++ b/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.4.25/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.4.25/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.4.25/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.4.25/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.4.25/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.4.25/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.4.25/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.4.25/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.4.25/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.4.25/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.4.25/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.4.25/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.4.25/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.4.25/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json b/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json index 358b35cc0..d446e363d 100644 --- a/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json +++ b/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.5.16/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.5.16/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.5.16/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.5.16/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.5.16/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.5.16/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.5.16/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.5.16/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.5.16/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.5.16/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.5.16/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.5.16/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.5.16/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.5.16/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json b/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json index 15e9e8ad0..7c9d51cce 100644 --- a/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json +++ b/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.6.11/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.6.11/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.6.11/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.6.11/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.6.11/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.6.11/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.6.11/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.6.11/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.6.11/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.6.11/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.6.11/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.6.11/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.6.11/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.6.11/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.6.11/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.6.11/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json b/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json index 8a9e4568d..fd6d92790 100644 --- a/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json +++ b/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.7.6/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.7.6/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.7.6/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.7.6/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.7.6/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.7.6/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.7.6/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.7.6/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.7.6/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.7.6/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.7.6/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.7.6/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.7.6/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.7.6/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.7.6/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.7.6/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json b/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json index 5856f4527..8c69a53b3 100644 --- a/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json @@ -126,9 +126,9 @@ "elements": [ { "type": "node", - "name": "bool", + "name": "uint256", "source_mapping": { - "start": 155, + "start": 257, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", @@ -136,7 +136,7 @@ "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 9, "ending_column": 13 @@ -144,21 +144,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -197,7 +198,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -236,10 +237,10 @@ } } ], - "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7", - "id": "da776628bba71bca43caf77bb06a7055fe3c0f4f18a30274c5cb508bcb3a27b4", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12", + "id": "7423f2beb0d066fc4e193c27dd50b172186e9539b778ab72bf950dbe872df720", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "test", "source_mapping": { - "start": 169, - "length": 27, + "start": 287, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 14 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8", - "id": "cb9ace5d0188d80bdc530d3760b41a1dcf1a4c10151b720e468550bb22be0e74", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14", + "id": "c3c9961e4467e57974929ecfaeb34a0923fc257422a7705c9d1b14257cfe0c3a", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -370,40 +372,39 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 257, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 12 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -442,7 +443,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -481,10 +482,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12", - "id": "7423f2beb0d066fc4e193c27dd50b172186e9539b778ab72bf950dbe872df720", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8", + "id": "cb9ace5d0188d80bdc530d3760b41a1dcf1a4c10151b720e468550bb22be0e74", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +494,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "bool", "source_mapping": { - "start": 271, - "length": 6, + "start": 155, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 7 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +565,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +604,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13", - "id": "e0137cf6a61eb49d07e1a67a7cdfd0cb82cac0402cded9f1cfb85ae1e6e8d3fe", + "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7", + "id": "da776628bba71bca43caf77bb06a7055fe3c0f4f18a30274c5cb508bcb3a27b4", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,20 +616,20 @@ "elements": [ { "type": "node", - "name": "test", + "name": "assert(bool)", "source_mapping": { - "start": 287, - "length": 4, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 13 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14", - "id": "c3c9961e4467e57974929ecfaeb34a0923fc257422a7705c9d1b14257cfe0c3a", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13", + "id": "e0137cf6a61eb49d07e1a67a7cdfd0cb82cac0402cded9f1cfb85ae1e6e8d3fe", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json b/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json index 2f09ce19b..8e17b5fb2 100644 --- a/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json @@ -4,39 +4,40 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "assert(bool)", "source_mapping": { - "start": 141, - "length": 4, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 6 + 13 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -75,7 +76,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -114,10 +115,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6", - "id": "58d73cb2126e8c76752e57c69feeed96ee7db0cc50cf33c0f92679525acc26e9", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13", + "id": "342d8ac4c8c6e96ca7ca18f4bb9abed731c08b4c19a4461151ea48fc503be342", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -126,9 +127,9 @@ "elements": [ { "type": "node", - "name": "bool", + "name": "uint256", "source_mapping": { - "start": 155, + "start": 141, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", @@ -136,7 +137,7 @@ "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 9, "ending_column": 13 @@ -236,10 +237,10 @@ } } ], - "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7", - "id": "f57f949deb97e88dedd17864427a4941d1395be24db436d3a45945a45c53b919", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6", + "id": "58d73cb2126e8c76752e57c69feeed96ee7db0cc50cf33c0f92679525acc26e9", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "test", "source_mapping": { - "start": 169, - "length": 27, + "start": 287, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 14 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8", - "id": "faaa2cdb764d49e4d06709c566d903cc4b222634a27b31bbbb0217a13b84aa62", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14", + "id": "b36c497f678f32a5479ead924c310a0c86b398e465f69b0e7365f06befaef172", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +495,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "bool", "source_mapping": { - "start": 271, - "length": 6, + "start": 155, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 7 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +566,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +605,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13", - "id": "342d8ac4c8c6e96ca7ca18f4bb9abed731c08b4c19a4461151ea48fc503be342", + "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7", + "id": "f57f949deb97e88dedd17864427a4941d1395be24db436d3a45945a45c53b919", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,40 +617,39 @@ "elements": [ { "type": "node", - "name": "test", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 287, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -688,7 +688,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14", - "id": "b36c497f678f32a5479ead924c310a0c86b398e465f69b0e7365f06befaef172", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8", + "id": "faaa2cdb764d49e4d06709c566d903cc4b222634a27b31bbbb0217a13b84aa62", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json b/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json index f57476a4a..24f517567 100644 --- a/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json @@ -4,20 +4,20 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 141, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { @@ -114,10 +114,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6", - "id": "c58083eaf5653fc9616833c617157456ad9088c4638009d9cdfebdc1445671bd", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8", + "id": "1ffcec7a83522ce311c8410e5523283b97944a0c27356e3141b26a7f32a022d3", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -126,9 +126,9 @@ "elements": [ { "type": "node", - "name": "bool", + "name": "test", "source_mapping": { - "start": 155, + "start": 287, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", @@ -136,7 +136,7 @@ "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 7 + 14 ], "starting_column": 9, "ending_column": 13 @@ -144,21 +144,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -197,7 +198,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -236,10 +237,10 @@ } } ], - "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7", - "id": "f0fef441fabe415b9cbc63bfc5a2a5c69f6248ce22d1bd94f73979f928cb7dba", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14", + "id": "5223d6cc441a1f923616873898ea34e0ff11a758c38d6b5244b9e9ea6be9bec8", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "uint256", "source_mapping": { - "start": 169, - "length": 27, + "start": 257, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 12 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8", - "id": "1ffcec7a83522ce311c8410e5523283b97944a0c27356e3141b26a7f32a022d3", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12", + "id": "53f741bfdd4465fbdb8799391ca2fa50ac657b72ac9b822c87e2e4ae79d831d8", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -372,7 +374,7 @@ "type": "node", "name": "uint256", "source_mapping": { - "start": 257, + "start": 141, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", @@ -380,7 +382,7 @@ "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 12 + 6 ], "starting_column": 9, "ending_column": 13 @@ -388,22 +390,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -442,7 +443,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -481,10 +482,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12", - "id": "53f741bfdd4465fbdb8799391ca2fa50ac657b72ac9b822c87e2e4ae79d831d8", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6", + "id": "c58083eaf5653fc9616833c617157456ad9088c4638009d9cdfebdc1445671bd", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +494,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "bool", "source_mapping": { - "start": 271, - "length": 6, + "start": 155, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 7 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +565,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +604,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13", - "id": "f902982db50d530e22b29f35ab1a740f1af29683b0ebb9edd53240721b4f95b9", + "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7", + "id": "f0fef441fabe415b9cbc63bfc5a2a5c69f6248ce22d1bd94f73979f928cb7dba", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,20 +616,20 @@ "elements": [ { "type": "node", - "name": "test", + "name": "assert(bool)", "source_mapping": { - "start": 287, - "length": 4, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 13 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14", - "id": "5223d6cc441a1f923616873898ea34e0ff11a758c38d6b5244b9e9ea6be9bec8", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13", + "id": "f902982db50d530e22b29f35ab1a740f1af29683b0ebb9edd53240721b4f95b9", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json b/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json index 3cf570b00..2b16d2d72 100644 --- a/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json @@ -4,9 +4,9 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "test", "source_mapping": { - "start": 141, + "start": 287, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", @@ -14,7 +14,7 @@ "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 6 + 14 ], "starting_column": 9, "ending_column": 13 @@ -22,21 +22,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -75,7 +76,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -114,10 +115,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6", - "id": "d16c698a23693dc64165fc886c68f6900a7a2699998f0f3713d875cf49a2af87", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14", + "id": "45bb5d6a69015db0e07e6d13107db089e1095da3cf0918f624db12181fac28a1", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "assert(bool)", "source_mapping": { - "start": 169, - "length": 27, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 13 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8", - "id": "caf262c2d237789c12de0cf27ef88625491b29a1bc3209ced3a12d2890fc799e", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13", + "id": "774a4440b59af9fa94c7552ba0ce21a7835511012dc6257afc3fd4d80a023b28", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -370,40 +372,39 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 257, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 12 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -442,7 +443,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -481,10 +482,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12", - "id": "ffe6709dbcfc3342d28833aad5375135da8cc7369bf0649ab1796ff4eae14ca1", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8", + "id": "caf262c2d237789c12de0cf27ef88625491b29a1bc3209ced3a12d2890fc799e", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +494,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "uint256", "source_mapping": { - "start": 271, - "length": 6, + "start": 141, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 6 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +565,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +604,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13", - "id": "774a4440b59af9fa94c7552ba0ce21a7835511012dc6257afc3fd4d80a023b28", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6", + "id": "d16c698a23693dc64165fc886c68f6900a7a2699998f0f3713d875cf49a2af87", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,9 +616,9 @@ "elements": [ { "type": "node", - "name": "test", + "name": "uint256", "source_mapping": { - "start": 287, + "start": 257, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", @@ -626,7 +626,7 @@ "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 12 ], "starting_column": 9, "ending_column": 13 @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14", - "id": "45bb5d6a69015db0e07e6d13107db089e1095da3cf0918f624db12181fac28a1", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12", + "id": "ffe6709dbcfc3342d28833aad5375135da8cc7369bf0649ab1796ff4eae14ca1", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol b/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol index 8b37f9852..7b7eb579c 100644 --- a/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol +++ b/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol @@ -4,6 +4,15 @@ contract ReentrancyBenign { uint8 anotherVariableToChange; uint8 counter = 0; + // Should not detect reentrancy in constructor + constructor(address addr) { + (bool success) = addr.call(); + if (!success) { + revert(); + } + counter += 1; + } + function bad0() public { if (!(msg.sender.call())) { revert(); diff --git a/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json index af7c329b2..1d62e309c 100644 --- a/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json @@ -4,22 +4,21 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad5", "source_mapping": { - "start": 116, - "length": 120, + "start": 1137, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12 + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -30,7 +29,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -96,51 +95,59 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad5(address)" } }, { "type": "node", - "name": "! (msg.sender.call())", + "name": "ethSender(address(0))", "source_mapping": { - "start": 153, - "length": 20, + "start": 1184, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 54 ], - "starting_column": 13, - "ending_column": 33 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad5", "source_mapping": { - "start": 116, - "length": 120, + "start": 1137, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12 + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -151,7 +158,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -217,13 +224,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad5(address)" } } }, @@ -233,40 +249,37 @@ }, { "type": "node", - "name": "! (msg.sender.call())", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 153, - "length": 20, + "start": 1417, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 64 ], - "starting_column": 13, - "ending_column": 33 + "starting_column": 9, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "ethSender", "source_mapping": { - "start": 116, - "length": 120, + "start": 1364, + "length": 91, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12 + 63, + 64, + 65 ], "starting_column": 5, "ending_column": 6 @@ -277,7 +290,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -343,13 +356,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "ethSender(address)" } } }, @@ -359,9 +381,9 @@ }, { "type": "node", - "name": "counter += 1", + "name": "varChanger()", "source_mapping": { - "start": 217, + "start": 1215, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -369,7 +391,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 11 + 55 ], "starting_column": 9, "ending_column": 21 @@ -377,22 +399,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad5", "source_mapping": { - "start": 116, - "length": 120, + "start": 1137, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12 + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -403,7 +424,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -469,26 +490,168 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad5(address)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "counter" + "variable_name": "anotherVariableToChange" + } + }, + { + "type": "node", + "name": "anotherVariableToChange ++", + "source_mapping": { + "start": 1501, + "length": 25, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 68 + ], + "starting_column": 9, + "ending_column": 34 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "varChanger", + "source_mapping": { + "start": 1461, + "length": 72, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 67, + 68, + 69 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 25, + "length": 1510, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "varChanger()" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } } ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#7-12):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#8)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#11)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L7-L12):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L8)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L11)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L7-L12", - "id": "63a6117be188fedd63d46e13119e967dc70adbd140f7ad2f9d3343e5139ccffb", + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#53-57):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#54)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L53-L57):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L54)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L53-L57", + "id": "254751a69c99356562e79eb0a53483ca1bcb0e9c4c847219206c665624db8a4c", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -497,21 +660,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 242, - "length": 132, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 14, - 15, 16, 17, - 18 + 18, + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -522,7 +686,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -588,50 +752,60 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad0()" } }, { "type": "node", - "name": "success = target.call()", + "name": "! (msg.sender.call())", "source_mapping": { - "start": 289, - "length": 30, + "start": 359, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15 + 17 ], - "starting_column": 9, - "ending_column": 39 + "starting_column": 13, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 242, - "length": 132, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 14, - 15, 16, 17, - 18 + 18, + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -642,7 +816,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -708,13 +882,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, @@ -724,39 +907,40 @@ }, { "type": "node", - "name": "success = target.call()", + "name": "! (msg.sender.call())", "source_mapping": { - "start": 289, - "length": 30, + "start": 359, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15 + 17 ], - "starting_column": 9, - "ending_column": 39 + "starting_column": 13, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 242, - "length": 132, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 14, - 15, 16, 17, - 18 + 18, + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -767,7 +951,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -833,13 +1017,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, @@ -851,7 +1044,7 @@ "type": "node", "name": "counter += 1", "source_mapping": { - "start": 355, + "start": 423, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -859,7 +1052,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 20 ], "starting_column": 9, "ending_column": 21 @@ -867,21 +1060,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 242, - "length": 132, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 14, - 15, 16, 17, - 18 + 18, + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -892,7 +1086,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -958,13 +1152,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, @@ -974,10 +1177,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#14-18):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#15)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#17)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L14-L18):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L15)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L17)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L14-L18", - "id": "8dc236b9193d1240d219303bae9f115b1c69ee45b7d5528a1915891463b62d15", + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#16-21):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#20)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L16-L21):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L16-L21", + "id": "2a39756367d068df6d24cfb010f495564ad89f8696ab2eaf9635d640412963cb", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -986,26 +1189,22 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 380, - "length": 238, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -1016,7 +1215,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1082,55 +1281,60 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } }, { "type": "node", - "name": "success = target.call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 427, - "length": 30, + "start": 1008, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21 + 47 ], "starting_column": 9, - "ending_column": 39 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 380, - "length": 238, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -1141,7 +1345,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1207,13 +1411,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, @@ -1223,44 +1436,37 @@ }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "address(target).call()", "source_mapping": { - "start": 494, - "length": 34, + "start": 1329, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 23 + 60 ], - "starting_column": 13, - "ending_column": 47 + "starting_column": 9, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 380, - "length": 238, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 59, + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -1271,7 +1477,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1337,60 +1543,65 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "success = target.call()", + "name": "ethSender(address(0))", "source_mapping": { - "start": 427, - "length": 30, + "start": 1040, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21 + 48 ], "starting_column": 9, - "ending_column": 39 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 380, - "length": 238, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -1401,7 +1612,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1467,60 +1678,62 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 494, - "length": 34, + "start": 1417, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 23 + 64 ], - "starting_column": 13, - "ending_column": 47 + "starting_column": 9, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "ethSender", "source_mapping": { - "start": 380, - "length": 238, + "start": 1364, + "length": 91, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 63, + 64, + 65 ], "starting_column": 5, "ending_column": 6 @@ -1531,7 +1744,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1597,13 +1810,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "ethSender(address)" } } }, @@ -1613,44 +1835,40 @@ }, { "type": "node", - "name": "counter += 1", + "name": "externalCaller(target)", "source_mapping": { - "start": 542, - "length": 12, + "start": 1008, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 47 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 380, - "length": 238, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -1661,7 +1879,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1727,139 +1945,34 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#20-29):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#21)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#24)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20-L29):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L21)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L24)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20-L29", - "id": "d0cd48646930b460d018a96dca75d8781c9707be1d4a451d83f1fec56f560c43", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad3", - "source_mapping": { - "start": 624, - "length": 125, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 25, - "length": 1304, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad3(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "address(target).call()", "source_mapping": { - "start": 671, + "start": 1329, "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -1867,7 +1980,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32 + 60 ], "starting_column": 9, "ending_column": 31 @@ -1875,144 +1988,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "externalCaller", "source_mapping": { - "start": 624, - "length": 125, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 25, - "length": 1304, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad3(address)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls" - } - }, - { - "type": "node", - "name": "address(target).call()", - "source_mapping": { - "start": 1123, - "length": 22, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 51 - ], - "starting_column": 9, - "ending_column": 31 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "externalCaller", - "source_mapping": { - "start": 1065, - "length": 87, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 50, - 51, - 52 + 59, + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -2023,7 +2011,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2089,7 +2077,16 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 @@ -2105,39 +2102,40 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "ethSender(address(0))", "source_mapping": { - "start": 671, - "length": 22, + "start": 1040, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32 + 48 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 624, - "length": 125, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -2148,7 +2146,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2214,13 +2212,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, @@ -2230,37 +2237,37 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1123, - "length": 22, + "start": 1417, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51 + 64 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "ethSender", "source_mapping": { - "start": 1065, - "length": 87, + "start": 1364, + "length": 91, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 50, - 51, - 52 + 63, + 64, + 65 ], "starting_column": 5, "ending_column": 6 @@ -2271,7 +2278,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2337,13 +2344,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "ethSender(address)" } } }, @@ -2355,7 +2371,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 703, + "start": 1071, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -2363,7 +2379,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 49 ], "starting_column": 9, "ending_column": 21 @@ -2371,21 +2387,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 624, - "length": 125, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -2396,7 +2413,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2462,13 +2479,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, @@ -2481,7 +2507,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1295, + "start": 1501, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -2489,7 +2515,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59 + 68 ], "starting_column": 9, "ending_column": 34 @@ -2499,7 +2525,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1255, + "start": 1461, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -2507,9 +2533,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 58, - 59, - 60 + 67, + 68, + 69 ], "starting_column": 5, "ending_column": 6 @@ -2520,7 +2546,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2586,7 +2612,16 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 @@ -2602,10 +2637,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#31-35):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#51)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#33)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#59)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L31-L35):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L51)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L33)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L59)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L31-L35", - "id": "b5e5f8e97fa06883b3ba5da0b071d115f3181ded338efbbd6dbadaef4033ca17", + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#46-51):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#47)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#60)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#48)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#48)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#49)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46-L51):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L47)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L60)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L48)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L48)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L49)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46-L51", + "id": "2c5b7e723892ca273cde4bf80ff3909e425d55cc6de2a2c0778c4cfed2e32e11", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2614,22 +2649,26 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 755, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, 37, - 38, - 39, - 40, - 41, - 42 + 38 ], "starting_column": 5, "ending_column": 6 @@ -2640,7 +2679,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2706,51 +2745,64 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "success = target.call()", "source_mapping": { - "start": 802, - "length": 22, + "start": 633, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38 + 30 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 755, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, 37, - 38, - 39, - 40, - 41, - 42 + 38 ], "starting_column": 5, "ending_column": 6 @@ -2761,7 +2813,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2827,13 +2879,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } } }, @@ -2843,37 +2904,44 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 1123, - "length": 22, + "start": 700, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51 + 32 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 13, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad2", "source_mapping": { - "start": 1065, - "length": 87, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 50, - 51, - 52 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -2884,7 +2952,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2950,56 +3018,69 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "success = target.call()", "source_mapping": { - "start": 834, - "length": 21, + "start": 633, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 30 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 755, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40, - 41, - 42 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3010,7 +3091,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3076,53 +3157,69 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 1211, - "length": 31, + "start": 700, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55 + 32 ], - "starting_column": 9, - "ending_column": 40 + "starting_column": 13, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad2", "source_mapping": { - "start": 1158, - "length": 91, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3133,7 +3230,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3199,13 +3296,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad2(address)" } } }, @@ -3215,40 +3321,44 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "counter += 1", "source_mapping": { - "start": 802, - "length": 22, + "start": 748, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38 + 33 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 13, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 755, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, 37, - 38, - 39, - 40, - 41, - 42 + 38 ], "starting_column": 5, "ending_column": 6 @@ -3259,7 +3369,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3325,53 +3435,187 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#29-38):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#30)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#33)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L29-L38):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L30)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L33)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L29-L38", + "id": "3180ddee7a1760e704dea65602dda2c269e95d0623dd8dba90c0fa59fc983078", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 448, + "length": 132, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25, + 26, + 27 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 25, + "length": 1510, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad1(address)" } }, { "type": "node", - "name": "address(target).call()", + "name": "success = target.call()", "source_mapping": { - "start": 1123, - "length": 22, + "start": 495, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51 + 24 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad1", "source_mapping": { - "start": 1065, - "length": 87, + "start": 448, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 50, - 51, - 52 + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -3382,7 +3626,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3448,56 +3692,64 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "success = target.call()", "source_mapping": { - "start": 834, - "length": 21, + "start": 495, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 24 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 755, - "length": 170, + "start": 448, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40, - 41, - 42 + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -3508,7 +3760,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3574,13 +3826,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } } }, @@ -3590,37 +3851,39 @@ }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "counter += 1", "source_mapping": { - "start": 1211, - "length": 31, + "start": 561, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55 + 26 ], "starting_column": 9, - "ending_column": 40 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad1", "source_mapping": { - "start": 1158, - "length": 91, + "start": 448, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56 + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -3631,7 +3894,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3697,56 +3960,187 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad1(address)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23-27):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#24)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#26)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23-L27):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L24)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L26)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23-L27", + "id": "5fb57eb2a5139fdffbb315bf81a08464938d5f19d8b87e1c292d5be33d8ddd40", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 830, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 40, + 41, + 42, + 43, + 44 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 25, + "length": 1510, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "bad3(address)" } }, { "type": "node", - "name": "varChanger()", + "name": "externalCaller(target)", "source_mapping": { - "start": 865, - "length": 12, + "start": 877, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40 + 41 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 755, - "length": 170, + "start": 830, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, 40, 41, - 42 + 42, + 43, + 44 ], "starting_column": 5, "ending_column": 6 @@ -3757,7 +4151,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3823,54 +4217,62 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "address(target).call()", "source_mapping": { - "start": 1295, - "length": 25, + "start": 1329, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59 + 60 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "externalCaller", "source_mapping": { - "start": 1255, - "length": 72, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 58, 59, - 60 + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -3881,7 +4283,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3947,169 +4349,64 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#37-42):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#38)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#51)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#39)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#39)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#40)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#59)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L37-L42):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L38)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L51)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L39)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L39)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L59)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L37-L42", - "id": "f8ae59addfdbac8f20e5440f9a184916be6ddefc82424d7c3f29a226c4f2795f", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad5", - "source_mapping": { - "start": 931, - "length": 128, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 25, - "length": 1304, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad5(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "externalCaller(target)", "source_mapping": { - "start": 978, - "length": 21, + "start": 877, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45 + 41 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 931, - "length": 128, + "start": 830, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48 + 40, + 41, + 42, + 43, + 44 ], "starting_column": 5, "ending_column": 6 @@ -4120,7 +4417,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4186,53 +4483,62 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "address(target).call()", "source_mapping": { - "start": 1211, - "length": 31, + "start": 1329, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55 + 60 ], "starting_column": 9, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "externalCaller", "source_mapping": { - "start": 1158, - "length": 91, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56 + 59, + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -4243,7 +4549,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4309,13 +4615,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "externalCaller(address)" } } }, @@ -4327,7 +4642,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1009, + "start": 909, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -4335,7 +4650,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46 + 42 ], "starting_column": 9, "ending_column": 21 @@ -4343,21 +4658,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 931, - "length": 128, + "start": 830, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48 + 40, + 41, + 42, + 43, + 44 ], "starting_column": 5, "ending_column": 6 @@ -4368,7 +4683,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4434,13 +4749,22 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, @@ -4453,7 +4777,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1295, + "start": 1501, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -4461,7 +4785,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59 + 68 ], "starting_column": 9, "ending_column": 34 @@ -4471,7 +4795,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1255, + "start": 1461, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -4479,9 +4803,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 58, - 59, - 60 + 67, + 68, + 69 ], "starting_column": 5, "ending_column": 6 @@ -4492,7 +4816,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 25, - "length": 1304, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4558,7 +4882,16 @@ 59, 60, 61, - 62 + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 1, "ending_column": 0 @@ -4574,10 +4907,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#44-48):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#45)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#46)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#59)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L44-L48):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L45)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L59)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L44-L48", - "id": "944f4ca691fcae3a55ccd543406d1eb8e969ab1b5d716cc975d4656f998f08f9", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#40-44):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#41)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#60)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#42)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40-L44):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L41)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L60)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L42)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40-L44", + "id": "a810049262dd308ddb72c1e0ff5f221cc85389c1e0a91b3e9c1eb06264e8de75", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol b/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol index c1b08e29a..0cd4c90fe 100644 --- a/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol +++ b/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol @@ -4,6 +4,15 @@ contract ReentrancyBenign { uint8 anotherVariableToChange; uint8 counter = 0; + // Should not detect reentrancy in constructor + constructor(address addr) public { + (bool success,) = addr.call(""); + if (!success) { + revert(); + } + counter += 1; + } + function bad0() public { (bool success,) = msg.sender.call(""); if (!success) { diff --git a/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json index f4463d9c9..c3a8c8343 100644 --- a/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json @@ -4,23 +4,22 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 119, - "length": 155, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -31,7 +30,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -98,52 +97,60 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad4(address)" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 152, - "length": 37, + "start": 1064, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 48 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 119, - "length": 155, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -154,7 +161,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -221,13 +228,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad4(address)" } } }, @@ -237,41 +253,37 @@ }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "address(target).call()", "source_mapping": { - "start": 152, - "length": 37, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 61 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "externalCaller", "source_mapping": { - "start": 119, - "length": 155, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -282,7 +294,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -349,13 +361,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "externalCaller(address)" } } }, @@ -365,41 +386,40 @@ }, { "type": "node", - "name": "counter += 1", + "name": "ethSender(address(0))", "source_mapping": { - "start": 255, - "length": 12, + "start": 1096, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 12 + 49 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 119, - "length": 155, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -410,7 +430,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -477,140 +497,34 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#7-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#8)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L7-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L8)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L7-L13", - "id": "06215fa32247bcf7f91d727b63e2ab6b76b307c4521206d7afe6eaa591bc3183", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 280, - "length": 135, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 15, - 16, - 17, - 18, - 19 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad1(address)" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 327, + "start": 1477, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -618,7 +532,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16 + 65 ], "starting_column": 9, "ending_column": 42 @@ -626,21 +540,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "ethSender", "source_mapping": { - "start": 280, - "length": 135, + "start": 1424, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -651,7 +563,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -718,55 +630,65 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "ethSender(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 327, - "length": 33, + "start": 1064, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16 + 48 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad4", "source_mapping": { - "start": 280, - "length": 135, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -777,7 +699,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -844,13 +766,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad4(address)" } } }, @@ -860,39 +791,37 @@ }, { "type": "node", - "name": "counter += 1", + "name": "address(target).call()", "source_mapping": { - "start": 396, - "length": 12, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 18 + 61 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "externalCaller", "source_mapping": { - "start": 280, - "length": 135, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -903,7 +832,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -970,145 +899,170 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#15-19):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#16)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#18)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L15-L19):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L18)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L15-L19", - "id": "ae6f8d6b98538fe324c8bbbcb19a0729901bc42fc166a1b1f0927b0f3f0d185f", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad2", + "type": "node", + "name": "ethSender(address(0))", "source_mapping": { - "start": 421, - "length": 243, + "start": 1096, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 49 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad4", "source_mapping": { - "start": 28, - "length": 1353, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, 47, 48, 49, 50, 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 + 52 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad4(address)" } - }, - "signature": "bad2(address)" + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 468, + "start": 1477, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -1116,7 +1070,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 22 + 65 ], "starting_column": 9, "ending_column": 42 @@ -1124,26 +1078,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "ethSender", "source_mapping": { - "start": 421, - "length": 243, + "start": 1424, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -1154,7 +1101,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1221,60 +1168,65 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "ethSender(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "varChanger()", "source_mapping": { - "start": 538, - "length": 36, + "start": 1127, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 50 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 421, - "length": 243, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1285,7 +1237,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1352,25 +1304,292 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" + } + }, + { + "type": "node", + "name": "anotherVariableToChange ++", + "source_mapping": { + "start": 1563, + "length": 25, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 69 + ], + "starting_column": 9, + "ending_column": 34 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "varChanger", + "source_mapping": { + "start": 1523, + "length": 72, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 68, + 69, + 70 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "varChanger()" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47-L52", + "id": "09715812e28a5537647f577ab2ae708e7a3c903caf67e0ea43e15320f8a602c5", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 496, + "length": 135, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls" + }, + "signature": "bad1(address)" } }, { "type": "node", "name": "(success) = target.call()", "source_mapping": { - "start": 468, + "start": 543, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -1378,7 +1597,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 22 + 25 ], "starting_column": 9, "ending_column": 42 @@ -1386,26 +1605,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 243, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, 24, 25, 26, 27, - 28, - 29, - 30 + 28 ], "starting_column": 5, "ending_column": 6 @@ -1416,7 +1630,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1483,60 +1697,64 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "(success) = target.call()", "source_mapping": { - "start": 538, - "length": 36, + "start": 543, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 25 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 243, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, 24, 25, 26, 27, - 28, - 29, - 30 + 28 ], "starting_column": 5, "ending_column": 6 @@ -1547,7 +1765,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1614,13 +1832,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } }, @@ -1632,7 +1859,7 @@ "type": "node", "name": "counter += 1", "source_mapping": { - "start": 588, + "start": 612, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -1640,34 +1867,29 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 27 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 243, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, 24, 25, 26, 27, - 28, - 29, - 30 + 28 ], "starting_column": 5, "ending_column": 6 @@ -1678,7 +1900,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1745,13 +1967,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } }, @@ -1761,10 +1992,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#21-30):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#22)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#24)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#24)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#25)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L21-L30):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L22)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L25)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L21-L30", - "id": "a479507a21775d1c9b2a90e6f8d5698b6cb4a4e54454dd67571ff5850f71486a", + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#27)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L27)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24-L28", + "id": "182811ddaccda6e1fc2f65594a377c1592929956b04e6e52c5ad7c0121f0c809", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -1773,21 +2004,26 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 670, - "length": 125, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 30, + 31, 32, 33, 34, 35, - 36 + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -1798,7 +2034,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1865,50 +2101,64 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad2(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "(success) = target.call()", "source_mapping": { - "start": 717, - "length": 22, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 31 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 670, - "length": 125, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 30, + 31, 32, 33, 34, 35, - 36 + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -1919,7 +2169,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1986,13 +2236,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad2(address)" } } }, @@ -2002,134 +2261,10 @@ }, { "type": "node", - "name": "address(target).call()", - "source_mapping": { - "start": 1171, - "length": 24, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 52 - ], - "starting_column": 9, - "ending_column": 33 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "externalCaller", - "source_mapping": { - "start": 1113, - "length": 89, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 51, - 52, - 53 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "externalCaller(address)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" - } - }, - { - "type": "node", - "name": "externalCaller(target)", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 717, - "length": 22, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2138,27 +2273,32 @@ "lines": [ 33 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 670, - "length": 125, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 30, + 31, 32, 33, 34, 35, - 36 + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2169,7 +2309,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2236,53 +2376,69 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 31 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad2", "source_mapping": { - "start": 1113, - "length": 89, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2293,7 +2449,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2360,13 +2516,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad2(address)" } } }, @@ -2376,39 +2541,44 @@ }, { "type": "node", - "name": "varChanger()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 749, - "length": 12, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 34 + 33 ], - "starting_column": 9, - "ending_column": 21 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 670, - "length": 125, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 30, + 31, 32, 33, 34, 35, - 36 + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2419,7 +2589,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2486,54 +2656,69 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "counter += 1", "source_mapping": { - "start": 1347, - "length": 25, + "start": 804, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 34 ], - "starting_column": 9, - "ending_column": 34 + "starting_column": 13, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "bad2", "source_mapping": { - "start": 1307, - "length": 72, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2544,7 +2729,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2611,26 +2796,35 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "bad2(address)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "variable_name": "counter" } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#32-36):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#52)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#34)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L32-L36):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L52)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L34)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L32-L36", - "id": "a8f0c602502e3d97630ba10da72929525b99d36c0bfedbb813fb4d39aa736638", + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#31)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#34)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L31)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L34)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L30-L39", + "id": "252ced5708ae1cf4a55673e963669257e8c4f2601c814c635fde84d478612e2a", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2639,22 +2833,23 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad0", "source_mapping": { - "start": 801, - "length": 172, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2665,7 +2860,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2732,51 +2927,61 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad0()" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 848, - "length": 22, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 17 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad0", "source_mapping": { - "start": 801, - "length": 172, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2787,7 +2992,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2854,13 +3059,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad0()" } } }, @@ -2870,37 +3084,41 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 17 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad0", "source_mapping": { - "start": 1113, - "length": 89, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2911,7 +3129,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2978,13 +3196,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad0()" } } }, @@ -2994,164 +3221,41 @@ }, { "type": "node", - "name": "ethSender(address(0))", - "source_mapping": { - "start": 880, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 40 - ], - "starting_column": 9, - "ending_column": 30 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad4", - "source_mapping": { - "start": 801, - "length": 172, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad4(address)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls" - } - }, - { - "type": "node", - "name": "address(target).call.value(1)()", + "name": "counter += 1", "source_mapping": { - "start": 1261, - "length": 33, + "start": 471, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 21 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad0", "source_mapping": { - "start": 1208, - "length": 93, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -3162,7 +3266,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3229,56 +3333,188 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "counter" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16-L22", + "id": "7222cf72aee6330979168010b682e7d820989fbbf9a23906914e967a0f5533e6", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "externalCaller(target)", + "type": "function", + "name": "bad5", "source_mapping": { - "start": 848, - "length": 22, + "start": 1195, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 54, + 55, + 56, + 57, + 58 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad4", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 801, - "length": 172, + "start": 28, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, 38, 39, 40, 41, 42, - 43 + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad5(address)" + } + }, + { + "type": "node", + "name": "ethSender(address(0))", + "source_mapping": { + "start": 1242, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 55 + ], + "starting_column": 9, + "ending_column": 30 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad5", + "source_mapping": { + "start": 1195, + "length": 128, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3289,7 +3525,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3356,53 +3592,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 1477, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 65 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "ethSender", "source_mapping": { - "start": 1113, - "length": 89, + "start": 1424, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -3413,7 +3658,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3480,13 +3725,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "ethSender(address)" } } }, @@ -3496,40 +3750,39 @@ }, { "type": "node", - "name": "ethSender(address(0))", + "name": "varChanger()", "source_mapping": { - "start": 880, - "length": 21, + "start": 1273, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40 + 56 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 801, - "length": 172, + "start": 1195, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3540,7 +3793,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3607,53 +3860,63 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1261, - "length": 33, + "start": 1563, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 69 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "varChanger", "source_mapping": { - "start": 1208, - "length": 93, + "start": 1523, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -3664,7 +3927,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3731,56 +3994,188 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "varChanger()" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#55)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L55)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L54-L58", + "id": "b371cf739f2ef594320a33b4d707024727f7fc7cabf48f9946f65653429b671e", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 886, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "bad3(address)" } }, { "type": "node", - "name": "varChanger()", + "name": "externalCaller(target)", "source_mapping": { - "start": 911, - "length": 12, + "start": 933, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41 + 42 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 801, - "length": 172, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, 41, 42, - 43 + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -3791,7 +4186,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3858,54 +4253,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "address(target).call()", "source_mapping": { - "start": 1347, - "length": 25, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 61 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "externalCaller", "source_mapping": { - "start": 1307, - "length": 72, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, 60, - 61 + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -3916,7 +4319,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3983,170 +4386,64 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#38-43):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#39)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#52)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#40)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#56)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#40)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#56)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#41)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L38-L43):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L39)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L52)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L40)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L56)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L40)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L56)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L38-L43", - "id": "ed01a6eca7c4b485a34d6d66adb1e0d47e622663622a208c823c920e6d377aca", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad5", - "source_mapping": { - "start": 979, - "length": 128, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 45, - 46, - 47, - 48, - 49 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad5(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "externalCaller(target)", "source_mapping": { - "start": 1026, - "length": 21, + "start": 933, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46 + 42 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 979, - "length": 128, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4157,7 +4454,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4224,53 +4521,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "address(target).call()", "source_mapping": { - "start": 1261, - "length": 33, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "externalCaller", "source_mapping": { - "start": 1208, - "length": 93, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -4281,7 +4587,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4348,13 +4654,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "externalCaller(address)" } } }, @@ -4366,7 +4681,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1057, + "start": 965, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -4374,7 +4689,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47 + 43 ], "starting_column": 9, "ending_column": 21 @@ -4382,21 +4697,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 979, - "length": 128, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4407,7 +4722,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4474,13 +4789,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, @@ -4493,7 +4817,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1347, + "start": 1563, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -4501,7 +4825,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 69 ], "starting_column": 9, "ending_column": 34 @@ -4511,7 +4835,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1307, + "start": 1523, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -4519,9 +4843,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -4532,7 +4856,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4599,7 +4923,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4615,10 +4948,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#45-49):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#46)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#56)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#47)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L45-L49):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L46)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L56)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L45-L49", - "id": "3b1a0f56972cc373bb64019a51f2424653de8fab99fb3941328f1c98f358e766", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41-L45", + "id": "b4ca5fb9ad17bbab425a11b56f4fb0466db3680404ffb27f185072af6033dae3", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol b/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol index c1b08e29a..0cd4c90fe 100644 --- a/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol +++ b/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol @@ -4,6 +4,15 @@ contract ReentrancyBenign { uint8 anotherVariableToChange; uint8 counter = 0; + // Should not detect reentrancy in constructor + constructor(address addr) public { + (bool success,) = addr.call(""); + if (!success) { + revert(); + } + counter += 1; + } + function bad0() public { (bool success,) = msg.sender.call(""); if (!success) { diff --git a/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json index 9aae3d210..58df7138f 100644 --- a/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json @@ -4,23 +4,26 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 119, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -31,7 +34,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -98,52 +101,64 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 152, - "length": 37, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 31 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 119, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -154,7 +169,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -221,13 +236,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } }, @@ -237,41 +261,44 @@ }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 152, - "length": 37, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 33 ], - "starting_column": 9, - "ending_column": 46 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 119, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -282,7 +309,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -349,221 +376,59 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "counter += 1", + "name": "(success) = target.call()", "source_mapping": { - "start": 255, - "length": 12, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 12 + 31 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", - "source_mapping": { - "start": 119, - "length": 155, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad0()" - } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#7-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#8)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L7-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L8)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L7-L13", - "id": "e35d0f014a7459e09ea372373807f325e4c901c8412f473d46c93b949e8b4908", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 280, - "length": 135, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 15, - 16, - 17, - 18, - 19 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "name": "bad2", "source_mapping": { - "start": 28, - "length": 1353, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, 30, 31, 32, @@ -573,74 +438,7 @@ 36, 37, 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad1(address)" - } - }, - { - "type": "node", - "name": "(success) = target.call()", - "source_mapping": { - "start": 327, - "length": 33, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 16 - ], - "starting_column": 9, - "ending_column": 42 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 280, - "length": 135, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 15, - 16, - 17, - 18, - 19 + 39 ], "starting_column": 5, "ending_column": 6 @@ -651,7 +449,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -718,55 +516,69 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 327, - "length": 33, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16 + 33 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 280, - "length": 135, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -777,7 +589,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -844,13 +656,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, @@ -862,7 +683,7 @@ "type": "node", "name": "counter += 1", "source_mapping": { - "start": 396, + "start": 804, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -870,29 +691,34 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 18 + 34 ], - "starting_column": 9, - "ending_column": 21 + "starting_column": 13, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 280, - "length": 135, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -903,7 +729,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -970,13 +796,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, @@ -986,10 +821,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#15-19):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#16)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#18)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L15-L19):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L18)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L15-L19", - "id": "ad393dc7d573b714cb2f23bd3edcc782fe4e087293db87efb6fcf2ca78c13002", + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#31)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#34)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L31)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L34)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L30-L39", + "id": "3c650a2918e51e0de52806ff655cd61f80b0b71fa3d15c7c5bf82702827ef167", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -998,26 +833,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 421, - "length": 243, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1028,7 +858,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1095,55 +925,192 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } - }, - "signature": "bad2(address)" + }, + "signature": "bad3(address)" + } + }, + { + "type": "node", + "name": "externalCaller(target)", + "source_mapping": { + "start": 933, + "length": 22, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 42 + ], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 886, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad3(address)" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call()", "source_mapping": { - "start": 468, - "length": 33, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 22 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 421, - "length": 243, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1154,7 +1121,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1221,60 +1188,64 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "externalCaller(target)", "source_mapping": { - "start": 538, - "length": 36, + "start": 933, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 42 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 421, - "length": 243, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1285,7 +1256,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1352,60 +1323,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call()", "source_mapping": { - "start": 468, - "length": 33, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 22 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 421, - "length": 243, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1416,7 +1389,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1483,13 +1456,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, @@ -1499,44 +1481,39 @@ }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "varChanger()", "source_mapping": { - "start": 538, - "length": 36, + "start": 965, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 43 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 421, - "length": 243, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1547,7 +1524,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1614,60 +1591,63 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "counter += 1", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 588, - "length": 12, + "start": 1563, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 69 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "varChanger", "source_mapping": { - "start": 421, - "length": 243, + "start": 1523, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -1678,7 +1658,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1745,26 +1725,35 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "varChanger()" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "counter" + "variable_name": "anotherVariableToChange" } } ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#21-30):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#22)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#24)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#24)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#25)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L21-L30):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L22)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L25)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L21-L30", - "id": "416fe229b7f234a232cd7727df5925368d4abd38be42a4a774f4d3b7d93c0707", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41-L45", + "id": "58281d2d0d4b435e02839ff31a2390af2ba44c481c46231470a3259a6a3bedc3", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -1773,21 +1762,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 670, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1798,7 +1787,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1865,50 +1854,59 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "(success) = target.call()", "source_mapping": { - "start": 717, - "length": 22, + "start": 543, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 25 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 670, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1919,7 +1917,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1986,13 +1984,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } } }, @@ -2002,37 +2009,39 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 543, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 25 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad1", "source_mapping": { - "start": 1113, - "length": 89, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2043,7 +2052,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2110,13 +2119,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad1(address)" } } }, @@ -2126,39 +2144,39 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "counter += 1", "source_mapping": { - "start": 717, - "length": 22, + "start": 612, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 27 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 670, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2169,7 +2187,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2236,53 +2254,192 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } } }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#27)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L27)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24-L28", + "id": "8f0d7d7d0fe7ab37eac4842bec23c83b63015f99144343b9d4b2201fda3ec73b", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 335, + "length": 155, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad0()" } }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 17 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad0", "source_mapping": { - "start": 1113, - "length": 89, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2293,7 +2450,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2360,55 +2517,66 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "varChanger()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 749, - "length": 12, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 34 + 17 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 670, - "length": 125, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2419,7 +2587,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2486,54 +2654,66 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "counter += 1", "source_mapping": { - "start": 1347, - "length": 25, + "start": 471, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 21 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "bad0", "source_mapping": { - "start": 1307, - "length": 72, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2544,7 +2724,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2611,26 +2791,35 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "bad0()" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "variable_name": "counter" } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#32-36):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#52)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#34)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L32-L36):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L52)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L34)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L32-L36", - "id": "e1fae91060d6fa1e5a3655e7bd39bf087c5c66ddc73630646dff0ba23c65dfd5", + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16-L22", + "id": "a7b654e48f473524c116a9596c90ad440fb301bfdf4906256200347e7d5b052f", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2641,7 +2830,7 @@ "type": "function", "name": "bad4", "source_mapping": { - "start": 801, + "start": 1017, "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -2649,12 +2838,12 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -2665,7 +2854,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2732,7 +2921,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -2745,7 +2943,7 @@ "type": "node", "name": "externalCaller(target)", "source_mapping": { - "start": 848, + "start": 1064, "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -2753,7 +2951,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 48 ], "starting_column": 9, "ending_column": 31 @@ -2763,7 +2961,7 @@ "type": "function", "name": "bad4", "source_mapping": { - "start": 801, + "start": 1017, "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -2771,12 +2969,12 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -2787,7 +2985,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2854,7 +3052,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -2872,7 +3079,7 @@ "type": "node", "name": "address(target).call()", "source_mapping": { - "start": 1171, + "start": 1387, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -2880,7 +3087,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 61 ], "starting_column": 9, "ending_column": 33 @@ -2890,7 +3097,7 @@ "type": "function", "name": "externalCaller", "source_mapping": { - "start": 1113, + "start": 1329, "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -2898,9 +3105,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -2911,7 +3118,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2978,7 +3185,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -2996,7 +3212,7 @@ "type": "node", "name": "ethSender(address(0))", "source_mapping": { - "start": 880, + "start": 1096, "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3004,7 +3220,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40 + 49 ], "starting_column": 9, "ending_column": 30 @@ -3014,7 +3230,7 @@ "type": "function", "name": "bad4", "source_mapping": { - "start": 801, + "start": 1017, "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3022,12 +3238,12 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -3038,7 +3254,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3105,7 +3321,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3123,7 +3348,7 @@ "type": "node", "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1261, + "start": 1477, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3131,7 +3356,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 65 ], "starting_column": 9, "ending_column": 42 @@ -3141,7 +3366,7 @@ "type": "function", "name": "ethSender", "source_mapping": { - "start": 1208, + "start": 1424, "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3149,9 +3374,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -3162,7 +3387,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3229,7 +3454,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3247,7 +3481,7 @@ "type": "node", "name": "externalCaller(target)", "source_mapping": { - "start": 848, + "start": 1064, "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3255,7 +3489,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 48 ], "starting_column": 9, "ending_column": 31 @@ -3265,7 +3499,7 @@ "type": "function", "name": "bad4", "source_mapping": { - "start": 801, + "start": 1017, "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3273,12 +3507,12 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -3289,7 +3523,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3356,7 +3590,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3374,7 +3617,7 @@ "type": "node", "name": "address(target).call()", "source_mapping": { - "start": 1171, + "start": 1387, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3382,7 +3625,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 61 ], "starting_column": 9, "ending_column": 33 @@ -3392,7 +3635,7 @@ "type": "function", "name": "externalCaller", "source_mapping": { - "start": 1113, + "start": 1329, "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3400,9 +3643,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -3413,7 +3656,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3480,7 +3723,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3498,7 +3750,7 @@ "type": "node", "name": "ethSender(address(0))", "source_mapping": { - "start": 880, + "start": 1096, "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3506,7 +3758,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40 + 49 ], "starting_column": 9, "ending_column": 30 @@ -3516,7 +3768,7 @@ "type": "function", "name": "bad4", "source_mapping": { - "start": 801, + "start": 1017, "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3524,12 +3776,12 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -3540,7 +3792,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3607,7 +3859,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3625,7 +3886,7 @@ "type": "node", "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1261, + "start": 1477, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3633,7 +3894,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 65 ], "starting_column": 9, "ending_column": 42 @@ -3643,7 +3904,7 @@ "type": "function", "name": "ethSender", "source_mapping": { - "start": 1208, + "start": 1424, "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3651,9 +3912,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -3664,7 +3925,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3731,7 +3992,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3749,7 +4019,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 911, + "start": 1127, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3757,7 +4027,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41 + 50 ], "starting_column": 9, "ending_column": 21 @@ -3767,7 +4037,7 @@ "type": "function", "name": "bad4", "source_mapping": { - "start": 801, + "start": 1017, "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3775,12 +4045,12 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -3791,7 +4061,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3858,7 +4128,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3877,7 +4156,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1347, + "start": 1563, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3885,7 +4164,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 69 ], "starting_column": 9, "ending_column": 34 @@ -3895,7 +4174,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1307, + "start": 1523, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -3903,9 +4182,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -3916,7 +4195,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3983,7 +4262,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -3999,10 +4287,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#38-43):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#39)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#52)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#40)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#56)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#40)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#56)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#41)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L38-L43):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L39)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L52)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L40)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L56)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L40)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L56)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L38-L43", - "id": "d049c8562c4857b9d8bc23ceca965bd5fc572520db59bc43c0010f03c1d08936", + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L47-L52", + "id": "d5049610fe8d402e1f27f6a2d900c97748d1fdc7792b87c2c6bf6eb2a3233108", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -4013,7 +4301,7 @@ "type": "function", "name": "bad5", "source_mapping": { - "start": 979, + "start": 1195, "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4021,11 +4309,11 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -4036,7 +4324,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4103,7 +4391,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4116,7 +4413,7 @@ "type": "node", "name": "ethSender(address(0))", "source_mapping": { - "start": 1026, + "start": 1242, "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4124,7 +4421,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46 + 55 ], "starting_column": 9, "ending_column": 30 @@ -4134,7 +4431,7 @@ "type": "function", "name": "bad5", "source_mapping": { - "start": 979, + "start": 1195, "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4142,11 +4439,11 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -4157,7 +4454,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4224,7 +4521,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4242,7 +4548,7 @@ "type": "node", "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1261, + "start": 1477, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4250,7 +4556,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 65 ], "starting_column": 9, "ending_column": 42 @@ -4260,7 +4566,7 @@ "type": "function", "name": "ethSender", "source_mapping": { - "start": 1208, + "start": 1424, "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4268,9 +4574,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -4281,7 +4587,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4348,7 +4654,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4366,7 +4681,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1057, + "start": 1273, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4374,7 +4689,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47 + 56 ], "starting_column": 9, "ending_column": 21 @@ -4384,7 +4699,7 @@ "type": "function", "name": "bad5", "source_mapping": { - "start": 979, + "start": 1195, "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4392,11 +4707,11 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -4407,7 +4722,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4474,7 +4789,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4493,7 +4817,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1347, + "start": 1563, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4501,7 +4825,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 69 ], "starting_column": 9, "ending_column": 34 @@ -4511,7 +4835,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1307, + "start": 1523, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", @@ -4519,9 +4843,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -4532,7 +4856,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4599,7 +4923,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4615,10 +4948,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#45-49):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#46)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#56)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#47)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L45-L49):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L46)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L56)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L47)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L45-L49", - "id": "8fc09eeb31a7d9cdd78f1271f6dc486187ef7e75d35bf205c1e8a4cf70bd5ab9", + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#55)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L55)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L54-L58", + "id": "e7c7c3ed238e9eb57245ccd9723aaaf8e9e1b2948b43d39ba9ab99228fb09ec4", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol b/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol index 91ae68cd0..9f25b8a40 100644 --- a/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol +++ b/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol @@ -4,6 +4,15 @@ contract ReentrancyBenign { uint8 anotherVariableToChange; uint8 counter = 0; + // Should not detect reentrancy in constructor + constructor(address addr) { + (bool success,) = addr.call(""); + if (!success) { + revert(); + } + counter += 1; + } + function bad0() public { (bool success,) = msg.sender.call(""); if (!success) { diff --git a/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json index 9c6041cdf..0f1a36a4a 100644 --- a/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json @@ -6,7 +6,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 119, + "start": 328, "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -14,13 +14,13 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -31,7 +31,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -98,7 +98,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -111,7 +120,7 @@ "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 152, + "start": 361, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -119,7 +128,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 17 ], "starting_column": 9, "ending_column": 46 @@ -129,7 +138,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 119, + "start": 328, "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -137,13 +146,13 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -154,7 +163,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -221,7 +230,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -239,7 +257,7 @@ "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 152, + "start": 361, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -247,7 +265,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 8 + 17 ], "starting_column": 9, "ending_column": 46 @@ -257,7 +275,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 119, + "start": 328, "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -265,13 +283,13 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -282,7 +300,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -349,7 +367,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -367,7 +394,7 @@ "type": "node", "name": "counter += 1", "source_mapping": { - "start": 255, + "start": 464, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -375,7 +402,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 12 + 21 ], "starting_column": 9, "ending_column": 21 @@ -385,7 +412,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 119, + "start": 328, "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -393,13 +420,13 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -410,7 +437,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -477,7 +504,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -493,10 +529,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#7-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#8)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L7-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L8)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L7-L13", - "id": "b162165ec474792dc887b42c40e2d6ba28de0bde22bebdc2b5f63381bde85086", + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L16-L22", + "id": "048313a93ec637e415b1c374abb90f2893f9c9952499c48b5872fe196cf55299", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -505,21 +541,26 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 280, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -530,7 +571,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -597,20 +638,29 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } }, { "type": "node", "name": "(success) = target.call()", "source_mapping": { - "start": 327, + "start": 677, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -618,7 +668,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16 + 31 ], "starting_column": 9, "ending_column": 42 @@ -626,21 +676,26 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 280, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -651,7 +706,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -718,13 +773,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, @@ -734,39 +798,44 @@ }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call{value: 1000}()", "source_mapping": { - "start": 327, - "length": 33, + "start": 747, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16 + 33 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 280, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -777,7 +846,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -844,55 +913,69 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "counter += 1", + "name": "(success) = target.call()", "source_mapping": { - "start": 396, - "length": 12, + "start": 677, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 18 + 31 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 280, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -903,7 +986,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -970,98 +1053,59 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#15-19):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#16)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#18)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L15-L19):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L16)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L18)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L15-L19", - "id": "bc777bbc032af8fcb23146285a47012df0d4a7825596c3fc57a27e8758500dd2", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad2", + "type": "node", + "name": "address(target).call{value: 1000}()", "source_mapping": { - "start": 421, - "length": 243, + "start": 747, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 33 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad2", "source_mapping": { - "start": 28, - "length": 1353, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, 30, 31, 32, @@ -1071,79 +1115,7 @@ 36, 37, 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad2(address)" - } - }, - { - "type": "node", - "name": "(success) = target.call()", - "source_mapping": { - "start": 468, - "length": 33, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 22 - ], - "starting_column": 9, - "ending_column": 42 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 421, - "length": 243, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 39 ], "starting_column": 5, "ending_column": 6 @@ -1154,7 +1126,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1221,7 +1193,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -1232,32 +1213,32 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call{value: 1000}()", + "name": "counter += 1", "source_mapping": { - "start": 538, - "length": 36, + "start": 797, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 34 ], "starting_column": 13, - "ending_column": 49 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad2", "source_mapping": { - "start": 421, + "start": 630, "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -1265,16 +1246,16 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -1285,7 +1266,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1352,7 +1333,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -1363,39 +1353,74 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "counter" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#31)\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#34)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L31)\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L34)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L30-L39", + "id": "6717f4516d88a5c7e163ec2f50f29be4b3ea7e2df36e9fbc688489a69fef5d77", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "(success) = target.call()", + "type": "function", + "name": "bad4", "source_mapping": { - "start": 468, - "length": 33, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 22 + 47, + 48, + 49, + 50, + 51, + 52 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad2", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 421, - "length": 243, + "start": 28, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, 21, 22, 23, @@ -1405,7 +1430,93 @@ 27, 28, 29, - 30 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad4(address)" + } + }, + { + "type": "node", + "name": "externalCaller(target)", + "source_mapping": { + "start": 1057, + "length": 22, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 48 + ], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad4", + "source_mapping": { + "start": 1010, + "length": 172, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1416,7 +1527,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1483,60 +1594,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call{value: 1000}()", + "name": "address(target).call()", "source_mapping": { - "start": 538, - "length": 36, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 61 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 421, - "length": 243, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1547,7 +1660,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1614,13 +1727,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, @@ -1630,44 +1752,40 @@ }, { "type": "node", - "name": "counter += 1", + "name": "ethSender(address(0))", "source_mapping": { - "start": 588, - "length": 12, + "start": 1089, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 49 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 421, - "length": 243, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1678,7 +1796,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1745,140 +1863,167 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#21-30):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#22)\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#24)\n\tExternal calls sending eth:\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#24)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#25)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L21-L30):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L22)\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24)\n\tExternal calls sending eth:\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L25)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L21-L30", - "id": "79c88ecb3f548fa798f9c5cbb0e3658e78510fbd1cbae4455df47ba39a6fa505", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad3", + "type": "node", + "name": "address(target).call{value: 1}()", "source_mapping": { - "start": 670, - "length": 125, + "start": 1470, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 65 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 42 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "ethSender", "source_mapping": { - "start": 28, - "length": 1353, + "start": 1417, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 + 64, + 65, + 66 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1562, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "ethSender(address)" } - }, - "signature": "bad3(address)" + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", "name": "externalCaller(target)", "source_mapping": { - "start": 717, + "start": 1057, "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -1886,7 +2031,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 48 ], "starting_column": 9, "ending_column": 31 @@ -1894,21 +2039,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 670, - "length": 125, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1919,7 +2065,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -1986,25 +2132,34 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", "name": "address(target).call()", "source_mapping": { - "start": 1171, + "start": 1380, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -2012,7 +2167,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 61 ], "starting_column": 9, "ending_column": 33 @@ -2022,7 +2177,7 @@ "type": "function", "name": "externalCaller", "source_mapping": { - "start": 1113, + "start": 1322, "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -2030,9 +2185,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -2043,7 +2198,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2110,7 +2265,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -2126,39 +2290,40 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "ethSender(address(0))", "source_mapping": { - "start": 717, - "length": 22, + "start": 1089, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 49 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 670, - "length": 125, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -2169,7 +2334,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2236,13 +2401,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, @@ -2252,37 +2426,37 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call{value: 1}()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 1470, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 65 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "ethSender", "source_mapping": { - "start": 1113, - "length": 89, + "start": 1417, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -2293,7 +2467,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2360,13 +2534,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "ethSender(address)" } } }, @@ -2378,7 +2561,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 749, + "start": 1120, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -2386,7 +2569,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 34 + 50 ], "starting_column": 9, "ending_column": 21 @@ -2394,21 +2577,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 670, - "length": 125, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -2419,7 +2603,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2486,13 +2670,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, @@ -2505,7 +2698,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1347, + "start": 1556, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -2513,7 +2706,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 69 ], "starting_column": 9, "ending_column": 34 @@ -2523,7 +2716,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1307, + "start": 1516, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -2531,9 +2724,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -2544,7 +2737,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2611,7 +2804,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -2627,10 +2829,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#32-36):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#52)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#34)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L32-L36):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L52)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L34)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L32-L36", - "id": "d8315c27e619d086ab8ec4206250374daad8449de43d0eb685dc2cb38376e6e3", + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#49)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#49)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L49)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L49)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47-L52", + "id": "a761807476d935cb91dbefd6f8fd28baaf9b805bf4df2fb9066c4c442d768980", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2639,22 +2841,21 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 801, - "length": 172, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2665,7 +2866,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2732,51 +2933,59 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "(success) = target.call()", "source_mapping": { - "start": 848, - "length": 22, + "start": 536, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 25 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 801, - "length": 172, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2787,7 +2996,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2854,13 +3063,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } } }, @@ -2870,37 +3088,39 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 536, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 25 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad1", "source_mapping": { - "start": 1113, - "length": 89, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2911,7 +3131,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -2978,13 +3198,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad1(address)" } } }, @@ -2994,40 +3223,39 @@ }, { "type": "node", - "name": "ethSender(address(0))", + "name": "counter += 1", "source_mapping": { - "start": 880, - "length": 21, + "start": 605, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40 + 27 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 801, - "length": 172, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -3038,7 +3266,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3105,53 +3333,188 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#27)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L27)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24-L28", + "id": "c80120e0907dee95cc562b53958082d0664ee15a3aaa617ac17e27d25ae48d46", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad5", + "source_mapping": { + "start": 1188, + "length": 128, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1562, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad5(address)" } }, { "type": "node", - "name": "address(target).call{value: 1}()", + "name": "ethSender(address(0))", "source_mapping": { - "start": 1261, - "length": 33, + "start": 1235, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 55 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad5", "source_mapping": { - "start": 1208, - "length": 93, + "start": 1188, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ + 54, 55, 56, - 57 + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3162,7 +3525,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3229,56 +3592,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "address(target).call{value: 1}()", "source_mapping": { - "start": 848, - "length": 22, + "start": 1470, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 39 + 65 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "ethSender", "source_mapping": { - "start": 801, - "length": 172, + "start": 1417, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -3289,7 +3658,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3356,13 +3725,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "ethSender(address)" } } }, @@ -3372,37 +3750,39 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "varChanger()", "source_mapping": { - "start": 1171, - "length": 24, + "start": 1266, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 52 + 56 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad5", "source_mapping": { - "start": 1113, - "length": 89, + "start": 1188, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 51, - 52, - 53 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3413,7 +3793,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3480,56 +3860,63 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 880, - "length": 21, + "start": 1556, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40 + 69 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "varChanger", "source_mapping": { - "start": 801, - "length": 172, + "start": 1516, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, - 41, - 42, - 43 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -3540,7 +3927,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3607,180 +3994,188 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "varChanger()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#55)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L55)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L54-L58", + "id": "d1495003f18e1d1814ff11bb252ae6d8a0d3a42338e6def154390acf5d1a4d55", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "address(target).call{value: 1}()", + "type": "function", + "name": "bad3", "source_mapping": { - "start": 1261, - "length": 33, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 41, + 42, + 43, + 44, + 45 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "ethSender", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 1208, - "length": 93, + "start": 28, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "ethSender(address)" + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "bad3(address)" } }, { "type": "node", - "name": "varChanger()", + "name": "externalCaller(target)", "source_mapping": { - "start": 911, - "length": 12, + "start": 926, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41 + 42 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 801, - "length": 172, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 38, - 39, - 40, 41, 42, - 43 + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -3791,7 +4186,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3858,54 +4253,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "address(target).call()", "source_mapping": { - "start": 1347, - "length": 25, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 61 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "externalCaller", "source_mapping": { - "start": 1307, - "length": 72, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, 60, - 61 + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -3916,7 +4319,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -3983,170 +4386,64 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#38-43):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#39)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#52)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#40)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#56)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#40)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#56)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#41)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L38-L43):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L39)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L52)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L40)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L56)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L40)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L56)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L38-L43", - "id": "693e60a81db5856504cce9c31c639630515a7bf4431ba129d2f1dfbef4caa0e6", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad5", - "source_mapping": { - "start": 979, - "length": 128, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 45, - 46, - 47, - 48, - 49 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1353, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad5(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "externalCaller(target)", "source_mapping": { - "start": 1026, - "length": 21, + "start": 926, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46 + 42 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 979, - "length": 128, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4157,7 +4454,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4224,53 +4521,62 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call{value: 1}()", + "name": "address(target).call()", "source_mapping": { - "start": 1261, - "length": 33, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "externalCaller", "source_mapping": { - "start": 1208, - "length": 93, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -4281,7 +4587,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4348,13 +4654,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "externalCaller(address)" } } }, @@ -4366,7 +4681,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1057, + "start": 958, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -4374,7 +4689,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47 + 43 ], "starting_column": 9, "ending_column": 21 @@ -4382,21 +4697,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 979, - "length": 128, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47, - 48, - 49 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4407,7 +4722,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4474,13 +4789,22 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, @@ -4493,7 +4817,7 @@ "type": "node", "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1347, + "start": 1556, "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -4501,7 +4825,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 69 ], "starting_column": 9, "ending_column": 34 @@ -4511,7 +4835,7 @@ "type": "function", "name": "varChanger", "source_mapping": { - "start": 1307, + "start": 1516, "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -4519,9 +4843,9 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -4532,7 +4856,7 @@ "name": "ReentrancyBenign", "source_mapping": { "start": 28, - "length": 1353, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", @@ -4599,7 +4923,16 @@ 60, 61, 62, - 63 + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 ], "starting_column": 1, "ending_column": 0 @@ -4615,10 +4948,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#45-49):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#46)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#56)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#47)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#60)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L45-L49):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L46)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L56)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L60)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L45-L49", - "id": "068323f92a1eaa2d419e19d35185150639a2b3f992b9b382972f13d546cd414d", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41-L45", + "id": "daed2df217460e31f6b03c385a5256ad0e29f973a06779d9b95c059c3c9c5c48", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json index 0e531c382..4505f3fc8 100644 --- a/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json @@ -4,101 +4,31 @@ "elements": [ { "type": "function", - "name": "executeProposal", + "name": "refund", "source_mapping": { - "start": 32955, - "length": 2978, + "start": 11531, + "length": 635, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 ], "starting_column": 5, "ending_column": 6 @@ -106,3874 +36,1451 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "DAO", + "name": "TokenCreation", "source_mapping": { - "start": 28296, - "length": 17108, + "start": 10437, + "length": 2342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - }, - { - "type": "node", - "name": "! isRecipientAllowed(p.recipient)", - "source_mapping": { - "start": 33981, - "length": 32, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 881 - ], - "starting_column": 13, - "ending_column": 45 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls" - } - }, - { - "type": "node", - "name": "allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())", - "source_mapping": { - "start": 43091, - "length": 289, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 1159, - 1160, - 1161, - 1162, - 1163 - ], - "starting_column": 13, - "ending_column": 71 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "isRecipientAllowed", - "source_mapping": { - "start": 42994, - "length": 457, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "isRecipientAllowed(address)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" - } - }, - { - "type": "node", - "name": "! p.recipient.call.value(p.amount)(_transactionData)", - "source_mapping": { - "start": 35109, - "length": 51, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 915 - ], - "starting_column": 17, - "ending_column": 68 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls" - } - }, - { - "type": "node", - "name": "! p.creator.send(p.proposalDeposit)", - "source_mapping": { - "start": 34718, - "length": 34, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 904 - ], - "starting_column": 17, - "ending_column": 51 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" - } - }, - { - "type": "node", - "name": "! p.recipient.call.value(p.amount)(_transactionData)", - "source_mapping": { - "start": 35109, - "length": 51, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 915 - ], - "starting_column": 17, - "ending_column": 68 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + }, + { + "type": "node", + "name": "extraBalance.balance >= extraBalance.accumulatedInput()", + "source_mapping": { + "start": 11704, + "length": 55, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 321 + ], + "starting_column": 17, + "ending_column": 72 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" + } + }, + { + "type": "node", + "name": "extraBalance.payOut(address(this),extraBalance.accumulatedInput())", + "source_mapping": { + "start": 11777, + "length": 67, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 322 + ], + "starting_column": 17, + "ending_column": 84 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" + } + }, + { + "type": "node", + "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "source_mapping": { + "start": 11893, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 325 + ], + "starting_column": 17, + "ending_column": 62 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" + } + }, + { + "type": "node", + "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "source_mapping": { + "start": 11893, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 325 + ], + "starting_column": 17, + "ending_column": 62 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "executeProposal(uint256,bytes)" + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" + } + }, + { + "type": "node", + "name": "weiGiven[msg.sender] = 0", + "source_mapping": { + "start": 12111, + "length": 24, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 329 + ], + "starting_column": 17, + "ending_column": 41 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "weiGiven" + } + } + ], + "description": "Reentrancy in TokenCreation.refund() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#318-332):\n\tExternal calls:\n\t- extraBalance.balance >= extraBalance.accumulatedInput() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#321)\n\t- extraBalance.payOut(address(this),extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#322)\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tExternal calls sending eth:\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tState variables written after the call(s):\n\t- weiGiven[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#329)\n", + "markdown": "Reentrancy in [TokenCreation.refund()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332):\n\tExternal calls:\n\t- [extraBalance.balance >= extraBalance.accumulatedInput()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L321)\n\t- [extraBalance.payOut(address(this),extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L322)\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tExternal calls sending eth:\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tState variables written after the call(s):\n\t- [weiGiven[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L329)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332", + "id": "c464e3c8a788029668f77cdff5d7e6a2af53a5ec0f79e21392a5910bfb9dcbe5", + "check": "reentrancy-eth", + "impact": "High", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "executeProposal", + "source_mapping": { + "start": 32955, + "length": 2978, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DAO", + "source_mapping": { + "start": 28296, + "length": 17108, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "executeProposal(uint256,bytes)" } }, { "type": "node", - "name": "p.proposalPassed = true", + "name": "! isRecipientAllowed(p.recipient)", "source_mapping": { - "start": 35198, - "length": 23, + "start": 33981, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 918 + 881 ], "starting_column": 13, - "ending_column": 36 + "ending_column": 45 }, "type_specific_fields": { "parent": { @@ -4630,125 +2137,53 @@ } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "closeProposal(_proposalID)", + "name": "allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())", "source_mapping": { - "start": 35817, - "length": 26, + "start": 43091, + "length": 289, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 933 - ], - "starting_column": 9, - "ending_column": 35 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 + 1159, + 1160, + 1161, + 1162, + 1163 + ], + "starting_column": 13, + "ending_column": 71 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "isRecipientAllowed", + "source_mapping": { + "start": 42994, + "length": 457, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167 ], "starting_column": 5, "ending_column": 6 @@ -5301,51 +2736,129 @@ "ending_column": 2 } }, - "signature": "executeProposal(uint256,bytes)" + "signature": "isRecipientAllowed(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "p.open = false", + "name": "! p.recipient.call.value(p.amount)(_transactionData)", "source_mapping": { - "start": 36121, - "length": 14, + "start": 35109, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 944 + 915 ], - "starting_column": 9, - "ending_column": 23 + "starting_column": 17, + "ending_column": 68 }, "type_specific_fields": { "parent": { "type": "function", - "name": "closeProposal", + "name": "executeProposal", "source_mapping": { - "start": 35940, - "length": 202, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 940, - 941, - 942, - 943, - 944, - 945 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -5898,31 +3411,30 @@ "ending_column": 2 } }, - "signature": "closeProposal(uint256)" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "rewardToken[address(this)] += p.amount", + "name": "! p.creator.send(p.proposalDeposit)", "source_mapping": { - "start": 35698, - "length": 38, + "start": 34718, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 928 + 904 ], "starting_column": 17, - "ending_column": 55 + "ending_column": 51 }, "type_specific_fields": { "parent": { @@ -6579,26 +4091,25 @@ } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "rewardToken" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "closeProposal(_proposalID)", + "name": "! p.recipient.call.value(p.amount)(_transactionData)", "source_mapping": { - "start": 35817, - "length": 26, + "start": 35109, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 933 + 915 ], - "starting_column": 9, - "ending_column": 35 + "starting_column": 17, + "ending_column": 68 }, "type_specific_fields": { "parent": { @@ -7255,46 +4766,124 @@ } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "sumOfProposalDeposits" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "sumOfProposalDeposits -= p.proposalDeposit", + "name": "p.proposalPassed = true", "source_mapping": { - "start": 36069, - "length": 42, + "start": 35198, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 943 + 918 ], "starting_column": 13, - "ending_column": 55 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "closeProposal", + "name": "executeProposal", "source_mapping": { - "start": 35940, - "length": 202, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 940, - 941, - 942, - 943, - 944, - 945 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -7847,31 +5436,31 @@ "ending_column": 2 } }, - "signature": "closeProposal(uint256)" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "sumOfProposalDeposits" + "variable_name": "proposals" } }, { "type": "node", - "name": "totalRewardToken += p.amount", + "name": "closeProposal(_proposalID)", "source_mapping": { - "start": 35754, - "length": 28, + "start": 35817, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 929 + 933 ], - "starting_column": 17, - "ending_column": 45 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { @@ -8441,267 +6030,133 @@ 1144, 1145, 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "totalRewardToken" - } - } - ], - "description": "Reentrancy in DAO.executeProposal(uint256,bytes) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#853-937):\n\tExternal calls:\n\t- ! isRecipientAllowed(p.recipient) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#881)\n\t\t- allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#1159-1163)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tExternal calls sending eth:\n\t- ! p.creator.send(p.proposalDeposit) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#904)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tState variables written after the call(s):\n\t- p.proposalPassed = true (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#918)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- p.open = false (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#944)\n\t- rewardToken[address(this)] += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#928)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- sumOfProposalDeposits -= p.proposalDeposit (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#943)\n\t- totalRewardToken += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#929)\n", - "markdown": "Reentrancy in [DAO.executeProposal(uint256,bytes)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937):\n\tExternal calls:\n\t- [! isRecipientAllowed(p.recipient)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L881)\n\t\t- [allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L1159-L1163)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tExternal calls sending eth:\n\t- [! p.creator.send(p.proposalDeposit)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L904)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tState variables written after the call(s):\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L918)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [p.open = false](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L944)\n\t- [rewardToken[address(this)] += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L928)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [sumOfProposalDeposits -= p.proposalDeposit](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L943)\n\t- [totalRewardToken += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L929)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937", - "id": "da2955efdedec834e2cbc56b913933ba273e4a4da5d9c5c6be9ff59c9249b84c", - "check": "reentrancy-eth", - "impact": "High", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "refund", - "source_mapping": { - "start": 11531, - "length": 635, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TokenCreation", - "source_mapping": { - "start": 10437, - "length": 2342, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 - ], - "starting_column": 1, - "ending_column": 2 + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "executeProposal(uint256,bytes)" } - }, - "signature": "refund()" + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "extraBalance.balance >= extraBalance.accumulatedInput()", + "name": "p.open = false", "source_mapping": { - "start": 11704, - "length": 55, + "start": 36121, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 321 + 944 ], - "starting_column": 17, - "ending_column": 72 + "starting_column": 9, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "closeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 35940, + "length": 202, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + 940, + 941, + 942, + 943, + 944, + 945 ], "starting_column": 5, "ending_column": 6 @@ -8709,136 +6164,675 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "closeProposal(uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "extraBalance.payOut(address(this),extraBalance.accumulatedInput())", + "name": "rewardToken[address(this)] += p.amount", "source_mapping": { - "start": 11777, - "length": 67, + "start": 35698, + "length": 38, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 322 + 928 ], "starting_column": 17, - "ending_column": 84 + "ending_column": 55 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "refund", - "source_mapping": { - "start": 11531, - "length": 635, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + "type": "function", + "name": "executeProposal", + "source_mapping": { + "start": 32955, + "length": 2978, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -8846,136 +6840,675 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "rewardToken" } }, { "type": "node", - "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "name": "closeProposal(_proposalID)", "source_mapping": { - "start": 11893, - "length": 45, + "start": 35817, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 325 + 933 ], - "starting_column": 17, - "ending_column": 62 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "executeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -8983,273 +7516,1272 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "sumOfProposalDeposits" } }, { "type": "node", - "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "name": "sumOfProposalDeposits -= p.proposalDeposit", "source_mapping": { - "start": 11893, - "length": 45, + "start": 36069, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 325 + 943 ], - "starting_column": 17, - "ending_column": 62 + "starting_column": 13, + "ending_column": 55 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "closeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 35940, + "length": 202, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TokenCreation", - "source_mapping": { - "start": 10437, - "length": 2342, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 940, + 941, + 942, + 943, + 944, + 945 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DAO", + "source_mapping": { + "start": 28296, + "length": 17108, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "closeProposal(uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "sumOfProposalDeposits" } }, { "type": "node", - "name": "weiGiven[msg.sender] = 0", + "name": "totalRewardToken += p.amount", "source_mapping": { - "start": 12111, - "length": 24, + "start": 35754, + "length": 28, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 329 + 929 ], "starting_column": 17, - "ending_column": 41 + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "executeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -9257,97 +8789,565 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "weiGiven" + "variable_name": "totalRewardToken" } } ], - "description": "Reentrancy in TokenCreation.refund() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#318-332):\n\tExternal calls:\n\t- extraBalance.balance >= extraBalance.accumulatedInput() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#321)\n\t- extraBalance.payOut(address(this),extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#322)\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tExternal calls sending eth:\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tState variables written after the call(s):\n\t- weiGiven[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#329)\n", - "markdown": "Reentrancy in [TokenCreation.refund()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332):\n\tExternal calls:\n\t- [extraBalance.balance >= extraBalance.accumulatedInput()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L321)\n\t- [extraBalance.payOut(address(this),extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L322)\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tExternal calls sending eth:\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tState variables written after the call(s):\n\t- [weiGiven[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L329)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332", - "id": "c464e3c8a788029668f77cdff5d7e6a2af53a5ec0f79e21392a5910bfb9dcbe5", + "description": "Reentrancy in DAO.executeProposal(uint256,bytes) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#853-937):\n\tExternal calls:\n\t- ! isRecipientAllowed(p.recipient) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#881)\n\t\t- allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#1159-1163)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tExternal calls sending eth:\n\t- ! p.creator.send(p.proposalDeposit) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#904)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tState variables written after the call(s):\n\t- p.proposalPassed = true (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#918)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- p.open = false (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#944)\n\t- rewardToken[address(this)] += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#928)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- sumOfProposalDeposits -= p.proposalDeposit (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#943)\n\t- totalRewardToken += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#929)\n", + "markdown": "Reentrancy in [DAO.executeProposal(uint256,bytes)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937):\n\tExternal calls:\n\t- [! isRecipientAllowed(p.recipient)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L881)\n\t\t- [allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L1159-L1163)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tExternal calls sending eth:\n\t- [! p.creator.send(p.proposalDeposit)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L904)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tState variables written after the call(s):\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L918)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [p.open = false](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L944)\n\t- [rewardToken[address(this)] += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L928)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [sumOfProposalDeposits -= p.proposalDeposit](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L943)\n\t- [totalRewardToken += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L929)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937", + "id": "da2955efdedec834e2cbc56b913933ba273e4a4da5d9c5c6be9ff59c9249b84c", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol b/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol index 1b17ec4b2..3e407accb 100644 --- a/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol +++ b/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol @@ -11,6 +11,16 @@ contract Reentrancy { userBalance[msg.sender] += msg.value; } + // Should not detect reentrancy in constructor + constructor() public { + // send userBalance[msg.sender] ethers to msg.sender + // if mgs.sender is a contract, it will call its fallback function + if (!(msg.sender.call.value(userBalance[msg.sender])())) { + revert(); + } + userBalance[msg.sender] = 0; + } + function withdrawBalance() public{ // send userBalance[msg.sender] ethers to msg.sender // if mgs.sender is a contract, it will call its fallback function diff --git a/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol.0.4.25.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol.0.4.25.ReentrancyEth.json index e31dd873a..975becb84 100644 --- a/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol.0.4.25.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol.0.4.25.ReentrancyEth.json @@ -6,7 +6,7 @@ "type": "function", "name": "withdrawBalance", "source_mapping": { - "start": 299, + "start": 656, "length": 314, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -14,14 +14,14 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -32,7 +32,7 @@ "name": "Reentrancy", "source_mapping": { "start": 26, - "length": 2334, + "length": 2691, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -108,7 +108,17 @@ 69, 70, 71, - 72 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 @@ -121,7 +131,7 @@ "type": "node", "name": "! (msg.sender.call.value(userBalance[msg.sender])())", "source_mapping": { - "start": 482, + "start": 839, "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -129,7 +139,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 17 + 27 ], "starting_column": 13, "ending_column": 66 @@ -139,7 +149,7 @@ "type": "function", "name": "withdrawBalance", "source_mapping": { - "start": 299, + "start": 656, "length": 314, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -147,14 +157,14 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -165,7 +175,7 @@ "name": "Reentrancy", "source_mapping": { "start": 26, - "length": 2334, + "length": 2691, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -241,7 +251,17 @@ 69, 70, 71, - 72 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 @@ -259,7 +279,7 @@ "type": "node", "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 579, + "start": 936, "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -267,7 +287,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 20 + 30 ], "starting_column": 9, "ending_column": 36 @@ -277,7 +297,7 @@ "type": "function", "name": "withdrawBalance", "source_mapping": { - "start": 299, + "start": 656, "length": 314, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -285,14 +305,14 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -303,7 +323,7 @@ "name": "Reentrancy", "source_mapping": { "start": 26, - "length": 2334, + "length": 2691, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -379,7 +399,17 @@ 69, 70, 71, - 72 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 @@ -395,10 +425,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#14-21):\n\tExternal calls:\n\t- ! (msg.sender.call.value(userBalance[msg.sender])()) (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#17)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#20)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L14-L21):\n\tExternal calls:\n\t- [! (msg.sender.call.value(userBalance[msg.sender])())](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L17)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L20)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L14-L21", - "id": "957f3b0e921130284eee0bc87196da62a404d42f5be7eb797f1c3ffb0d4de355", + "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#24-31):\n\tExternal calls:\n\t- ! (msg.sender.call.value(userBalance[msg.sender])()) (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#27)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#30)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L24-L31):\n\tExternal calls:\n\t- [! (msg.sender.call.value(userBalance[msg.sender])())](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L27)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L30)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L24-L31", + "id": "759a5ea5deb597f6ca748c9b27656dee01b1e4b634365a68b918bf10518662e8", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" @@ -409,7 +439,7 @@ "type": "function", "name": "withdrawBalance_nested", "source_mapping": { - "start": 2108, + "start": 2465, "length": 246, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -417,13 +447,13 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66, - 67, - 68, - 69, - 70 + 74, + 75, + 76, + 77, + 78, + 79, + 80 ], "starting_column": 5, "ending_column": 6 @@ -434,7 +464,7 @@ "name": "Reentrancy", "source_mapping": { "start": 26, - "length": 2334, + "length": 2691, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -510,7 +540,17 @@ 69, 70, 71, - 72 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 @@ -523,7 +563,7 @@ "type": "node", "name": "msg.sender.call.value(amount / 2)()", "source_mapping": { - "start": 2263, + "start": 2620, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -531,7 +571,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 67 + 77 ], "starting_column": 13, "ending_column": 46 @@ -541,7 +581,7 @@ "type": "function", "name": "withdrawBalance_nested", "source_mapping": { - "start": 2108, + "start": 2465, "length": 246, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -549,13 +589,13 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66, - 67, - 68, - 69, - 70 + 74, + 75, + 76, + 77, + 78, + 79, + 80 ], "starting_column": 5, "ending_column": 6 @@ -566,7 +606,7 @@ "name": "Reentrancy", "source_mapping": { "start": 26, - "length": 2334, + "length": 2691, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -642,7 +682,17 @@ 69, 70, 71, - 72 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 @@ -660,7 +710,7 @@ "type": "node", "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 2310, + "start": 2667, "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -668,7 +718,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 68 + 78 ], "starting_column": 13, "ending_column": 40 @@ -678,7 +728,7 @@ "type": "function", "name": "withdrawBalance_nested", "source_mapping": { - "start": 2108, + "start": 2465, "length": 246, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", @@ -686,13 +736,13 @@ "filename_short": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66, - 67, - 68, - 69, - 70 + 74, + 75, + 76, + 77, + 78, + 79, + 80 ], "starting_column": 5, "ending_column": 6 @@ -703,7 +753,7 @@ "name": "Reentrancy", "source_mapping": { "start": 26, - "length": 2334, + "length": 2691, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -779,7 +829,17 @@ 69, 70, 71, - 72 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 @@ -795,10 +855,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance_nested() (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#64-70):\n\tExternal calls:\n\t- msg.sender.call.value(amount / 2)() (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#67)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#68)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance_nested()](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L64-L70):\n\tExternal calls:\n\t- [msg.sender.call.value(amount / 2)()](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L67)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L68)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L64-L70", - "id": "bc5fd7842eb653b31fae72521123190b37b3dfe9d70a201bfcd70c8a7b5f43ba", + "description": "Reentrancy in Reentrancy.withdrawBalance_nested() (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#74-80):\n\tExternal calls:\n\t- msg.sender.call.value(amount / 2)() (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#77)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#78)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance_nested()](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L74-L80):\n\tExternal calls:\n\t- [msg.sender.call.value(amount / 2)()](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L77)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L78)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/reentrancy.sol#L74-L80", + "id": "cc27a0e36ba51b1a24ae1df9b9f2ec9e67afedd649839a3302b6f9e08987c7d8", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol b/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol index 935f450ee..7163934f8 100644 --- a/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol +++ b/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol @@ -11,6 +11,17 @@ contract Reentrancy { userBalance[msg.sender] += msg.value; } + // Should not detect reentrancy in constructor + constructor() public { + // send userBalance[msg.sender] ethers to msg.sender + // if mgs.sender is a contract, it will call its fallback function + (bool ret, bytes memory mem) = msg.sender.call.value(userBalance[msg.sender])(""); + if( ! ret ){ + revert(); + } + userBalance[msg.sender] = 0; + } + function withdrawBalance() public{ // send userBalance[msg.sender] ethers to msg.sender // if mgs.sender is a contract, it will call its fallback function diff --git a/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json index 1591f3812..d72d00589 100644 --- a/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json @@ -4,25 +4,26 @@ "elements": [ { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 301, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -33,7 +34,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -91,54 +92,66 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", + "name": "(ret,mem) = msg.sender.call.value(amount)()", "source_mapping": { - "start": 480, - "length": 81, + "start": 2084, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 17 + 60 ], "starting_column": 9, - "ending_column": 90 + "ending_column": 73 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 301, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -149,7 +162,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -207,13 +220,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -223,43 +247,44 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = 0", + "name": "userBalance[msg.sender] = amount", "source_mapping": { - "start": 624, - "length": 27, + "start": 2183, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 21 + 62 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 301, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -270,7 +295,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -328,13 +353,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -344,10 +380,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#14-22):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#17)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#21)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L14-L22):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L17)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L21)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L14-L22", - "id": "63e2edc090dbced31786ef360979f0516f51ed13f9cdc1df4722a486e6aee0b1", + "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#62)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(amount)()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L62)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L55-L64", + "id": "b1d5762a3d9738215079d50da4bf0ecdc8eddd575b7f8686bdbfa3d101adf809", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" @@ -356,26 +392,25 @@ "elements": [ { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1437, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -386,7 +421,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -444,55 +479,65 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call.value(amount)()", + "name": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", "source_mapping": { - "start": 1682, - "length": 64, + "start": 882, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 49 + 28 ], "starting_column": 9, - "ending_column": 73 + "ending_column": 90 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1437, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -503,7 +548,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -561,13 +606,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -577,44 +633,43 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = amount", + "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 1781, - "length": 32, + "start": 1026, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 51 + 32 ], - "starting_column": 13, - "ending_column": 45 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1437, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -625,7 +680,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -683,13 +738,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -699,10 +765,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#44-53):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#49)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#51)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L44-L53):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(amount)()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L49)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L51)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L44-L53", - "id": "edbf6fc902d003daf83854bd9eb110406d5bd8c3b8facfcf0601b3e5f739b37d", + "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#32)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L32)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L25-L33", + "id": "e2dcb62d8ffcc2636bab0fee518b4a79c760f2974c39950214749fc78bebc9de", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol b/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol index 935f450ee..13843d789 100644 --- a/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol +++ b/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol @@ -11,6 +11,17 @@ contract Reentrancy { userBalance[msg.sender] += msg.value; } + // Should not detect reentrancy in constructor + constructor() public { + // send userBalance[msg.sender] ethers to msg.sender + // if mgs.sender is a contract, it will call its fallback function + (bool ret, bytes memory mem) = msg.sender.call{value:userBalance[msg.sender]}(""); + if( ! ret ){ + revert(); + } + userBalance[msg.sender] = 0; + } + function withdrawBalance() public{ // send userBalance[msg.sender] ethers to msg.sender // if mgs.sender is a contract, it will call its fallback function diff --git a/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol.0.6.11.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol.0.6.11.ReentrancyEth.json index 85a45bfbb..365b21373 100644 --- a/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol.0.6.11.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol.0.6.11.ReentrancyEth.json @@ -6,7 +6,7 @@ "type": "function", "name": "withdrawBalance", "source_mapping": { - "start": 301, + "start": 707, "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -14,15 +14,15 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -33,7 +33,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2213, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -91,7 +91,18 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 @@ -104,7 +115,7 @@ "type": "node", "name": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", "source_mapping": { - "start": 480, + "start": 886, "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -112,7 +123,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 17 + 28 ], "starting_column": 9, "ending_column": 90 @@ -122,7 +133,7 @@ "type": "function", "name": "withdrawBalance", "source_mapping": { - "start": 301, + "start": 707, "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -130,15 +141,15 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -149,7 +160,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2213, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -207,7 +218,18 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 @@ -225,7 +247,7 @@ "type": "node", "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 624, + "start": 1030, "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -233,7 +255,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 21 + 32 ], "starting_column": 9, "ending_column": 36 @@ -243,7 +265,7 @@ "type": "function", "name": "withdrawBalance", "source_mapping": { - "start": 301, + "start": 707, "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -251,15 +273,15 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -270,7 +292,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2213, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -328,7 +350,18 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 @@ -344,10 +377,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#14-22):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#17)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#21)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L14-L22):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L17)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L21)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L14-L22", - "id": "703bb72dceaefd2a51f7f2f7c83443d37cebcc0b8ce4b5f6bd54e803d4c58d0d", + "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#32)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L32)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L25-L33", + "id": "2ae23f335df95d0f5c56d214774a6afc507773d057c4ca44f2eb4eff0e2ebe98", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" @@ -358,7 +391,7 @@ "type": "function", "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 1437, + "start": 1843, "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -366,16 +399,16 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -386,7 +419,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2213, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -444,7 +477,18 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 @@ -457,7 +501,7 @@ "type": "node", "name": "(ret,mem) = msg.sender.call.value(amount)()", "source_mapping": { - "start": 1682, + "start": 2088, "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -465,7 +509,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 49 + 60 ], "starting_column": 9, "ending_column": 73 @@ -475,7 +519,7 @@ "type": "function", "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 1437, + "start": 1843, "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -483,16 +527,16 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -503,7 +547,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2213, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -561,7 +605,18 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 @@ -579,7 +634,7 @@ "type": "node", "name": "userBalance[msg.sender] = amount", "source_mapping": { - "start": 1781, + "start": 2187, "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -587,7 +642,7 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 51 + 62 ], "starting_column": 13, "ending_column": 45 @@ -597,7 +652,7 @@ "type": "function", "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 1437, + "start": 1843, "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", @@ -605,16 +660,16 @@ "filename_short": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -625,7 +680,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2213, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -683,7 +738,18 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 @@ -699,10 +765,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#44-53):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#49)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#51)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L44-L53):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(amount)()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L49)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L51)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L44-L53", - "id": "9d69f38d42306f0c57969c0e57d606c4bbd636e4deae55b630b247299f7afa49", + "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#62)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(amount)()](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L62)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.6.11/reentrancy.sol#L55-L64", + "id": "c4d2dd489fd8bc396119bdd7e5a73c3782cf5fa27171112104e34b2f3ccf37c4", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol b/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol index 5e86bf9be..12af82cf9 100644 --- a/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol +++ b/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol @@ -11,6 +11,17 @@ contract Reentrancy { userBalance[msg.sender] += msg.value; } + // Should not detect reentrancy in constructor + constructor() public { + // send userBalance[msg.sender] ethers to msg.sender + // if mgs.sender is a contract, it will call its fallback function + (bool ret, bytes memory mem) = msg.sender.call{value:userBalance[msg.sender]}(""); + if( ! ret ){ + revert(); + } + userBalance[msg.sender] = 0; + } + function withdrawBalance() public{ // send userBalance[msg.sender] ethers to msg.sender // if mgs.sender is a contract, it will call its fallback function diff --git a/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json index b7aa05148..e1c0769a0 100644 --- a/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json @@ -4,25 +4,26 @@ "elements": [ { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 301, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -33,7 +34,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -91,54 +92,66 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()", + "name": "(ret,mem) = msg.sender.call{value: amount}()", "source_mapping": { - "start": 480, - "length": 81, + "start": 2084, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 17 + 60 ], "starting_column": 9, - "ending_column": 90 + "ending_column": 73 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 301, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -149,7 +162,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -207,13 +220,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -223,43 +247,44 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = 0", + "name": "userBalance[msg.sender] = amount", "source_mapping": { - "start": 624, - "length": 27, + "start": 2183, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 21 + 62 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 301, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -270,7 +295,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -328,13 +353,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -344,10 +380,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#14-22):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: userBalance[msg.sender]}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#17)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#21)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L14-L22):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L17)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L21)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L14-L22", - "id": "4080e36d35513345b756c6f8d09f2b1238c4553d4b38793d44fe99895e546709", + "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: amount}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#62)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: amount}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L62)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L55-L64", + "id": "d68cc7cd493eca1fda517423f6f6ad0a5671d0bbea1d80ec0cb403ca66d5d4b8", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" @@ -356,26 +392,25 @@ "elements": [ { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1437, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -386,7 +421,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -444,55 +479,65 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call{value: amount}()", + "name": "(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()", "source_mapping": { - "start": 1682, - "length": 64, + "start": 882, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 49 + 28 ], "starting_column": 9, - "ending_column": 73 + "ending_column": 90 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1437, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -503,7 +548,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -561,13 +606,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -577,44 +633,43 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = amount", + "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 1781, - "length": 32, + "start": 1026, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 51 + 32 ], - "starting_column": 13, - "ending_column": 45 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1437, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -625,7 +680,7 @@ "name": "Reentrancy", "source_mapping": { "start": 28, - "length": 1807, + "length": 2209, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", @@ -683,13 +738,24 @@ 51, 52, 53, - 54 + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -699,10 +765,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#44-53):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: amount}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#49)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#51)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L44-L53):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: amount}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L49)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L51)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L44-L53", - "id": "748ed9bcfb9b4a29525eb6514dfff59da6436c7d70a9706d335f71a15ab31620", + "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: userBalance[msg.sender]}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#32)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L32)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L25-L33", + "id": "df77aefe86b51d596b1dba22bde98d85390038724420e61fb18579fd90af852c", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json index b0b061cbf..eb1b1c5de 100644 --- a/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json @@ -4,37 +4,90 @@ "elements": [ { "type": "function", - "name": "retrieveDAOReward", + "name": "splitDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -587,62 +640,113 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "splitDAO(uint256,address)" } }, { "type": "node", - "name": "reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]", + "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", "source_mapping": { - "start": 39789, - "length": 145, + "start": 37159, + "length": 49, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1044, - 1045, - 1046 + 974 ], - "starting_column": 9, - "ending_column": 54 + "starting_column": 13, + "ending_column": 62 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "splitDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -1195,7 +1299,7 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "splitDAO(uint256,address)" } } }, @@ -1205,55 +1309,38 @@ }, { "type": "node", - "name": "! DAOrewardAccount.payOut(dao.rewardAccount(),reward)", + "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", "source_mapping": { - "start": 39977, - "length": 53, + "start": 44544, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1048 + 1196 ], - "starting_column": 17, - "ending_column": 70 + "starting_column": 9, + "ending_column": 83 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "createNewDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 44427, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 1194, + 1195, + 1196, + 1197 ], "starting_column": 5, "ending_column": 6 @@ -1806,65 +1893,118 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "createNewDAO(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "! DAOrewardAccount.payOut(dao,reward)", + "name": "withdrawRewardFor(msg.sender)", "source_mapping": { - "start": 40100, - "length": 37, + "start": 38796, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1052 + 1015 ], - "starting_column": 17, - "ending_column": 54 + "starting_column": 9, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "splitDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -2417,7 +2557,7 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "splitDAO(uint256,address)" } } }, @@ -2427,55 +2567,45 @@ }, { "type": "node", - "name": "DAOpaidOut[msg.sender] += reward", + "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", "source_mapping": { - "start": 40180, - "length": 32, + "start": 40461, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1055 + 1065 ], - "starting_column": 9, - "ending_column": 41 + "starting_column": 13, + "ending_column": 103 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "withdrawRewardFor", "source_mapping": { - "start": 39505, - "length": 735, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074 ], "starting_column": 5, "ending_column": 6 @@ -3028,499 +3158,45 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "withdrawRewardFor(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "DAOpaidOut" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in DAO.retrieveDAOReward(bool) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1037-1057):\n\tExternal calls:\n\t- reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1044-1046)\n\t- ! DAOrewardAccount.payOut(dao.rewardAccount(),reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1048)\n\t- ! DAOrewardAccount.payOut(dao,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1052)\n\tState variables written after the call(s):\n\t- DAOpaidOut[msg.sender] += reward (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1055)\n", - "markdown": "Reentrancy in [DAO.retrieveDAOReward(bool)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057):\n\tExternal calls:\n\t- [reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1044-L1046)\n\t- [! DAOrewardAccount.payOut(dao.rewardAccount(),reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1048)\n\t- [! DAOrewardAccount.payOut(dao,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1052)\n\tState variables written after the call(s):\n\t- [DAOpaidOut[msg.sender] += reward](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1055)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057", - "id": "f4fcbe9e693a60538ed19ff7c298fa578309af52604f3265bac4254b82e45d8f", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "splitDAO", + "type": "node", + "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 40581, + "length": 116, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1068, + 1069 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 103 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "DAO", + "type": "function", + "name": "withdrawRewardFor", "source_mapping": { - "start": 28296, - "length": 17108, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, 1064, 1065, 1066, @@ -3531,268 +3207,7 @@ 1071, 1072, 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" - } - }, - { - "type": "node", - "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", - "source_mapping": { - "start": 37159, - "length": 49, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 974 - ], - "starting_column": 13, - "ending_column": 62 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "splitDAO", - "source_mapping": { - "start": 36148, - "length": 2849, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1074 ], "starting_column": 5, "ending_column": 6 @@ -4345,48 +3760,55 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "withdrawRewardFor(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", + "name": "! rewardAccount.payOut(_account,reward)", "source_mapping": { - "start": 44544, - "length": 74, + "start": 40711, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1196 + 1070 ], - "starting_column": 9, - "ending_column": 83 + "starting_column": 13, + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "createNewDAO", + "name": "withdrawRewardFor", "source_mapping": { - "start": 44427, - "length": 198, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1194, - 1195, - 1196, - 1197 + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074 ], "starting_column": 5, "ending_column": 6 @@ -4939,7 +4361,7 @@ "ending_column": 2 } }, - "signature": "createNewDAO(address)" + "signature": "withdrawRewardFor(address)" } } }, @@ -4949,20 +4371,20 @@ }, { "type": "node", - "name": "p.splitData[0].splitBalance = actualBalance()", + "name": "balances[msg.sender] = 0", "source_mapping": { - "start": 37456, - "length": 45, + "start": 38912, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 981 + 1017 ], - "starting_column": 13, - "ending_column": 58 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { @@ -5609,25 +5031,25 @@ }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "proposals" + "variable_name": "balances" } }, { "type": "node", - "name": "p.splitData[0].rewardToken = rewardToken[address(this)]", + "name": "paidOut[msg.sender] = 0", "source_mapping": { - "start": 37515, - "length": 55, + "start": 38946, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 982 + 1018 ], - "starting_column": 13, - "ending_column": 68 + "starting_column": 9, + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -6274,25 +5696,25 @@ }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "proposals" + "variable_name": "paidOut" } }, { "type": "node", - "name": "p.splitData[0].totalSupply = totalSupply", + "name": "totalSupply -= balances[msg.sender]", "source_mapping": { - "start": 37584, - "length": 40, + "start": 38867, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 983 + 1016 ], - "starting_column": 13, - "ending_column": 53 + "starting_column": 9, + "ending_column": 44 }, "type_specific_fields": { "parent": { @@ -6939,2024 +6361,637 @@ }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "proposals" + "variable_name": "totalSupply" } - }, + } + ], + "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\t- withdrawRewardFor(msg.sender) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1015)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- balances[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1017)\n\t- paidOut[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1018)\n\t- totalSupply -= balances[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1016)\n", + "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\t- [withdrawRewardFor(msg.sender)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1015)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [balances[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1017)\n\t- [paidOut[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1018)\n\t- [totalSupply -= balances[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1016)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", + "id": "4ce8b483e6c9e8e2bbc854d3ff7713e20404b0be5e7cc714329c9a56c52e8d31", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "p.proposalPassed = true", + "type": "function", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 37638, - "length": 23, - "filename_used": "/GENERIC_PATH", + "start": 41743, + "length": 247, + "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 984 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], - "starting_column": 13, - "ending_column": 36 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "splitDAO", + "type": "contract", + "name": "DAO", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" - } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" - } - } - ], - "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\tState variables written after the call(s):\n\t- p.splitData[0].splitBalance = actualBalance() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#981)\n\t- p.splitData[0].rewardToken = rewardToken[address(this)] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#982)\n\t- p.splitData[0].totalSupply = totalSupply (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#983)\n\t- p.proposalPassed = true (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#984)\n", - "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\tState variables written after the call(s):\n\t- [p.splitData[0].splitBalance = actualBalance()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L981)\n\t- [p.splitData[0].rewardToken = rewardToken[address(this)]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L982)\n\t- [p.splitData[0].totalSupply = totalSupply](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L983)\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L984)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", - "id": "ca170302627c298d8230a6d9f9cae19a84c58325d2df49a6ef15a0b17208bf00", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "splitDAO", - "source_mapping": { - "start": 36148, - "length": 2849, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" - } - }, - { - "type": "node", - "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", - "source_mapping": { - "start": 37159, - "length": 49, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 974 - ], - "starting_column": 13, - "ending_column": 62 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "splitDAO", - "source_mapping": { - "start": 36148, - "length": 2849, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 } - } - }, - "additional_fields": { - "underlying_type": "external_calls" + }, + "signature": "transferFromWithoutReward(address,address,uint256)" } }, { "type": "node", - "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", + "name": "! withdrawRewardFor(_from)", "source_mapping": { - "start": 44544, - "length": 74, + "start": 41890, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1196 + 1118 ], - "starting_column": 9, - "ending_column": 83 + "starting_column": 13, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "createNewDAO", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 44427, - "length": 198, + "start": 41743, + "length": 247, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1194, - 1195, - 1196, - 1197 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], "starting_column": 5, "ending_column": 6 @@ -9509,118 +7544,55 @@ "ending_column": 2 } }, - "signature": "createNewDAO(address)" + "signature": "transferFromWithoutReward(address,address,uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "withdrawRewardFor(msg.sender)", + "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", "source_mapping": { - "start": 38796, - "length": 29, + "start": 40461, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1015 + 1065 ], - "starting_column": 9, - "ending_column": 38 + "starting_column": 13, + "ending_column": 103 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "withdrawRewardFor", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074 ], "starting_column": 5, "ending_column": 6 @@ -10173,29 +8145,30 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "withdrawRewardFor(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", + "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", "source_mapping": { - "start": 40461, - "length": 90, + "start": 40581, + "length": 116, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1065 + 1068, + 1069 ], - "starting_column": 13, + "starting_column": 9, "ending_column": 103 }, "type_specific_fields": { @@ -10784,21 +8757,20 @@ }, { "type": "node", - "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", - "source_mapping": { - "start": 40581, - "length": 116, + "name": "! rewardAccount.payOut(_account,reward)", + "source_mapping": { + "start": 40711, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1068, - 1069 + 1070 ], - "starting_column": 9, - "ending_column": 103 + "starting_column": 13, + "ending_column": 52 }, "type_specific_fields": { "parent": { @@ -11386,9 +9358,9 @@ }, { "type": "node", - "name": "! rewardAccount.payOut(_account,reward)", + "name": "transferFrom(_from,_to,_value)", "source_mapping": { - "start": 40711, + "start": 41944, "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", @@ -11396,35 +9368,34 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1070 + 1120 ], - "starting_column": 13, - "ending_column": 52 + "starting_column": 9, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 40361, - "length": 473, + "start": 41743, + "length": 247, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], "starting_column": 5, "ending_column": 6 @@ -11977,118 +9948,315 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "transferFromWithoutReward(address,address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "balances" + } + }, + { + "type": "node", + "name": "balances[_to] += _amount", + "source_mapping": { + "start": 4393, + "length": 24, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 120 + ], + "starting_column": 13, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "transferFrom", + "source_mapping": { + "start": 4127, + "length": 509, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Token", + "source_mapping": { + "start": 3440, + "length": 1550, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "transferFrom(address,address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "balances" + } + }, + { + "type": "node", + "name": "balances[_from] -= _amount", + "source_mapping": { + "start": 4431, + "length": 26, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 121 + ], + "starting_column": 13, + "ending_column": 39 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "transferFrom", + "source_mapping": { + "start": 4127, + "length": 509, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Token", + "source_mapping": { + "start": 3440, + "length": 1550, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "transferFrom(address,address,uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "balances" } }, { "type": "node", - "name": "balances[msg.sender] = 0", + "name": "transferFrom(_from,_to,_value)", "source_mapping": { - "start": 38912, - "length": 24, + "start": 41944, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1017 + 1120 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 41743, + "length": 247, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], "starting_column": 5, "ending_column": 6 @@ -12641,119 +10809,58 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "transferFromWithoutReward(address,address,uint256)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "balances" + "variable_name": "paidOut" } }, { "type": "node", - "name": "paidOut[msg.sender] = 0", + "name": "paidOut[_from] -= transferPaidOut", "source_mapping": { - "start": 38946, - "length": 23, + "start": 42279, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1018 + 1133 ], "starting_column": 9, - "ending_column": 32 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "transferPaidOut", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 41997, + "length": 384, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136 ], "starting_column": 5, "ending_column": 6 @@ -13306,7 +11413,7 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "transferPaidOut(address,address,uint256)" } } }, @@ -13317,108 +11424,47 @@ }, { "type": "node", - "name": "totalSupply -= balances[msg.sender]", + "name": "paidOut[_to] += transferPaidOut", "source_mapping": { - "start": 38867, - "length": 35, + "start": 42322, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1016 + 1134 ], "starting_column": 9, - "ending_column": 44 + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "transferPaidOut", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 41997, + "length": 384, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136 ], "starting_column": 5, "ending_column": 6 @@ -13971,20 +12017,20 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "transferPaidOut(address,address,uint256)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "totalSupply" + "variable_name": "paidOut" } } ], - "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\t- withdrawRewardFor(msg.sender) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1015)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- balances[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1017)\n\t- paidOut[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1018)\n\t- totalSupply -= balances[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1016)\n", - "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\t- [withdrawRewardFor(msg.sender)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1015)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [balances[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1017)\n\t- [paidOut[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1018)\n\t- [totalSupply -= balances[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1016)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", - "id": "4ce8b483e6c9e8e2bbc854d3ff7713e20404b0be5e7cc714329c9a56c52e8d31", + "description": "Reentrancy in DAO.transferFromWithoutReward(address,address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1112-1121):\n\tExternal calls:\n\t- ! withdrawRewardFor(_from) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1118)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#120)\n\t\t- balances[_from] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#121)\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", + "markdown": "Reentrancy in [DAO.transferFromWithoutReward(address,address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121):\n\tExternal calls:\n\t- [! withdrawRewardFor(_from)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1118)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L120)\n\t\t- [balances[_from] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L121)\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121", + "id": "b888f2335a7b1a29c1f4940886bfbe26a6277d2dca59310ede3dfdb6f02adeb0", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" @@ -13993,26 +12039,21 @@ "elements": [ { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -14565,49 +12606,44 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } }, { "type": "node", - "name": "! withdrawRewardFor(_from)", + "name": "! getMyReward()", "source_mapping": { - "start": 41890, - "length": 25, + "start": 41288, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1118 + 1092 ], "starting_column": 13, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -15160,7 +13196,7 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } } }, @@ -16974,44 +15010,39 @@ }, { "type": "node", - "name": "transferFrom(_from,_to,_value)", + "name": "transfer(_to,_value)", "source_mapping": { - "start": 41944, - "length": 39, + "start": 41331, + "length": 28, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1120 + 1094 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 37 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -17564,7 +15595,7 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } } }, @@ -17575,53 +15606,44 @@ }, { "type": "node", - "name": "balances[_to] += _amount", + "name": "balances[msg.sender] -= _amount", "source_mapping": { - "start": 4393, - "length": 24, + "start": 3920, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 120 - ], - "starting_column": 13, - "ending_column": 37 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "transferFrom", - "source_mapping": { - "start": 4127, - "length": 509, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128 + 101 + ], + "starting_column": 13, + "ending_column": 44 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "transfer", + "source_mapping": { + "start": 3765, + "length": 356, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108 ], "starting_column": 5, "ending_column": 6 @@ -17694,7 +15716,7 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "transfer(address,uint256)" } } }, @@ -17705,53 +15727,44 @@ }, { "type": "node", - "name": "balances[_from] -= _amount", + "name": "balances[_to] += _amount", "source_mapping": { - "start": 4431, - "length": 26, + "start": 3965, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 121 + 102 ], "starting_column": 13, - "ending_column": 39 + "ending_column": 37 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFrom", + "name": "transfer", "source_mapping": { - "start": 4127, - "length": 509, + "start": 3765, + "length": 356, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108 ], "starting_column": 5, "ending_column": 6 @@ -17824,7 +15837,7 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "transfer(address,uint256)" } } }, @@ -17835,44 +15848,39 @@ }, { "type": "node", - "name": "transferFrom(_from,_to,_value)", + "name": "transfer(_to,_value)", "source_mapping": { - "start": 41944, - "length": 39, + "start": 41331, + "length": 28, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1120 + 1094 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 37 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -18425,7 +16433,7 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } } }, @@ -19643,10 +17651,10 @@ } } ], - "description": "Reentrancy in DAO.transferFromWithoutReward(address,address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1112-1121):\n\tExternal calls:\n\t- ! withdrawRewardFor(_from) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1118)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#120)\n\t\t- balances[_from] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#121)\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", - "markdown": "Reentrancy in [DAO.transferFromWithoutReward(address,address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121):\n\tExternal calls:\n\t- [! withdrawRewardFor(_from)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1118)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L120)\n\t\t- [balances[_from] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L121)\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121", - "id": "b888f2335a7b1a29c1f4940886bfbe26a6277d2dca59310ede3dfdb6f02adeb0", + "description": "Reentrancy in DAO.transferWithoutReward(address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1091-1095):\n\tExternal calls:\n\t- ! getMyReward() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1092)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- balances[msg.sender] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#101)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#102)\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", + "markdown": "Reentrancy in [DAO.transferWithoutReward(address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095):\n\tExternal calls:\n\t- [! getMyReward()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1092)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [balances[msg.sender] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L101)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L102)\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095", + "id": "bb78c66126a39c10a22c2be95caccd1bc16b010bc959bdeb23bdc1d728654eea", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" @@ -19655,21 +17663,90 @@ "elements": [ { "type": "function", - "name": "transferWithoutReward", + "name": "splitDAO", "source_mapping": { - "start": 41191, - "length": 175, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -20218,48 +18295,711 @@ 1222, 1223 ], - "starting_column": 1, - "ending_column": 2 + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "splitDAO(uint256,address)" + } + }, + { + "type": "node", + "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", + "source_mapping": { + "start": 37159, + "length": 49, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 974 + ], + "starting_column": 13, + "ending_column": 62 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "splitDAO", + "source_mapping": { + "start": 36148, + "length": 2849, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DAO", + "source_mapping": { + "start": 28296, + "length": 17108, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "splitDAO(uint256,address)" } - }, - "signature": "transferWithoutReward(address,uint256)" + } + }, + "additional_fields": { + "underlying_type": "external_calls" } }, { "type": "node", - "name": "! getMyReward()", + "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", "source_mapping": { - "start": 41288, - "length": 14, + "start": 44544, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1092 + 1196 ], - "starting_column": 13, - "ending_column": 27 + "starting_column": 9, + "ending_column": 83 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferWithoutReward", + "name": "createNewDAO", "source_mapping": { - "start": 41191, - "length": 175, + "start": 44427, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 1194, + 1195, + 1196, + 1197 ], "starting_column": 5, "ending_column": 6 @@ -20812,55 +19552,118 @@ "ending_column": 2 } }, - "signature": "transferWithoutReward(address,uint256)" + "signature": "createNewDAO(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", + "name": "p.splitData[0].splitBalance = actualBalance()", "source_mapping": { - "start": 40461, - "length": 90, + "start": 37456, + "length": 45, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1065 + 981 ], "starting_column": 13, - "ending_column": 103 + "ending_column": 58 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "splitDAO", "source_mapping": { - "start": 40361, - "length": 473, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -21413,56 +20216,119 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", + "name": "p.splitData[0].rewardToken = rewardToken[address(this)]", "source_mapping": { - "start": 40581, - "length": 116, + "start": 37515, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1068, - 1069 - ], - "starting_column": 9, - "ending_column": 103 + 982 + ], + "starting_column": 13, + "ending_column": 68 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "splitDAO", "source_mapping": { - "start": 40361, - "length": 473, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -22015,55 +20881,119 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "! rewardAccount.payOut(_account,reward)", + "name": "p.splitData[0].totalSupply = totalSupply", "source_mapping": { - "start": 40711, - "length": 39, + "start": 37584, + "length": 40, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1070 + 983 ], "starting_column": 13, - "ending_column": 52 + "ending_column": 53 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "splitDAO", "source_mapping": { - "start": 40361, - "length": 473, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -22616,49 +21546,119 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "transfer(_to,_value)", + "name": "p.proposalPassed = true", "source_mapping": { - "start": 41331, - "length": 28, + "start": 37638, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1094 + 984 ], - "starting_column": 9, - "ending_column": 37 + "starting_column": 13, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferWithoutReward", + "name": "splitDAO", "source_mapping": { - "start": 41191, - "length": 175, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -23211,176 +22211,667 @@ "ending_column": 2 } }, - "signature": "transferWithoutReward(address,uint256)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "balances" + "variable_name": "proposals" } - }, + } + ], + "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\tState variables written after the call(s):\n\t- p.splitData[0].splitBalance = actualBalance() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#981)\n\t- p.splitData[0].rewardToken = rewardToken[address(this)] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#982)\n\t- p.splitData[0].totalSupply = totalSupply (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#983)\n\t- p.proposalPassed = true (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#984)\n", + "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\tState variables written after the call(s):\n\t- [p.splitData[0].splitBalance = actualBalance()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L981)\n\t- [p.splitData[0].rewardToken = rewardToken[address(this)]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L982)\n\t- [p.splitData[0].totalSupply = totalSupply](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L983)\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L984)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", + "id": "ca170302627c298d8230a6d9f9cae19a84c58325d2df49a6ef15a0b17208bf00", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "balances[msg.sender] -= _amount", + "type": "function", + "name": "retrieveDAOReward", "source_mapping": { - "start": 3920, - "length": 31, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 101 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], - "starting_column": 13, - "ending_column": 44 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "transfer", + "type": "contract", + "name": "DAO", "source_mapping": { - "start": 3765, - "length": 356, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Token", - "source_mapping": { - "start": 3440, - "length": 1550, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "transfer(address,uint256)" + "starting_column": 1, + "ending_column": 2 } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "balances" + }, + "signature": "retrieveDAOReward(bool)" } }, { "type": "node", - "name": "balances[_to] += _amount", + "name": "reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]", "source_mapping": { - "start": 3965, - "length": 24, + "start": 39789, + "length": 145, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 102 + 1044, + 1045, + 1046 ], - "starting_column": 13, - "ending_column": 37 + "starting_column": 9, + "ending_column": 54 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transfer", + "name": "retrieveDAOReward", "source_mapping": { - "start": 3765, - "length": 356, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -23388,115 +22879,610 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "DAO", "source_mapping": { - "start": 3440, - "length": 1550, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "balances" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "transfer(_to,_value)", + "name": "! DAOrewardAccount.payOut(dao.rewardAccount(),reward)", "source_mapping": { - "start": 41331, - "length": 28, + "start": 39977, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1094 + 1048 ], - "starting_column": 9, - "ending_column": 37 + "starting_column": 17, + "ending_column": 70 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferWithoutReward", + "name": "retrieveDAOReward", "source_mapping": { - "start": 41191, - "length": 175, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -24049,58 +24035,65 @@ "ending_column": 2 } }, - "signature": "transferWithoutReward(address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "paidOut" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "paidOut[_from] -= transferPaidOut", + "name": "! DAOrewardAccount.payOut(dao,reward)", "source_mapping": { - "start": 42279, - "length": 33, + "start": 40100, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1133 + 1052 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 17, + "ending_column": 54 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferPaidOut", + "name": "retrieveDAOReward", "source_mapping": { - "start": 41997, - "length": 384, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -24653,58 +24646,65 @@ "ending_column": 2 } }, - "signature": "transferPaidOut(address,address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "paidOut" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "paidOut[_to] += transferPaidOut", + "name": "DAOpaidOut[msg.sender] += reward", "source_mapping": { - "start": 42322, - "length": 31, + "start": 40180, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1134 + 1055 ], "starting_column": 9, - "ending_column": 40 + "ending_column": 41 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferPaidOut", + "name": "retrieveDAOReward", "source_mapping": { - "start": 41997, - "length": 384, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -25257,20 +25257,20 @@ "ending_column": 2 } }, - "signature": "transferPaidOut(address,address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "paidOut" + "variable_name": "DAOpaidOut" } } ], - "description": "Reentrancy in DAO.transferWithoutReward(address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1091-1095):\n\tExternal calls:\n\t- ! getMyReward() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1092)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- balances[msg.sender] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#101)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#102)\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", - "markdown": "Reentrancy in [DAO.transferWithoutReward(address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095):\n\tExternal calls:\n\t- [! getMyReward()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1092)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [balances[msg.sender] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L101)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L102)\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095", - "id": "bb78c66126a39c10a22c2be95caccd1bc16b010bc959bdeb23bdc1d728654eea", + "description": "Reentrancy in DAO.retrieveDAOReward(bool) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1037-1057):\n\tExternal calls:\n\t- reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1044-1046)\n\t- ! DAOrewardAccount.payOut(dao.rewardAccount(),reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1048)\n\t- ! DAOrewardAccount.payOut(dao,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1052)\n\tState variables written after the call(s):\n\t- DAOpaidOut[msg.sender] += reward (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1055)\n", + "markdown": "Reentrancy in [DAO.retrieveDAOReward(bool)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057):\n\tExternal calls:\n\t- [reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1044-L1046)\n\t- [! DAOrewardAccount.payOut(dao.rewardAccount(),reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1048)\n\t- [! DAOrewardAccount.payOut(dao,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1052)\n\tState variables written after the call(s):\n\t- [DAOpaidOut[msg.sender] += reward](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1055)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057", + "id": "f4fcbe9e693a60538ed19ff7c298fa578309af52604f3265bac4254b82e45d8f", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol b/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol index 49be754bb..b2730ef39 100644 --- a/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol +++ b/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol @@ -3,6 +3,16 @@ contract ReentrancyWrite { bool notCalled = true; + // Should not detect reentrancy in constructor + constructor(address addr) { + require(notCalled); + (bool success) = addr.call(); + if (!success) { + revert(); + } + notCalled = false; + } + function bad0() public { require(notCalled); if (!(msg.sender.call())) { diff --git a/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol.0.4.25.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol.0.4.25.ReentrancyReadBeforeWritten.json index 4571d2286..bc8caf68a 100644 --- a/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol.0.4.25.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol.0.4.25.ReentrancyReadBeforeWritten.json @@ -6,7 +6,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 326, "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -14,13 +14,13 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -31,7 +31,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -64,7 +64,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -77,7 +87,7 @@ "type": "node", "name": "! (msg.sender.call())", "source_mapping": { - "start": 152, + "start": 391, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -85,7 +95,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 18 ], "starting_column": 13, "ending_column": 33 @@ -95,7 +105,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 326, "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -103,13 +113,13 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -120,7 +130,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -153,7 +163,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -171,7 +191,7 @@ "type": "node", "name": "notCalled = false", "source_mapping": { - "start": 216, + "start": 455, "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -179,7 +199,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 11 + 21 ], "starting_column": 9, "ending_column": 26 @@ -189,7 +209,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 326, "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -197,13 +217,13 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -214,7 +234,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -247,7 +267,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -263,10 +293,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#6-12):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#11)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L6-L12):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L11)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L6-L12", - "id": "f933b0dd64ecd6dfb70018248bff9e11c03a35657032529ff992308456d475dd", + "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#16-22):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L16-L22):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L16-L22", + "id": "296bbfc5c41b40046e8fc0563e89099df3ff17caf0bd3ff8dde0271aacd8d981", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" @@ -277,7 +307,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 246, + "start": 485, "length": 158, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -285,12 +315,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19 + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 5, "ending_column": 6 @@ -301,7 +331,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -334,7 +364,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -347,7 +387,7 @@ "type": "node", "name": "success = msg.sender.call()", "source_mapping": { - "start": 321, + "start": 560, "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -355,7 +395,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 16 + 26 ], "starting_column": 9, "ending_column": 43 @@ -365,7 +405,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 246, + "start": 485, "length": 158, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -373,12 +413,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19 + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 5, "ending_column": 6 @@ -389,7 +429,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -422,7 +462,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -440,7 +490,7 @@ "type": "node", "name": "bad0()", "source_mapping": { - "start": 391, + "start": 630, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -448,7 +498,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 18 + 28 ], "starting_column": 9, "ending_column": 15 @@ -458,7 +508,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 246, + "start": 485, "length": 158, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -466,12 +516,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19 + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 5, "ending_column": 6 @@ -482,7 +532,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -515,7 +565,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -533,7 +593,7 @@ "type": "node", "name": "! (msg.sender.call())", "source_mapping": { - "start": 152, + "start": 391, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -541,7 +601,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 18 ], "starting_column": 13, "ending_column": 33 @@ -551,7 +611,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 326, "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -559,13 +619,13 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -576,7 +636,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -609,7 +669,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -627,7 +697,7 @@ "type": "node", "name": "bad0()", "source_mapping": { - "start": 391, + "start": 630, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -635,7 +705,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 18 + 28 ], "starting_column": 9, "ending_column": 15 @@ -645,7 +715,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 246, + "start": 485, "length": 158, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -653,12 +723,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19 + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 5, "ending_column": 6 @@ -669,7 +739,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -702,7 +772,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -721,7 +801,7 @@ "type": "node", "name": "notCalled = false", "source_mapping": { - "start": 216, + "start": 455, "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -729,7 +809,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 11 + 21 ], "starting_column": 9, "ending_column": 26 @@ -739,7 +819,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 326, "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", @@ -747,13 +827,13 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -764,7 +844,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 537, + "length": 776, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -797,7 +877,17 @@ 26, 27, 28, - 29 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 1, "ending_column": 2 @@ -813,10 +903,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#14-19):\n\tExternal calls:\n\t- success = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#16)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#18)\n\t\t- ! (msg.sender.call()) (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#18)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#11)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L14-L19):\n\tExternal calls:\n\t- [success = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L16)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L18)\n\t\t- [! (msg.sender.call())](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L18)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L11)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L14-L19", - "id": "7bb6139d33983b626159983e8a4d7fc049710a8f08908c1d212bd13b68640a6a", + "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#24-29):\n\tExternal calls:\n\t- success = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#26)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#28)\n\t\t- ! (msg.sender.call()) (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#28)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L24-L29):\n\tExternal calls:\n\t- [success = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L26)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L28)\n\t\t- [! (msg.sender.call())](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L28)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/reentrancy-write.sol#L24-L29", + "id": "93b771e9737b42c786392b01e24457616ec7e54b5dd7714c96a1e67b9dd535f3", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol b/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol index 11d551b5c..1557c3b82 100644 --- a/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol +++ b/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol @@ -3,6 +3,16 @@ contract ReentrancyWrite { bool notCalled = true; + // Should not detect reentrancy in constructor + constructor(address addr) public { + require(notCalled); + (bool success,) = addr.call(""); + if (!success) { + revert(); + } + notCalled = false; + } + function bad0() public { require(notCalled); (bool success,) = msg.sender.call(""); diff --git a/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json index bfb51198f..3c2fe6275 100644 --- a/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json @@ -4,24 +4,22 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 87, - "length": 188, + "start": 530, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -32,7 +30,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -67,20 +65,30 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 148, + "start": 605, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -88,7 +96,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 27 ], "starting_column": 9, "ending_column": 46 @@ -96,24 +104,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 87, - "length": 188, + "start": 530, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -124,7 +130,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -159,13 +165,23 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, @@ -175,42 +191,40 @@ }, { "type": "node", - "name": "notCalled = false", + "name": "bad0()", "source_mapping": { - "start": 251, - "length": 17, + "start": 678, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 12 + 29 ], "starting_column": 9, - "ending_column": 26 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 87, - "length": 188, + "start": 530, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -221,7 +235,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -256,109 +270,35 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" - } - } - ], - "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#6-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L6-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L6-L13", - "id": "0aac5bbaf3a6f1b7de2ac725771ade12f8b1453c0639d09517b8bddb098a13d2", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 281, - "length": 161, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", - "is_dependency": false, - "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyWrite", - "source_mapping": { - "start": 28, - "length": 610, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(address)" + "underlying_type": "external_calls" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 356, + "start": 397, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -366,7 +306,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 17 + 18 ], "starting_column": 9, "ending_column": 46 @@ -374,22 +314,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 281, - "length": 161, + "start": 336, + "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, 16, 17, 18, 19, - 20 + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -400,7 +342,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -435,25 +377,35 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", "name": "bad0()", "source_mapping": { - "start": 429, + "start": 678, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -461,7 +413,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 19 + 29 ], "starting_column": 9, "ending_column": 15 @@ -471,7 +423,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 281, + "start": 530, "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -479,12 +431,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -495,7 +447,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -530,7 +482,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -541,32 +503,33 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "notCalled" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "notCalled = false", "source_mapping": { - "start": 148, - "length": 37, + "start": 500, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 22 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -574,14 +537,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -592,7 +555,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -627,7 +590,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -638,45 +611,143 @@ } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "notCalled" + } + } + ], + "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#25-30):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#27)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#29)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#29)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#22)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L25-L30):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L27)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L29)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L29)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L22)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L25-L30", + "id": "9fbfafd0d47ce4f4ead524570f382093c186c4e9e5e96ce0067fce3ffb6dc74a", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 336, + "length": 188, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyWrite", + "source_mapping": { + "start": 28, + "length": 859, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" } }, { "type": "node", - "name": "bad0()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 429, - "length": 6, + "start": 397, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 19 + 18 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 281, - "length": 161, + "start": 336, + "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, 16, 17, 18, 19, - 20 + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -687,7 +758,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -722,26 +793,35 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" + "underlying_type": "external_calls" } }, { "type": "node", "name": "notCalled = false", "source_mapping": { - "start": 251, + "start": 500, "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -749,7 +829,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 9, "ending_column": 26 @@ -759,7 +839,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -767,14 +847,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -785,7 +865,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -820,7 +900,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -836,10 +926,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#15-20):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#17)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#19)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#19)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L15-L20):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L17)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L19)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L19)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L15-L20", - "id": "05033b6ee9ae71d9cc7b1ec3f6b09d4c0a43a6c92393f54fa45ce27c89a1e771", + "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#16-23):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#22)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L16-L23):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L22)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L16-L23", + "id": "c9ba81d76d46579f9e78ac96b1aae43b71f2d4a96d4c47b2fab9831bf0f15a8f", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol b/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol index 11d551b5c..1557c3b82 100644 --- a/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol +++ b/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol @@ -3,6 +3,16 @@ contract ReentrancyWrite { bool notCalled = true; + // Should not detect reentrancy in constructor + constructor(address addr) public { + require(notCalled); + (bool success,) = addr.call(""); + if (!success) { + revert(); + } + notCalled = false; + } + function bad0() public { require(notCalled); (bool success,) = msg.sender.call(""); diff --git a/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol.0.6.11.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol.0.6.11.ReentrancyReadBeforeWritten.json index c8ed4b66e..5d2e43ea2 100644 --- a/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol.0.6.11.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol.0.6.11.ReentrancyReadBeforeWritten.json @@ -6,7 +6,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -14,14 +14,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -32,7 +32,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -67,7 +67,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -80,7 +90,7 @@ "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 148, + "start": 397, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -88,7 +98,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 18 ], "starting_column": 9, "ending_column": 46 @@ -98,7 +108,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -106,14 +116,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -124,7 +134,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -159,7 +169,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -177,7 +197,7 @@ "type": "node", "name": "notCalled = false", "source_mapping": { - "start": 251, + "start": 500, "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -185,7 +205,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 9, "ending_column": 26 @@ -195,7 +215,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -203,14 +223,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -221,7 +241,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -256,7 +276,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -272,10 +302,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#6-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L6-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L6-L13", - "id": "a786c050fdd723d3185d93105e0903cb696bf4ce71996fc791e79d8f97c5e72d", + "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#16-23):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#22)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L16-L23):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L22)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L16-L23", + "id": "6d19938cb98129ec5abb0fcde1a08ea92c6ab0125e210a1d4c10f27e9a9419cb", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" @@ -286,7 +316,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 281, + "start": 530, "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -294,12 +324,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -310,7 +340,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -345,7 +375,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -358,7 +398,7 @@ "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 356, + "start": 605, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -366,7 +406,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 17 + 27 ], "starting_column": 9, "ending_column": 46 @@ -376,7 +416,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 281, + "start": 530, "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -384,12 +424,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -400,7 +440,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -435,7 +475,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -453,7 +503,7 @@ "type": "node", "name": "bad0()", "source_mapping": { - "start": 429, + "start": 678, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -461,7 +511,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 19 + 29 ], "starting_column": 9, "ending_column": 15 @@ -471,7 +521,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 281, + "start": 530, "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -479,12 +529,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -495,7 +545,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -530,7 +580,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -548,7 +608,7 @@ "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 148, + "start": 397, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -556,7 +616,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 18 ], "starting_column": 9, "ending_column": 46 @@ -566,7 +626,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -574,14 +634,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -592,7 +652,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -627,7 +687,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -645,7 +715,7 @@ "type": "node", "name": "bad0()", "source_mapping": { - "start": 429, + "start": 678, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -653,7 +723,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 19 + 29 ], "starting_column": 9, "ending_column": 15 @@ -663,7 +733,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 281, + "start": 530, "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -671,12 +741,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -687,7 +757,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -722,7 +792,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -741,7 +821,7 @@ "type": "node", "name": "notCalled = false", "source_mapping": { - "start": 251, + "start": 500, "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -749,7 +829,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 12 + 22 ], "starting_column": 9, "ending_column": 26 @@ -759,7 +839,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 336, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", @@ -767,14 +847,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -785,7 +865,7 @@ "name": "ReentrancyWrite", "source_mapping": { "start": 28, - "length": 610, + "length": 859, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", @@ -820,7 +900,17 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -836,10 +926,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#15-20):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#17)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#19)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#19)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L15-L20):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L17)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L19)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L19)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L15-L20", - "id": "02d9e7190770aed44ccdabc149dfc114e91d2f90346cfbfff570c7ccbc1d64e8", + "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#25-30):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#27)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#29)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#29)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#22)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L25-L30):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L27)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L29)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L29)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L22)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.6.11/reentrancy-write.sol#L25-L30", + "id": "dfc70c3670d28f163af1fd624da8ace78193a8309e4c442462e7bc96e88eeae1", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol b/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol index 11d551b5c..629e1fdec 100644 --- a/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol +++ b/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol @@ -1,8 +1,22 @@ // pragma solidity 0.4.26; +interface IContract { + function foo() external; +} + contract ReentrancyWrite { bool notCalled = true; + // Should not detect reentrancy in constructor + constructor(address addr) { + require(notCalled); + (bool success,) = addr.call(""); + if (!success) { + revert(); + } + notCalled = false; + } + function bad0() public { require(notCalled); (bool success,) = msg.sender.call(""); diff --git a/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json index fb4976193..7d49512de 100644 --- a/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json @@ -4,24 +4,22 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 87, - "length": 188, + "start": 577, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -31,18 +29,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -67,20 +61,34 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 148, + "start": 652, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -88,7 +96,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 31 ], "starting_column": 9, "ending_column": 46 @@ -96,24 +104,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 87, - "length": 188, + "start": 577, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -123,18 +129,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -159,13 +161,27 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, @@ -175,42 +191,40 @@ }, { "type": "node", - "name": "notCalled = false", + "name": "bad0()", "source_mapping": { - "start": 251, - "length": 17, + "start": 725, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 12 + 33 ], "starting_column": 9, - "ending_column": 26 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 87, - "length": 188, + "start": 577, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -220,18 +234,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -256,109 +266,39 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" - } - } - ], - "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#6-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L6-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L6-L13", - "id": "10fd7c0322e6af411a40589a36dd17ec3e91b73cb56a6757dd9b192bcc2b6955", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 281, - "length": 161, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "is_dependency": false, - "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyWrite", - "source_mapping": { - "start": 28, - "length": 610, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(address)" + "underlying_type": "external_calls" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 356, + "start": 444, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -366,7 +306,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 17 + 22 ], "starting_column": 9, "ending_column": 46 @@ -374,22 +314,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 281, - "length": 161, + "start": 383, + "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -399,18 +341,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -435,25 +373,39 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", "name": "bad0()", "source_mapping": { - "start": 429, + "start": 725, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -461,7 +413,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 19 + 33 ], "starting_column": 9, "ending_column": 15 @@ -471,7 +423,7 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 281, + "start": 577, "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -479,12 +431,12 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17, - 18, - 19, - 20 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -494,18 +446,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -530,7 +478,21 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 @@ -541,32 +503,33 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "notCalled" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "notCalled = false", "source_mapping": { - "start": 148, - "length": 37, + "start": 547, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 8 + 26 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 383, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -574,14 +537,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -591,18 +554,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -627,7 +586,21 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 @@ -638,45 +611,143 @@ } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "notCalled" } - }, + } + ], + "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#29-34):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#31)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#33)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#22)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#33)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#26)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L29-L34):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L31)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L33)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L22)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L33)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L26)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L29-L34", + "id": "11273f8e5ccbb848ea0de9b7c15e3fb66deb7c061265f88b8aa7646eed935c0e", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "bad0()", + "type": "function", + "name": "bad0", "source_mapping": { - "start": 429, - "length": 6, + "start": 383, + "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 19 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], - "starting_column": 9, - "ending_column": 15 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad1", + "type": "contract", + "name": "ReentrancyWrite", "source_mapping": { - "start": 281, - "length": 161, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, 15, 16, 17, 18, 19, - 20 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "(success) = msg.sender.call()", + "source_mapping": { + "start": 444, + "length": 37, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "is_dependency": false, + "lines": [ + 22 + ], + "starting_column": 9, + "ending_column": 46 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 383, + "length": 188, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -686,18 +757,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -722,26 +789,39 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" + "underlying_type": "external_calls" } }, { "type": "node", "name": "notCalled = false", "source_mapping": { - "start": 251, + "start": 547, "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -749,7 +829,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 12 + 26 ], "starting_column": 9, "ending_column": 26 @@ -759,7 +839,7 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 87, + "start": 383, "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -767,14 +847,14 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -784,18 +864,14 @@ "type": "contract", "name": "ReentrancyWrite", "source_mapping": { - "start": 28, - "length": 610, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, 7, 8, 9, @@ -820,7 +896,21 @@ 28, 29, 30, - 31 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 1, "ending_column": 2 @@ -836,10 +926,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#15-20):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#17)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#19)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#19)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#12)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L15-L20):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L17)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L19)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L19)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L12)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L15-L20", - "id": "a9d96103d5786a77ba0de28c96dc94a27ea5acda47af8fef59a80327925a286b", + "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#20-27):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#22)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#26)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L20-L27):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L22)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L26)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L20-L27", + "id": "ef995e89d54c7b577af2ca26540e01da65ac0e2466d6d7a58e4d11e9211b12a4", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json b/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json index 2612dca44..1e3ee1354 100644 --- a/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json +++ b/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json @@ -4,21 +4,21 @@ "elements": [ { "type": "contract", - "name": "C", + "name": "E", "source_mapping": { - "start": 155, - "length": 65, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -26,19 +26,19 @@ }, { "type": "function", - "name": "A", + "name": "C", "source_mapping": { - "start": 34, - "length": 50, + "start": 176, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -46,47 +46,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "C", "source_mapping": { - "start": 0, - "length": 86, + "start": 155, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "A(uint256)" + "signature": "C(uint256)" } }, { "type": "contract", - "name": "C", + "name": "E", "source_mapping": { - "start": 155, - "length": 65, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -94,31 +93,31 @@ }, { "type": "contract", - "name": "B", + "name": "D", "source_mapping": { - "start": 88, - "length": 65, + "start": 222, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18", - "id": "d2847fcb309e0ee45dfb303bf749123bbebee692a080ae6a718a76ef785ae8d2", + "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor C.C(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [C.C(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", + "id": "085dceba8f0b37580e72952eafe1368bf0d09f10c2f44c0b6ff53ad7e72f92b1", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -127,21 +126,21 @@ "elements": [ { "type": "contract", - "name": "D", + "name": "E", "source_mapping": { - "start": 222, - "length": 71, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -238,10 +237,10 @@ } } ], - "description": "D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24", - "id": "7436d3215ee6260f9a4b2f4697fa242225ad3f10e30bfbd162679a5e3fa48f10", + "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", + "id": "14d6bffb3f1849cfebb7156cb797315fd01ac83911a1261650f702792f4db830", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -250,41 +249,42 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "F", "source_mapping": { - "start": 295, - "length": 77, + "start": 375, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "function", - "name": "B", + "name": "A", "source_mapping": { - "start": 109, - "length": 42, + "start": 34, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -292,78 +292,80 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "B", + "name": "A", "source_mapping": { - "start": 88, - "length": 65, + "start": 0, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "B(uint256)" + "signature": "A(uint256)" } }, { "type": "contract", - "name": "E", + "name": "F", "source_mapping": { - "start": 295, - "length": 77, + "start": 375, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 222, - "length": 71, + "start": 88, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor B.B(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [B.B(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", - "id": "e79d62c434ba85788dd5087e4994bb136be6b9e8a55e8057b0e30c9b0436abdc", + "description": "F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38", + "id": "71e08d0e5c44bbc2671e014018a6333bd92db7380a85732bf2d17aa5500f6434", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -372,21 +374,21 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "D", "source_mapping": { - "start": 295, - "length": 77, + "start": 222, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -394,19 +396,19 @@ }, { "type": "function", - "name": "C", + "name": "A", "source_mapping": { - "start": 176, - "length": 42, + "start": 34, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -414,46 +416,47 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "A", "source_mapping": { - "start": 155, - "length": 65, + "start": 0, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "C(uint256)" + "signature": "A(uint256)" } }, { "type": "contract", - "name": "E", + "name": "C", "source_mapping": { - "start": 295, - "length": 77, + "start": 155, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -461,31 +464,31 @@ }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 222, - "length": 71, + "start": 88, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor C.C(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [C.C(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", - "id": "085dceba8f0b37580e72952eafe1368bf0d09f10c2f44c0b6ff53ad7e72f92b1", + "description": "D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24", + "id": "7436d3215ee6260f9a4b2f4697fa242225ad3f10e30bfbd162679a5e3fa48f10", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -494,21 +497,21 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "C", "source_mapping": { - "start": 295, - "length": 77, + "start": 155, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -605,10 +608,10 @@ } } ], - "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", - "id": "14d6bffb3f1849cfebb7156cb797315fd01ac83911a1261650f702792f4db830", + "description": "C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18", + "id": "d2847fcb309e0ee45dfb303bf749123bbebee692a080ae6a718a76ef785ae8d2", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -617,42 +620,41 @@ "elements": [ { "type": "contract", - "name": "F", + "name": "E", "source_mapping": { - "start": 375, - "length": 57, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { "type": "function", - "name": "A", + "name": "B", "source_mapping": { - "start": 34, - "length": 50, + "start": 109, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -660,80 +662,78 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "B", "source_mapping": { - "start": 0, - "length": 86, + "start": 88, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "A(uint256)" + "signature": "B(uint256)" } }, { "type": "contract", - "name": "F", + "name": "E", "source_mapping": { - "start": 375, - "length": 57, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { "type": "contract", - "name": "B", + "name": "D", "source_mapping": { - "start": 88, - "length": 65, + "start": 222, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38", - "id": "71e08d0e5c44bbc2671e014018a6333bd92db7380a85732bf2d17aa5500f6434", + "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor B.B(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [B.B(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", + "id": "e79d62c434ba85788dd5087e4994bb136be6b9e8a55e8057b0e30c9b0436abdc", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json b/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json index 9d698a4c3..6d9285833 100644 --- a/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json +++ b/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json @@ -4,21 +4,21 @@ "elements": [ { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 157, - "length": 66, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -115,10 +115,10 @@ } } ], - "description": "C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18", - "id": "2d9d2b1b6d2540f86fd909f9766e128da573e659f40a50835cc9adef3c4dbee8", + "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", + "id": "1f85bf19873eaee39a8f703b0c783aa86e34c91fad5556ee831eb7c6adcfdb77", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -127,21 +127,21 @@ "elements": [ { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 225, - "length": 72, + "start": 157, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -151,17 +151,17 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 110, - "length": 43, + "start": 34, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -169,21 +169,22 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "B", + "name": "A", "source_mapping": { - "start": 89, - "length": 66, + "start": 0, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -194,21 +195,21 @@ }, { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 225, - "length": 72, + "start": 157, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -216,31 +217,31 @@ }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 225, - "length": 72, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", - "id": "5f3b188e7d6c737684f829c3fde96f739cd502b4aba8f3f6e3ceab7decffa618", + "description": "C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18", + "id": "2d9d2b1b6d2540f86fd909f9766e128da573e659f40a50835cc9adef3c4dbee8", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -249,21 +250,21 @@ "elements": [ { "type": "contract", - "name": "D", + "name": "E", "source_mapping": { - "start": 225, - "length": 72, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -314,6 +315,28 @@ "signature": "constructor(uint256)" } }, + { + "type": "contract", + "name": "E", + "source_mapping": { + "start": 299, + "length": 78, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30 + ], + "starting_column": 1, + "ending_column": 2 + } + }, { "type": "contract", "name": "D", @@ -359,10 +382,10 @@ } } ], - "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", - "id": "b579da8996b6a1a35169bcae74ad8126c68fb0a1819d3977cea3e0e295ff2d5c", + "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", + "id": "33b16377cf3026b60d644e79d92682e6e626d7ad6598387440c9b20fd8aa44fe", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -395,17 +418,17 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 34, - "length": 51, + "start": 110, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -413,22 +436,21 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "B", "source_mapping": { - "start": 0, - "length": 87, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 @@ -439,21 +461,21 @@ }, { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 157, - "length": 66, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -461,31 +483,31 @@ }, { "type": "contract", - "name": "B", + "name": "D", "source_mapping": { - "start": 89, - "length": 66, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", - "id": "1f85bf19873eaee39a8f703b0c783aa86e34c91fad5556ee831eb7c6adcfdb77", + "id": "5f3b188e7d6c737684f829c3fde96f739cd502b4aba8f3f6e3ceab7decffa618", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -494,21 +516,21 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "D", "source_mapping": { - "start": 299, - "length": 78, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -518,7 +540,7 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 110, + "start": 178, "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", @@ -526,9 +548,9 @@ "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -536,9 +558,9 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "B", + "name": "C", "source_mapping": { - "start": 89, + "start": 157, "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", @@ -546,11 +568,11 @@ "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -559,50 +581,6 @@ "signature": "constructor(uint256)" } }, - { - "type": "contract", - "name": "E", - "source_mapping": { - "start": 299, - "length": 78, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "is_dependency": false, - "lines": [ - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "contract", - "name": "E", - "source_mapping": { - "start": 299, - "length": 78, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "is_dependency": false, - "lines": [ - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 1, - "ending_column": 2 - } - }, { "type": "contract", "name": "D", @@ -648,10 +626,10 @@ } } ], - "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) contract definition\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) contract definition\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", - "id": "ee7d44329ffb81dc06e2a2f1b3a166a5115287a1175b32cf828b57479afbc4ae", + "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", + "id": "b579da8996b6a1a35169bcae74ad8126c68fb0a1819d3977cea3e0e295ff2d5c", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -660,41 +638,42 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "F", "source_mapping": { - "start": 299, - "length": 78, + "start": 380, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "function", "name": "constructor", "source_mapping": { - "start": 178, - "length": 43, + "start": 34, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -702,21 +681,22 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "A", "source_mapping": { - "start": 157, - "length": 66, + "start": 0, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -727,75 +707,54 @@ }, { "type": "contract", - "name": "E", - "source_mapping": { - "start": 299, - "length": 78, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "is_dependency": false, - "lines": [ - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "contract", - "name": "D", + "name": "F", "source_mapping": { - "start": 225, - "length": 72, + "start": 380, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 225, - "length": 72, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", - "id": "33b16377cf3026b60d644e79d92682e6e626d7ad6598387440c9b20fd8aa44fe", + "description": "F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38", + "id": "b74eb2b11af7a004b623d28b035228963f09aed588c95efed636021f426c5cdc", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -828,17 +787,17 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 34, - "length": 51, + "start": 110, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -846,22 +805,21 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "B", "source_mapping": { - "start": 0, - "length": 87, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 @@ -872,21 +830,21 @@ }, { "type": "contract", - "name": "C", + "name": "E", "source_mapping": { - "start": 157, - "length": 66, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -894,31 +852,75 @@ }, { "type": "contract", - "name": "B", + "name": "E", "source_mapping": { - "start": 89, - "length": 66, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 26, + 27, + 28, + 29, + 30 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 225, + "length": 72, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 225, + "length": 72, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) contract definition\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) contract definition\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", - "id": "f5c86955c15d44fe9471680d12d37843a15ba934cbb124786cadab0919ea68d1", + "id": "ee7d44329ffb81dc06e2a2f1b3a166a5115287a1175b32cf828b57479afbc4ae", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -927,25 +929,24 @@ "elements": [ { "type": "contract", - "name": "F", + "name": "E", "source_mapping": { - "start": 380, - "length": 58, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { @@ -996,25 +997,24 @@ }, { "type": "contract", - "name": "F", + "name": "C", "source_mapping": { - "start": 380, - "length": 58, + "start": 157, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { @@ -1040,10 +1040,10 @@ } } ], - "description": "F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38", - "id": "b74eb2b11af7a004b623d28b035228963f09aed588c95efed636021f426c5cdc", + "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", + "id": "f5c86955c15d44fe9471680d12d37843a15ba934cbb124786cadab0919ea68d1", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json b/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json index 14a2a32d1..7c0bd82fa 100644 --- a/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json +++ b/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json @@ -4,40 +4,38 @@ "elements": [ { "type": "variable", - "name": "blockhash", + "name": "mutable", "source_mapping": { - "start": 54, - "length": 14, + "start": 527, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 4 + 32 ], "starting_column": 5, - "ending_column": 19 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "Reserved", "source_mapping": { - "start": 26, - "length": 94, + "start": 504, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 31, + 32, + 33, + 34 ], "starting_column": 1, "ending_column": 2 @@ -46,10 +44,10 @@ } } ], - "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4", - "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", + "description": "Reserved.mutable (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#32) (state variable) shadows built-in symbol\"\n", + "markdown": "[Reserved.mutable](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32", + "id": "11840553a9e11623596d7a07275814e65a5b1d90277ae0e2954cd8ce74d6a6d2", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -58,40 +56,41 @@ "elements": [ { "type": "variable", - "name": "now", + "name": "ecrecover", "source_mapping": { - "start": 74, - "length": 8, + "start": 170, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 5 + 11 ], "starting_column": 5, - "ending_column": 13 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 26, - "length": 94, + "start": 122, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 @@ -100,10 +99,10 @@ } } ], - "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5", - "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", + "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11", + "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -111,54 +110,145 @@ { "elements": [ { - "type": "event", - "name": "revert", + "type": "variable", + "name": "keccak256", "source_mapping": { - "start": 89, - "length": 29, + "start": 449, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 7 + 25 + ], + "starting_column": 9, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "require", + "source_mapping": { + "start": 380, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "FurtherExtendedContract", + "source_mapping": { + "start": 263, + "length": 239, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "require()" + } + } + } + } + ], + "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25", + "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", + "check": "shadowing-builtin", + "impact": "Low", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "abi", + "source_mapping": { + "start": 365, + "length": 8, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 21 ], "starting_column": 5, - "ending_column": 34 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 26, - "length": 94, + "start": 263, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "revert(bool)" + } } } ], - "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", - "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7", - "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", + "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21", + "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -166,57 +256,53 @@ { "elements": [ { - "type": "function", - "name": "assert", + "type": "variable", + "name": "blockhash", "source_mapping": { - "start": 195, - "length": 64, + "start": 54, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 19 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 122, - "length": 139, + "start": 26, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "assert(bool)" + } } } ], - "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15", - "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", + "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4", + "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -225,76 +311,58 @@ "elements": [ { "type": "variable", - "name": "msg", + "name": "this", "source_mapping": { - "start": 244, - "length": 8, + "start": 346, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 14 + 20 ], - "starting_column": 9, - "ending_column": 17 + "starting_column": 5, + "ending_column": 18 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "assert", + "type": "contract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 195, - "length": 64, + "start": 263, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ExtendedContract", - "source_mapping": { - "start": 122, - "length": 139, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "assert(bool)" + "starting_column": 1, + "ending_column": 2 } } } } ], - "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14", - "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20", + "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -303,41 +371,40 @@ "elements": [ { "type": "variable", - "name": "ecrecover", + "name": "now", "source_mapping": { - "start": 170, - "length": 18, + "start": 74, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 11 + 5 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 122, - "length": 139, + "start": 26, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 @@ -346,10 +413,10 @@ } } ], - "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11", - "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", + "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5", + "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -357,65 +424,54 @@ { "elements": [ { - "type": "function", - "name": "require", + "type": "event", + "name": "revert", "source_mapping": { - "start": 380, - "length": 120, + "start": 89, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 7 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 263, - "length": 239, + "start": 26, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "revert(bool)" } } ], - "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28", - "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", + "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", + "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7", + "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -424,40 +480,37 @@ "elements": [ { "type": "variable", - "name": "keccak256", + "name": "msg", "source_mapping": { - "start": 449, - "length": 14, + "start": 244, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 25 + 14 ], "starting_column": 9, - "ending_column": 23 + "ending_column": 17 }, "type_specific_fields": { "parent": { "type": "function", - "name": "require", + "name": "assert", "source_mapping": { - "start": 380, - "length": 120, + "start": 195, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -465,43 +518,96 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "ExtendedContract", "source_mapping": { - "start": 263, - "length": 239, + "start": 122, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "assert(bool)" } } } } ], - "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25", - "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", + "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14", + "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "check": "shadowing-builtin", + "impact": "Low", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "assert", + "source_mapping": { + "start": 195, + "length": 64, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ExtendedContract", + "source_mapping": { + "start": 122, + "length": 139, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "assert(bool)" + } + } + ], + "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15", + "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -655,81 +761,26 @@ { "elements": [ { - "type": "variable", - "name": "this", - "source_mapping": { - "start": 346, - "length": 13, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 20 - ], - "starting_column": 5, - "ending_column": 18 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "FurtherExtendedContract", - "source_mapping": { - "start": 263, - "length": 239, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - } - ], - "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20", - "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", - "check": "shadowing-builtin", - "impact": "Low", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "abi", + "type": "function", + "name": "require", "source_mapping": { - "start": 365, - "length": 8, + "start": 380, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 21 + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, - "ending_column": 13 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -760,66 +811,15 @@ "starting_column": 1, "ending_column": 2 } - } - } - } - ], - "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21", - "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", - "check": "shadowing-builtin", - "impact": "Low", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "mutable", - "source_mapping": { - "start": 527, - "length": 15, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 32 - ], - "starting_column": 5, - "ending_column": 20 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Reserved", - "source_mapping": { - "start": 504, - "length": 42, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34 - ], - "starting_column": 1, - "ending_column": 2 - } - } + }, + "signature": "require()" } } ], - "description": "Reserved.mutable (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#32) (state variable) shadows built-in symbol\"\n", - "markdown": "[Reserved.mutable](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32", - "id": "11840553a9e11623596d7a07275814e65a5b1d90277ae0e2954cd8ce74d6a6d2", + "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28", + "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json b/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json index 1012fbe88..167b72990 100644 --- a/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json +++ b/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json @@ -4,40 +4,41 @@ "elements": [ { "type": "variable", - "name": "blockhash", + "name": "ecrecover", "source_mapping": { - "start": 57, - "length": 14, + "start": 173, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 4 + 11 ], "starting_column": 5, - "ending_column": 19 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 29, - "length": 94, + "start": 125, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 @@ -46,10 +47,10 @@ } } ], - "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4", - "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", + "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11", + "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -58,52 +59,84 @@ "elements": [ { "type": "variable", - "name": "now", + "name": "keccak256", "source_mapping": { - "start": 77, - "length": 8, + "start": 452, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 5 + 25 ], - "starting_column": 5, - "ending_column": 13 + "starting_column": 9, + "ending_column": 23 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "BaseContract", + "type": "function", + "name": "require", "source_mapping": { - "start": 29, - "length": 94, + "start": 383, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 23, + 24, + 25, + 26, + 27, + 28 ], - "starting_column": 1, - "ending_column": 2 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "FurtherExtendedContract", + "source_mapping": { + "start": 266, + "length": 239, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "require()" } } } } ], - "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5", - "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", + "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25", + "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -111,54 +144,59 @@ { "elements": [ { - "type": "event", - "name": "revert", + "type": "variable", + "name": "abi", "source_mapping": { - "start": 92, - "length": 29, + "start": 368, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 7 + 21 ], "starting_column": 5, - "ending_column": 34 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 29, - "length": 94, + "start": 266, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "revert(bool)" + } } } ], - "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", - "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7", - "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", + "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21", + "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -166,57 +204,53 @@ { "elements": [ { - "type": "function", - "name": "assert", + "type": "variable", + "name": "blockhash", "source_mapping": { - "start": 198, - "length": 64, + "start": 57, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 19 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 125, - "length": 139, + "start": 29, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "assert(bool)" + } } } ], - "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15", - "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", + "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4", + "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -225,76 +259,58 @@ "elements": [ { "type": "variable", - "name": "msg", + "name": "this", "source_mapping": { - "start": 247, - "length": 8, + "start": 349, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 14 + 20 ], - "starting_column": 9, - "ending_column": 17 + "starting_column": 5, + "ending_column": 18 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "assert", + "type": "contract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 198, - "length": 64, + "start": 266, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ExtendedContract", - "source_mapping": { - "start": 125, - "length": 139, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "assert(bool)" + "starting_column": 1, + "ending_column": 2 } } } } ], - "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14", - "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20", + "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -303,41 +319,40 @@ "elements": [ { "type": "variable", - "name": "ecrecover", + "name": "now", "source_mapping": { - "start": 173, - "length": 18, + "start": 77, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 11 + 5 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 125, - "length": 139, + "start": 29, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 @@ -346,76 +361,65 @@ } } ], - "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11", - "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", + "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5", + "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" }, { "elements": [ - { - "type": "function", - "name": "require", + { + "type": "event", + "name": "revert", "source_mapping": { - "start": 383, - "length": 120, + "start": 92, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 7 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 266, - "length": 239, + "start": 29, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "revert(bool)" } } ], - "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28", - "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", + "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", + "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7", + "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -424,40 +428,37 @@ "elements": [ { "type": "variable", - "name": "keccak256", + "name": "msg", "source_mapping": { - "start": 452, - "length": 14, + "start": 247, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 25 + 14 ], "starting_column": 9, - "ending_column": 23 + "ending_column": 17 }, "type_specific_fields": { "parent": { "type": "function", - "name": "require", + "name": "assert", "source_mapping": { - "start": 383, - "length": 120, + "start": 198, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -465,43 +466,96 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "ExtendedContract", "source_mapping": { - "start": 266, - "length": 239, + "start": 125, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "assert(bool)" } } } } ], - "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25", - "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", + "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14", + "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "check": "shadowing-builtin", + "impact": "Low", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "assert", + "source_mapping": { + "start": 198, + "length": 64, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ExtendedContract", + "source_mapping": { + "start": 125, + "length": 139, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "assert(bool)" + } + } + ], + "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15", + "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -655,81 +709,26 @@ { "elements": [ { - "type": "variable", - "name": "this", - "source_mapping": { - "start": 349, - "length": 13, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 20 - ], - "starting_column": 5, - "ending_column": 18 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "FurtherExtendedContract", - "source_mapping": { - "start": 266, - "length": 239, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - } - ], - "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20", - "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", - "check": "shadowing-builtin", - "impact": "Low", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "abi", + "type": "function", + "name": "require", "source_mapping": { - "start": 368, - "length": 8, + "start": 383, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 21 + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, - "ending_column": 13 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -760,14 +759,15 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "require()" } } ], - "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21", - "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", + "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28", + "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json b/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json index 9516c83cb..a0e0cdaea 100644 --- a/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json @@ -338,9 +338,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "v", "source_mapping": { - "start": 405, + "start": 421, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", @@ -350,8 +350,8 @@ "lines": [ 25 ], - "starting_column": 59, - "ending_column": 65 + "starting_column": 75, + "ending_column": 81 }, "type_specific_fields": { "parent": { @@ -406,21 +406,21 @@ } }, { - "type": "function", - "name": "z", + "type": "event", + "name": "v", "source_mapping": { - "start": 150, - "length": 27, + "start": 183, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 13 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -447,14 +447,14 @@ "ending_column": 2 } }, - "signature": "z()" + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -595,9 +595,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 421, + "start": 405, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", @@ -607,8 +607,8 @@ "lines": [ 25 ], - "starting_column": 75, - "ending_column": 81 + "starting_column": 59, + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -663,21 +663,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 183, - "length": 10, + "start": 150, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -704,14 +704,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json b/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json index bb012fce1..9fab3c6ba 100644 --- a/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json @@ -338,9 +338,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "v", "source_mapping": { - "start": 408, + "start": 424, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", @@ -350,8 +350,8 @@ "lines": [ 25 ], - "starting_column": 59, - "ending_column": 65 + "starting_column": 75, + "ending_column": 81 }, "type_specific_fields": { "parent": { @@ -406,21 +406,21 @@ } }, { - "type": "function", - "name": "z", + "type": "event", + "name": "v", "source_mapping": { - "start": 153, - "length": 27, + "start": 186, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 13 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -447,14 +447,14 @@ "ending_column": 2 } }, - "signature": "z()" + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -595,9 +595,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 424, + "start": 408, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", @@ -607,8 +607,8 @@ "lines": [ 25 ], - "starting_column": 75, - "ending_column": 81 + "starting_column": 59, + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -663,21 +663,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 186, - "length": 10, + "start": 153, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -704,14 +704,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json b/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json index f4eed78f8..3cd190e9f 100644 --- a/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json @@ -4,10 +4,10 @@ "elements": [ { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 382, - "length": 8, + "start": 406, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -16,8 +16,8 @@ "lines": [ 25 ], - "starting_column": 30, - "ending_column": 38 + "starting_column": 54, + "ending_column": 59 }, "type_specific_fields": { "parent": { @@ -73,45 +73,38 @@ }, { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 260, - "length": 12, + "start": 73, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 17 + 5 ], "starting_column": 5, - "ending_column": 17 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 201, - "length": 239, + "start": 29, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26 + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -120,10 +113,10 @@ } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#17) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L17) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#5) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L5) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", + "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -132,10 +125,10 @@ "elements": [ { "type": "variable", - "name": "y", + "name": "v", "source_mapping": { - "start": 406, - "length": 5, + "start": 429, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -144,8 +137,8 @@ "lines": [ 25 ], - "starting_column": 54, - "ending_column": 59 + "starting_column": 77, + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -200,10 +193,10 @@ } }, { - "type": "variable", - "name": "y", + "type": "event", + "name": "v", "source_mapping": { - "start": 73, + "start": 187, "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", @@ -211,7 +204,7 @@ "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 5, "ending_column": 15 @@ -219,32 +212,36 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 29, - "length": 57, + "start": 88, + "length": 111, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#5) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L5) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -253,9 +250,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "w", "source_mapping": { - "start": 413, + "start": 421, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", @@ -265,8 +262,8 @@ "lines": [ 25 ], - "starting_column": 61, - "ending_column": 67 + "starting_column": 69, + "ending_column": 75 }, "type_specific_fields": { "parent": { @@ -322,54 +319,61 @@ }, { "type": "function", - "name": "z", + "name": "w", "source_mapping": { - "start": 154, - "length": 27, + "start": 280, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 20, + 21, + 22, + 23 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 88, - "length": 111, + "start": 201, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "z()" + "signature": "w()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#20-23) (modifier)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L20-L23) (modifier)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -378,10 +382,10 @@ "elements": [ { "type": "variable", - "name": "w", + "name": "__x", "source_mapping": { - "start": 421, - "length": 6, + "start": 382, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -390,8 +394,8 @@ "lines": [ 25 ], - "starting_column": 69, - "ending_column": 75 + "starting_column": 30, + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -446,24 +450,21 @@ } }, { - "type": "function", - "name": "w", + "type": "variable", + "name": "__x", "source_mapping": { - "start": 280, - "length": 71, + "start": 260, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23 + 17 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -493,15 +494,14 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "w()" + } } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#20-23) (modifier)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L20-L23) (modifier)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#17) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L17) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", + "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -510,9 +510,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 429, + "start": 413, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", @@ -522,8 +522,8 @@ "lines": [ 25 ], - "starting_column": 77, - "ending_column": 83 + "starting_column": 61, + "ending_column": 67 }, "type_specific_fields": { "parent": { @@ -578,21 +578,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 187, - "length": 10, + "start": 154, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -619,14 +619,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json b/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json index d79a3b6fb..086e4ed2f 100644 --- a/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json @@ -4,10 +4,10 @@ "elements": [ { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 382, - "length": 8, + "start": 406, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -16,8 +16,8 @@ "lines": [ 25 ], - "starting_column": 30, - "ending_column": 38 + "starting_column": 54, + "ending_column": 59 }, "type_specific_fields": { "parent": { @@ -73,45 +73,38 @@ }, { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 260, - "length": 12, + "start": 73, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 17 + 5 ], "starting_column": 5, - "ending_column": 17 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 201, - "length": 239, + "start": 29, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26 + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -120,10 +113,10 @@ } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#17) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L17) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#5) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L5) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", + "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -132,10 +125,10 @@ "elements": [ { "type": "variable", - "name": "y", + "name": "v", "source_mapping": { - "start": 406, - "length": 5, + "start": 429, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -144,8 +137,8 @@ "lines": [ 25 ], - "starting_column": 54, - "ending_column": 59 + "starting_column": 77, + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -200,10 +193,10 @@ } }, { - "type": "variable", - "name": "y", + "type": "event", + "name": "v", "source_mapping": { - "start": 73, + "start": 187, "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", @@ -211,7 +204,7 @@ "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 5, "ending_column": 15 @@ -219,32 +212,36 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 29, - "length": 57, + "start": 88, + "length": 111, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#5) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L5) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -253,9 +250,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "w", "source_mapping": { - "start": 413, + "start": 421, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", @@ -265,8 +262,8 @@ "lines": [ 25 ], - "starting_column": 61, - "ending_column": 67 + "starting_column": 69, + "ending_column": 75 }, "type_specific_fields": { "parent": { @@ -322,54 +319,61 @@ }, { "type": "function", - "name": "z", + "name": "w", "source_mapping": { - "start": 154, - "length": 27, + "start": 280, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 20, + 21, + 22, + 23 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 88, - "length": 111, + "start": 201, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "z()" + "signature": "w()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#20-23) (modifier)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L20-L23) (modifier)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -378,10 +382,10 @@ "elements": [ { "type": "variable", - "name": "w", + "name": "__x", "source_mapping": { - "start": 421, - "length": 6, + "start": 382, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -390,8 +394,8 @@ "lines": [ 25 ], - "starting_column": 69, - "ending_column": 75 + "starting_column": 30, + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -446,24 +450,21 @@ } }, { - "type": "function", - "name": "w", + "type": "variable", + "name": "__x", "source_mapping": { - "start": 280, - "length": 71, + "start": 260, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23 + 17 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -493,15 +494,14 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "w()" + } } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#20-23) (modifier)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L20-L23) (modifier)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#17) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L17) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", + "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -510,9 +510,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 429, + "start": 413, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", @@ -522,8 +522,8 @@ "lines": [ 25 ], - "starting_column": 77, - "ending_column": 83 + "starting_column": 61, + "ending_column": 67 }, "type_specific_fields": { "parent": { @@ -578,21 +578,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 187, - "length": 10, + "start": 154, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -619,14 +619,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json b/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json index 5e92ed5a7..a079d019e 100644 --- a/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json +++ b/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json @@ -1,5 +1,15 @@ [ [ + { + "elements": [], + "description": "solc-0.6.10 is not recommended for deployment\n", + "markdown": "solc-0.6.10 is not recommended for deployment\n", + "first_markdown_element": "", + "id": "b2c2f26d29a163098673e6dcb2342e00d94996a84040bac62f7dbb2f20fa8f28", + "check": "solc-version", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -35,16 +45,6 @@ "check": "solc-version", "impact": "Informational", "confidence": "High" - }, - { - "elements": [], - "description": "solc-0.6.10 is not recommended for deployment\n", - "markdown": "solc-0.6.10 is not recommended for deployment\n", - "first_markdown_element": "", - "id": "b2c2f26d29a163098673e6dcb2342e00d94996a84040bac62f7dbb2f20fa8f28", - "check": "solc-version", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json b/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json index 66976b6a6..0f03e7d15 100644 --- a/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json +++ b/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json @@ -1,5 +1,15 @@ [ [ + { + "elements": [], + "description": "solc-0.7.4 is not recommended for deployment\n", + "markdown": "solc-0.7.4 is not recommended for deployment\n", + "first_markdown_element": "", + "id": "27e54a3813c974274b355c03bd742d4f2b8cd63fa57143b4fb741cbecd022dd2", + "check": "solc-version", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -35,16 +45,6 @@ "check": "solc-version", "impact": "Informational", "confidence": "High" - }, - { - "elements": [], - "description": "solc-0.7.4 is not recommended for deployment\n", - "markdown": "solc-0.7.4 is not recommended for deployment\n", - "first_markdown_element": "", - "id": "27e54a3813c974274b355c03bd742d4f2b8cd63fa57143b4fb741cbecd022dd2", - "check": "solc-version", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json b/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json index 84c033bd8..08e972fe3 100644 --- a/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json +++ b/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +59,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "block.timestamp > 0", "source_mapping": { - "start": 81, - "length": 29, + "start": 279, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 14 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +137,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.4.25/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6", - "id": "9d7c44d1a332d53aacc312d316891fc85c62db8b5a5a638a64cdb718c9f20029", + "description": "Timestamp.bad2() (tests/detectors/timestamp/0.4.25/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.4.25/timestamp.sol#14)\n", + "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.4.25/timestamp.sol#L14)\n", + "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15", + "id": "2182d79d032d47fdf8137bc06dd7d4c1796356e19fab558e282f5d596391ec58", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +155,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +210,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 197, - "length": 18, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 5 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +288,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.4.25/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11", - "id": "d2f6167c2351e267210692e16350d8426db102519fe3eaeeadb6d17d2445dbbd", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.4.25/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6", + "id": "9d7c44d1a332d53aacc312d316891fc85c62db8b5a5a638a64cdb718c9f20029", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -308,19 +306,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -363,42 +362,43 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "block.timestamp > 0", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 279, - "length": 24, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 14 + 10 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -441,16 +441,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad2() (tests/detectors/timestamp/0.4.25/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.4.25/timestamp.sol#14)\n", - "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.4.25/timestamp.sol#L14)\n", - "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15", - "id": "2182d79d032d47fdf8137bc06dd7d4c1796356e19fab558e282f5d596391ec58", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.4.25/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11", + "id": "d2f6167c2351e267210692e16350d8426db102519fe3eaeeadb6d17d2445dbbd", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json b/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json index 93e067ba7..d5a96fc97 100644 --- a/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json +++ b/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +60,43 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 81, - "length": 29, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +139,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.5.16/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6", - "id": "ae9cf69893e0e1a3487dc6ce8a8ae0f5ea9628607d77d32b3dfcb0202617d6e3", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.5.16/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11", + "id": "95b42362b948094ddfa2507b20840e67789d4c5d92e8e3ddac30f5b6577dc1cb", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +157,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +212,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 197, - "length": 18, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 5 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +290,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.5.16/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11", - "id": "95b42362b948094ddfa2507b20840e67789d4c5d92e8e3ddac30f5b6577dc1cb", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.5.16/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6", + "id": "ae9cf69893e0e1a3487dc6ce8a8ae0f5ea9628607d77d32b3dfcb0202617d6e3", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json b/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json index a933c4198..db2cda014 100644 --- a/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json +++ b/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +60,43 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 81, - "length": 29, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +139,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.6.11/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6", - "id": "e4e3a8ade3a3bd11b4788b70785548f81395e776a86f2940834731e8f5e05bdc", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.6.11/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11", + "id": "5d42d80cf0c66675f78bbf7717e2c532f05e8b0641d100c436ef8e1d6dc02f61", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +157,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 126, - "length": 96, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +212,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "block.timestamp > 0", "source_mapping": { - "start": 197, - "length": 18, + "start": 279, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 14 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 126, - "length": 96, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +290,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.6.11/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11", - "id": "5d42d80cf0c66675f78bbf7717e2c532f05e8b0641d100c436ef8e1d6dc02f61", + "description": "Timestamp.bad2() (tests/detectors/timestamp/0.6.11/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.6.11/timestamp.sol#14)\n", + "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.6.11/timestamp.sol#L14)\n", + "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15", + "id": "c2c1fc5eaaf8498a2f03135fb61180314cbd104df5ab6b2447620b8ac3978cac", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -308,19 +308,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 231, - "length": 79, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -363,42 +363,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "block.timestamp > 0", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 279, - "length": 24, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 14 + 5 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 231, - "length": 79, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -441,16 +441,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad2() (tests/detectors/timestamp/0.6.11/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.6.11/timestamp.sol#14)\n", - "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.6.11/timestamp.sol#L14)\n", - "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15", - "id": "c2c1fc5eaaf8498a2f03135fb61180314cbd104df5ab6b2447620b8ac3978cac", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.6.11/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6", + "id": "e4e3a8ade3a3bd11b4788b70785548f81395e776a86f2940834731e8f5e05bdc", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json b/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json index 5ac960dcc..37c8a90f7 100644 --- a/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json +++ b/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +59,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "block.timestamp > 0", "source_mapping": { - "start": 81, - "length": 29, + "start": 279, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 14 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +137,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.7.6/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6", - "id": "e776b1a35c5ff7cecd1cf6eba25c7017c852dfab68d0aaa8b2c8ecaf97b69a6b", + "description": "Timestamp.bad2() (tests/detectors/timestamp/0.7.6/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.7.6/timestamp.sol#14)\n", + "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.7.6/timestamp.sol#L14)\n", + "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15", + "id": "11b3472709ff3f3a4b3ec47abaa5a62f8dbfcd3b0b6bea0972f5b3d790049130", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +155,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +210,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 197, - "length": 18, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 5 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +288,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.7.6/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11", - "id": "fc05e44a41cc99fb6e68c9d8bfc8cbc97377f3327ed7a3c75ba170c9e75394d1", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.7.6/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6", + "id": "e776b1a35c5ff7cecd1cf6eba25c7017c852dfab68d0aaa8b2c8ecaf97b69a6b", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -308,19 +306,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -363,42 +362,43 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "block.timestamp > 0", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 279, - "length": 24, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 14 + 10 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -441,16 +441,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad2() (tests/detectors/timestamp/0.7.6/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.7.6/timestamp.sol#14)\n", - "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.7.6/timestamp.sol#L14)\n", - "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15", - "id": "11b3472709ff3f3a4b3ec47abaa5a62f8dbfcd3b0b6bea0972f5b3d790049130", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.7.6/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11", + "id": "fc05e44a41cc99fb6e68c9d8bfc8cbc97377f3327ed7a3c75ba170c9e75394d1", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json b/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json index a866423ae..1ece15736 100644 --- a/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json @@ -86,20 +86,20 @@ }, { "type": "node", - "name": "x1 = 0x000001", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 209, - "length": 18, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 10 + 12 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -187,10 +187,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#10)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L10)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L12)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "33591d733ce2e17a001b912024d5bbe2fd89b63811968c715cf1feed5e302ef1", + "id": "07b9feef94432fdda97b5b5f32b4b6acfa23801e48f9fbd9997c5c3142c56474", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -199,23 +199,21 @@ "elements": [ { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -276,46 +274,44 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x2 = 100000", "source_mapping": { - "start": 237, - "length": 25, + "start": 512, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -376,16 +372,16 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } } } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L11)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "3e08ab6e8312a9489e23b50c6252a0ae7db88a7fc2c9d83c34d6d8aceb634d08", + "description": "C.h() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#22)\n", + "markdown": "[C.h()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L22)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24", + "id": "2ae61bfeb6a9bad69fe9cb1990583dae50614da8a86cc9a720493218e11e0aa5", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -476,20 +472,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x1 = 0x000001", "source_mapping": { - "start": 272, - "length": 29, + "start": 209, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -577,10 +573,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#10)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L10)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "07b9feef94432fdda97b5b5f32b4b6acfa23801e48f9fbd9997c5c3142c56474", + "id": "33591d733ce2e17a001b912024d5bbe2fd89b63811968c715cf1feed5e302ef1", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -671,20 +667,20 @@ }, { "type": "node", - "name": "x4 = 100000", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 311, - "length": 16, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -772,10 +768,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#13)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L13)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "809a1adef5afed04cc3371628a1595dd47bb1b1003a9e0cc6be72987c4034345", + "id": "3e08ab6e8312a9489e23b50c6252a0ae7db88a7fc2c9d83c34d6d8aceb634d08", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -784,21 +780,23 @@ "elements": [ { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -859,14 +857,14 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } }, { "type": "node", - "name": "x2 = 100000", + "name": "x4 = 100000", "source_mapping": { - "start": 512, + "start": 311, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", @@ -874,7 +872,7 @@ "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 22 + 13 ], "starting_column": 9, "ending_column": 25 @@ -882,21 +880,23 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -957,16 +957,16 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } } } } ], - "description": "C.h() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#22)\n", - "markdown": "[C.h()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L22)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24", - "id": "2ae61bfeb6a9bad69fe9cb1990583dae50614da8a86cc9a720493218e11e0aa5", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#13)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L13)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", + "id": "809a1adef5afed04cc3371628a1595dd47bb1b1003a9e0cc6be72987c4034345", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json b/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json index 5d5827e21..012c9cb75 100644 --- a/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json @@ -199,23 +199,21 @@ "elements": [ { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -276,46 +274,44 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x2 = 100000", "source_mapping": { - "start": 237, - "length": 25, + "start": 512, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -376,16 +372,16 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } } } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L11)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", - "id": "ae48ab82ba202c409ec056e498d7255162ef5ab54ddb9ced3b46feb51f4c5021", + "description": "C.h() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#22)\n", + "markdown": "[C.h()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L22)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24", + "id": "2ca6b97b24a0e595f484c9a0090c3b17b654c167be300e04d9c2cc9a44406d10", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -476,20 +472,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x4 = 100000", "source_mapping": { - "start": 272, - "length": 29, + "start": 311, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 13 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -577,10 +573,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#13)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L13)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", - "id": "c295b48b8aece38cfd41bceca05ef1953bf5bf0018073076809087a4580ff086", + "id": "7e07e946fcdb14de3e3d3bc796f8f6aff17f22002129db4937e0d12767260d3d", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -671,20 +667,20 @@ }, { "type": "node", - "name": "x4 = 100000", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 311, - "length": 16, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -772,10 +768,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#13)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L13)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", - "id": "7e07e946fcdb14de3e3d3bc796f8f6aff17f22002129db4937e0d12767260d3d", + "id": "ae48ab82ba202c409ec056e498d7255162ef5ab54ddb9ced3b46feb51f4c5021", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -784,21 +780,23 @@ "elements": [ { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -859,44 +857,46 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } }, { "type": "node", - "name": "x2 = 100000", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 512, - "length": 16, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 22 + 12 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -957,16 +957,16 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } } } } ], - "description": "C.h() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#22)\n", - "markdown": "[C.h()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L22)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24", - "id": "2ca6b97b24a0e595f484c9a0090c3b17b654c167be300e04d9c2cc9a44406d10", + "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L12)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", + "id": "c295b48b8aece38cfd41bceca05ef1953bf5bf0018073076809087a4580ff086", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json b/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json index c49da46de..4e96d8149 100644 --- a/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json @@ -86,20 +86,20 @@ }, { "type": "node", - "name": "x1 = 0x000001", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 209, - "length": 18, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 10 + 11 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -187,10 +187,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#10)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L10)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "d467d1c664634fc17c861de567ef53f0ce8964e9b337127308dad5d3cb0bc343", + "id": "302b9a771b1009999d212d50adb2b938ccf41f2c26880fe17060a8922ea4836a", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -199,23 +199,21 @@ "elements": [ { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -276,46 +274,44 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x2 = 100000", "source_mapping": { - "start": 237, - "length": 25, + "start": 512, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -376,16 +372,16 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } } } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L11)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "302b9a771b1009999d212d50adb2b938ccf41f2c26880fe17060a8922ea4836a", + "description": "C.h() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#22)\n", + "markdown": "[C.h()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L22)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24", + "id": "7cd1e51c89ae28bc9bf2c7e406b39f97a648cde765fc2a05c14697648ad27e92", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -476,20 +472,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x4 = 100000", "source_mapping": { - "start": 272, - "length": 29, + "start": 311, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 13 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -577,10 +573,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#13)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L13)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "ed4cd26212cad644e275c3784912d9fe2d0789a9cb731a1a20bfdb30554f6f3a", + "id": "b8986c1b09fc9896372df90e6b43a08dfb3e3a920bd002ab5ee9eb4a29f92d95", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -671,20 +667,20 @@ }, { "type": "node", - "name": "x4 = 100000", + "name": "x1 = 0x000001", "source_mapping": { - "start": 311, - "length": 16, + "start": 209, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 13 + 10 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -772,10 +768,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#13)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L13)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#10)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L10)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "b8986c1b09fc9896372df90e6b43a08dfb3e3a920bd002ab5ee9eb4a29f92d95", + "id": "d467d1c664634fc17c861de567ef53f0ce8964e9b337127308dad5d3cb0bc343", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -784,21 +780,23 @@ "elements": [ { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -859,44 +857,46 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } }, { "type": "node", - "name": "x2 = 100000", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 512, - "length": 16, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 22 + 12 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -957,16 +957,16 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } } } } ], - "description": "C.h() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#22)\n", - "markdown": "[C.h()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L22)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24", - "id": "7cd1e51c89ae28bc9bf2c7e406b39f97a648cde765fc2a05c14697648ad27e92", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L12)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", + "id": "ed4cd26212cad644e275c3784912d9fe2d0789a9cb731a1a20bfdb30554f6f3a", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json b/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json index b62da518b..eb97dc505 100644 --- a/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json @@ -85,20 +85,20 @@ }, { "type": "node", - "name": "x1 = 0x000001", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 209, - "length": 18, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "is_dependency": false, "lines": [ - 10 + 11 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -185,10 +185,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#10)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L10)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15", - "id": "a053c2f439e1e4ac84469e1aab54f4403d4ab14bf81bae6e7a3d2e489b3514bd", + "id": "41a60e2fb1f3a88adafd67ca77db4633849be26e1b8b9973b8bf9e8ea5a9d024", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -278,20 +278,20 @@ }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 237, - "length": 25, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 12 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -378,10 +378,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L11)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L12)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15", - "id": "41a60e2fb1f3a88adafd67ca77db4633849be26e1b8b9973b8bf9e8ea5a9d024", + "id": "4876b33b2a9fb13f6def960f7f9060cbf858f117079526017b1b35a928771680", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -471,20 +471,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x1 = 0x000001", "source_mapping": { - "start": 272, - "length": 29, + "start": 209, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -571,10 +571,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#10)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L10)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15", - "id": "4876b33b2a9fb13f6def960f7f9060cbf858f117079526017b1b35a928771680", + "id": "a053c2f439e1e4ac84469e1aab54f4403d4ab14bf81bae6e7a3d2e489b3514bd", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json b/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json index d201f65cf..19736cc16 100644 --- a/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json +++ b/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json @@ -4,19 +4,21 @@ "elements": [ { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 116, - "length": 60, + "start": 182, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -63,42 +65,44 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } }, { "type": "node", - "name": "require(bool)(tx.origin == owner)", + "name": "tx.origin != owner", "source_mapping": { - "start": 142, - "length": 27, + "start": 212, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 116, - "length": 60, + "start": 182, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -145,16 +149,16 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } } } } ], - "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.4.25/tx_origin.sol#10)\n", - "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L10)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11", - "id": "b8173796b90a23f4587ed67d7100dfd3c890bf9f96910e177630bb8a6f1703fe", + "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.4.25/tx_origin.sol#14)\n", + "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L14)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17", + "id": "7abecda0c73eb43dadcd93458222d0848b1dee58af66887f81b9381c90e656f6", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" @@ -163,21 +167,19 @@ "elements": [ { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 182, - "length": 89, + "start": 116, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -224,44 +226,42 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } }, { "type": "node", - "name": "tx.origin != owner", + "name": "require(bool)(tx.origin == owner)", "source_mapping": { - "start": 212, - "length": 18, + "start": 142, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 14 + 10 ], - "starting_column": 13, - "ending_column": 31 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 182, - "length": 89, + "start": 116, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -308,16 +308,16 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } } } } ], - "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.4.25/tx_origin.sol#14)\n", - "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L14)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17", - "id": "7abecda0c73eb43dadcd93458222d0848b1dee58af66887f81b9381c90e656f6", + "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.4.25/tx_origin.sol#10)\n", + "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L10)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11", + "id": "b8173796b90a23f4587ed67d7100dfd3c890bf9f96910e177630bb8a6f1703fe", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json b/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json index 2a8ec6848..ba4dcbb61 100644 --- a/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json +++ b/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json @@ -4,19 +4,21 @@ "elements": [ { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 130, - "length": 66, + "start": 202, + "length": 95, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -63,42 +65,44 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } }, { "type": "node", - "name": "require(bool)(tx.origin == owner)", + "name": "tx.origin != owner", "source_mapping": { - "start": 162, - "length": 27, + "start": 238, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 130, - "length": 66, + "start": 202, + "length": 95, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -145,16 +149,16 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } } } } ], - "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.7.6/tx_origin.sol#10)\n", - "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L10)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11", - "id": "d3d9d4cb2307781870af54ebca528052197b021adcabf4d0c3a897e96affece3", + "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.7.6/tx_origin.sol#14)\n", + "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L14)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17", + "id": "1c195c6a3ea5b7e77c12b7580544ef2320699359862c22961726f112ab27b3a5", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" @@ -163,21 +167,19 @@ "elements": [ { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 202, - "length": 95, + "start": 130, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -224,44 +226,42 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } }, { "type": "node", - "name": "tx.origin != owner", + "name": "require(bool)(tx.origin == owner)", "source_mapping": { - "start": 238, - "length": 18, + "start": 162, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 14 + 10 ], - "starting_column": 13, - "ending_column": 31 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 202, - "length": 95, + "start": 130, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -308,16 +308,16 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } } } } ], - "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.7.6/tx_origin.sol#14)\n", - "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L14)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17", - "id": "1c195c6a3ea5b7e77c12b7580544ef2320699359862c22961726f112ab27b3a5", + "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.7.6/tx_origin.sol#10)\n", + "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L10)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11", + "id": "d3d9d4cb2307781870af54ebca528052197b021adcabf4d0c3a897e96affece3", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json b/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json index 86616d80a..db2e09b5b 100644 --- a/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json +++ b/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json @@ -4,21 +4,23 @@ "elements": [ { "type": "contract", - "name": "DerivedContract_bad0", + "name": "DerivedContract_good", "source_mapping": { - "start": 185, - "length": 133, + "start": 775, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -26,92 +28,126 @@ }, { "type": "function", - "name": "f2", + "name": "get", "source_mapping": { - "start": 72, - "length": 37, + "start": 495, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 3 + 24 ], "starting_column": 5, - "ending_column": 42 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface", + "name": "BaseInterface3", "source_mapping": { - "start": 0, - "length": 111, + "start": 465, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4 + 23, + 24, + 25 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "f2()" + "signature": "get(uint256)" + } + } + ], + "description": "DerivedContract_good (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#35-41) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_good](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41", + "id": "08d3e8a72b5da6d189acb46ecd36f00787a87812727526a0cae248a2bac348fc", + "check": "unimplemented-functions", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "contract", + "name": "DerivedContract_bad2", + "source_mapping": { + "start": 541, + "length": 232, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", + "is_dependency": false, + "lines": [ + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 1, + "ending_column": 2 } }, { "type": "function", - "name": "f3", + "name": "get", "source_mapping": { - "start": 144, - "length": 37, + "start": 495, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 7 + 24 ], "starting_column": 5, - "ending_column": 42 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface2", + "name": "BaseInterface3", "source_mapping": { - "start": 113, - "length": 70, + "start": 465, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 23, + 24, + 25 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "f3()" + "signature": "get(uint256)" } } ], - "description": "DerivedContract_bad0 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#10-14) does not implement functions:\n\t- BaseInterface.f2() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#3)\n\t- BaseInterface2.f3() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#7)\n", - "markdown": "[DerivedContract_bad0](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14) does not implement functions:\n\t- [BaseInterface.f2()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L3)\n\t- [BaseInterface2.f3()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L7)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14", - "id": "8614d351f7aac0c05e8df6ef7c89c6b46a2b8acf6295c9d5a886ff6489c74a41", + "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33", + "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" @@ -120,22 +156,21 @@ "elements": [ { "type": "contract", - "name": "AbstractContract_bad1", + "name": "DerivedContract_bad0", "source_mapping": { - "start": 320, - "length": 143, + "start": 185, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 @@ -143,9 +178,9 @@ }, { "type": "function", - "name": "f1", + "name": "f2", "source_mapping": { - "start": 357, + "start": 72, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", @@ -153,7 +188,7 @@ "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 17 + 3 ], "starting_column": 5, "ending_column": 42 @@ -161,111 +196,74 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "AbstractContract_bad1", + "name": "BaseInterface", "source_mapping": { - "start": 320, - "length": 143, + "start": 0, + "length": 111, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 1, + 2, + 3, + 4 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "f1()" - } - } - ], - "description": "AbstractContract_bad1 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#16-21) does not implement functions:\n\t- AbstractContract_bad1.f1() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#17)\n", - "markdown": "[AbstractContract_bad1](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21) does not implement functions:\n\t- [AbstractContract_bad1.f1()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L17)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21", - "id": "adc202df4717efc4e19b549c0e623a79fac759a36bffb5d5e4aac401e33375d7", - "check": "unimplemented-functions", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "contract", - "name": "DerivedContract_bad2", - "source_mapping": { - "start": 541, - "length": 232, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", - "is_dependency": false, - "lines": [ - 27, - 28, - 29, - 30, - 31, - 32, - 33 - ], - "starting_column": 1, - "ending_column": 2 + "signature": "f2()" } }, { "type": "function", - "name": "get", + "name": "f3", "source_mapping": { - "start": 495, - "length": 42, + "start": 144, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 24 + 7 ], "starting_column": 5, - "ending_column": 47 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface3", + "name": "BaseInterface2", "source_mapping": { - "start": 465, - "length": 74, + "start": 113, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25 + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "get(uint256)" + "signature": "f3()" } } ], - "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33", - "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", + "description": "DerivedContract_bad0 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#10-14) does not implement functions:\n\t- BaseInterface.f2() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#3)\n\t- BaseInterface2.f3() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#7)\n", + "markdown": "[DerivedContract_bad0](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14) does not implement functions:\n\t- [BaseInterface.f2()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L3)\n\t- [BaseInterface2.f3()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L7)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14", + "id": "8614d351f7aac0c05e8df6ef7c89c6b46a2b8acf6295c9d5a886ff6489c74a41", "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" @@ -274,23 +272,22 @@ "elements": [ { "type": "contract", - "name": "DerivedContract_good", + "name": "AbstractContract_bad1", "source_mapping": { - "start": 775, - "length": 243, + "start": 320, + "length": 143, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -298,50 +295,53 @@ }, { "type": "function", - "name": "get", + "name": "f1", "source_mapping": { - "start": 495, - "length": 42, + "start": 357, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 24 + 17 ], "starting_column": 5, - "ending_column": 47 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface3", + "name": "AbstractContract_bad1", "source_mapping": { - "start": 465, - "length": 74, + "start": 320, + "length": 143, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25 + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "get(uint256)" + "signature": "f1()" } } ], - "description": "DerivedContract_good (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#35-41) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_good](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41", - "id": "08d3e8a72b5da6d189acb46ecd36f00787a87812727526a0cae248a2bac348fc", + "description": "AbstractContract_bad1 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#16-21) does not implement functions:\n\t- AbstractContract_bad1.f1() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#17)\n", + "markdown": "[AbstractContract_bad1](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21) does not implement functions:\n\t- [AbstractContract_bad1.f1()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L17)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21", + "id": "adc202df4717efc4e19b549c0e623a79fac759a36bffb5d5e4aac401e33375d7", "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json b/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json index 418279203..638105ffb 100644 --- a/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json +++ b/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json @@ -1,5 +1,81 @@ [ [ + { + "elements": [ + { + "type": "contract", + "name": "DerivedContract_bad2", + "source_mapping": { + "start": 593, + "length": 344, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "is_dependency": false, + "lines": [ + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "function", + "name": "get", + "source_mapping": { + "start": 539, + "length": 50, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "is_dependency": false, + "lines": [ + 24 + ], + "starting_column": 5, + "ending_column": 55 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "BaseInterface3", + "source_mapping": { + "start": 500, + "length": 91, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "get(uint256)" + } + } + ], + "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33", + "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", + "check": "unimplemented-functions", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -193,82 +269,6 @@ "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" - }, - { - "elements": [ - { - "type": "contract", - "name": "DerivedContract_bad2", - "source_mapping": { - "start": 593, - "length": 344, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "is_dependency": false, - "lines": [ - 27, - 28, - 29, - 30, - 31, - 32, - 33 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "function", - "name": "get", - "source_mapping": { - "start": 539, - "length": 50, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "is_dependency": false, - "lines": [ - 24 - ], - "starting_column": 5, - "ending_column": 55 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "BaseInterface3", - "source_mapping": { - "start": 500, - "length": 91, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "is_dependency": false, - "lines": [ - 23, - 24, - 25 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "get(uint256)" - } - } - ], - "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33", - "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", - "check": "unimplemented-functions", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json b/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json index e3074383a..a835cdf9a 100644 --- a/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json +++ b/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json @@ -1,5 +1,81 @@ [ [ + { + "elements": [ + { + "type": "contract", + "name": "DerivedContract_bad2", + "source_mapping": { + "start": 593, + "length": 344, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "is_dependency": false, + "lines": [ + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "function", + "name": "get", + "source_mapping": { + "start": 539, + "length": 50, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "is_dependency": false, + "lines": [ + 24 + ], + "starting_column": 5, + "ending_column": 55 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "BaseInterface3", + "source_mapping": { + "start": 500, + "length": 91, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "get(uint256)" + } + } + ], + "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33", + "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", + "check": "unimplemented-functions", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -193,82 +269,6 @@ "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" - }, - { - "elements": [ - { - "type": "contract", - "name": "DerivedContract_bad2", - "source_mapping": { - "start": 593, - "length": 344, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "is_dependency": false, - "lines": [ - 27, - 28, - 29, - 30, - 31, - 32, - 33 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "function", - "name": "get", - "source_mapping": { - "start": 539, - "length": 50, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "is_dependency": false, - "lines": [ - 24 - ], - "starting_column": 5, - "ending_column": 55 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "BaseInterface3", - "source_mapping": { - "start": 500, - "length": 91, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "is_dependency": false, - "lines": [ - 23, - 24, - 25 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "get(uint256)" - } - } - ], - "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33", - "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", - "check": "unimplemented-functions", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json b/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json index 83bc555c0..42f3c9091 100644 --- a/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json +++ b/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json @@ -4,23 +4,26 @@ "elements": [ { "type": "contract", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 27, - "length": 149, + "start": 486, + "length": 199, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 @@ -28,39 +31,38 @@ }, { "type": "node", - "name": "a(10)", + "name": "s.a(10)", "source_mapping": { - "start": 164, - "length": 5, + "start": 671, + "length": 7, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 7 + 27 ], "starting_column": 5, - "ending_column": 10 + "ending_column": 12 }, "type_specific_fields": { "parent": { "type": "function", "name": "constructor", "source_mapping": { - "start": 45, - "length": 129, + "start": 628, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 25, + 26, + 27, + 28 ], "starting_column": 3, "ending_column": 4 @@ -68,23 +70,26 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 27, - "length": 149, + "start": 486, + "length": 199, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 @@ -96,10 +101,10 @@ } } ], - "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9", - "id": "38a85244054f0e06f1d3b476742113d0cf1cbe82b6c2a16f6abfa8cb7611aa2d", + "description": "Contract bad2 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#20-29) \n\t s.a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#27) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad2](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29) \n\t [s.a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L27) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29", + "id": "1b01aa44445395d800ebe53b807c6884d1c5fc96d38f255bc402e1b339a8a6f2", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" @@ -108,24 +113,23 @@ "elements": [ { "type": "contract", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 178, - "length": 306, + "start": 27, + "length": 149, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18 + 3, + 4, + 5, + 6, + 7, + 8, + 9 ], "starting_column": 1, "ending_column": 2 @@ -133,9 +137,9 @@ }, { "type": "node", - "name": "b(10)", + "name": "a(10)", "source_mapping": { - "start": 472, + "start": 164, "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", @@ -143,7 +147,7 @@ "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 16 + 7 ], "starting_column": 5, "ending_column": 10 @@ -153,20 +157,19 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 196, - "length": 286, + "start": 45, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14, - 15, - 16, - 17 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -174,24 +177,23 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 178, - "length": 306, + "start": 27, + "length": 149, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18 + 3, + 4, + 5, + 6, + 7, + 8, + 9 ], "starting_column": 1, "ending_column": 2 @@ -203,10 +205,10 @@ } } ], - "description": "Contract bad1 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#11-18) \n\t b(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#16) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad1](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18) \n\t [b(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L16) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18", - "id": "eca46630e741d928b03312539f0e9ddfb182cb16b0425b5ff881a7800a50511e", + "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9", + "id": "38a85244054f0e06f1d3b476742113d0cf1cbe82b6c2a16f6abfa8cb7611aa2d", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" @@ -215,26 +217,28 @@ "elements": [ { "type": "contract", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 486, - "length": 199, + "start": 687, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42 ], "starting_column": 1, "ending_column": 2 @@ -242,38 +246,38 @@ }, { "type": "node", - "name": "s.a(10)", + "name": "a(10)", "source_mapping": { - "start": 671, - "length": 7, + "start": 858, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 27 + 36 ], "starting_column": 5, - "ending_column": 12 + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", "name": "constructor", "source_mapping": { - "start": 628, - "length": 55, + "start": 831, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 35, + 36, + 37, + 38 ], "starting_column": 3, "ending_column": 4 @@ -281,26 +285,28 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 486, - "length": 199, + "start": 687, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42 ], "starting_column": 1, "ending_column": 2 @@ -312,10 +318,10 @@ } } ], - "description": "Contract bad2 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#20-29) \n\t s.a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#27) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad2](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29) \n\t [s.a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L27) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29", - "id": "1b01aa44445395d800ebe53b807c6884d1c5fc96d38f255bc402e1b339a8a6f2", + "description": "Contract bad3 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#31-42) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#36) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad3](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L36) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42", + "id": "4bfb037a7504ad1a677e70cdba68b2b4d47f485e4c0d039ac0a6364465b4e56e", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" @@ -324,28 +330,24 @@ "elements": [ { "type": "contract", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 687, - "length": 269, + "start": 178, + "length": 306, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42 + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -353,9 +355,9 @@ }, { "type": "node", - "name": "a(10)", + "name": "b(10)", "source_mapping": { - "start": 858, + "start": 472, "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", @@ -363,7 +365,7 @@ "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 36 + 16 ], "starting_column": 5, "ending_column": 10 @@ -373,18 +375,20 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 831, - "length": 50, + "start": 196, + "length": 286, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 35, - 36, - 37, - 38 + 12, + 13, + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -392,28 +396,24 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 687, - "length": 269, + "start": 178, + "length": 306, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42 + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -425,10 +425,10 @@ } } ], - "description": "Contract bad3 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#31-42) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#36) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad3](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L36) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42", - "id": "4bfb037a7504ad1a677e70cdba68b2b4d47f485e4c0d039ac0a6364465b4e56e", + "description": "Contract bad1 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#11-18) \n\t b(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#16) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad1](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18) \n\t [b(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L16) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18", + "id": "eca46630e741d928b03312539f0e9ddfb182cb16b0425b5ff881a7800a50511e", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json b/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json index 3c3591c5d..7935b85b3 100644 --- a/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json +++ b/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json @@ -1,109 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "bad0", - "source_mapping": { - "start": 27, - "length": 149, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "node", - "name": "a(10)", - "source_mapping": { - "start": 164, - "length": 5, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 5, - "ending_column": 10 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "constructor", - "source_mapping": { - "start": 45, - "length": 129, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 4, - 5, - 6, - 7, - 8 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "bad0", - "source_mapping": { - "start": 27, - "length": 149, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "constructor()" - } - } - } - } - ], - "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9", - "id": "e1e469fcf69ffbf93884287be133945396a1a363e77db02f241c90027f19bf48", - "check": "uninitialized-fptr-cst", - "impact": "Low", - "confidence": "High" - }, { "elements": [ { @@ -320,6 +216,110 @@ "impact": "Low", "confidence": "High" }, + { + "elements": [ + { + "type": "contract", + "name": "bad0", + "source_mapping": { + "start": 27, + "length": 149, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "node", + "name": "a(10)", + "source_mapping": { + "start": 164, + "length": 5, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 5, + "ending_column": 10 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "constructor", + "source_mapping": { + "start": 45, + "length": 129, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 4, + 5, + 6, + 7, + 8 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "bad0", + "source_mapping": { + "start": 27, + "length": 149, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "constructor()" + } + } + } + } + ], + "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9", + "id": "e1e469fcf69ffbf93884287be133945396a1a363e77db02f241c90027f19bf48", + "check": "uninitialized-fptr-cst", + "impact": "Low", + "confidence": "High" + }, { "elements": [ { diff --git a/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json index 7cffff3a3..90dd94c8d 100644 --- a/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 58, - "length": 19, + "start": 698, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 29, - "length": 140, + "start": 644, + "length": 354, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 84, - "length": 82, + "start": 878, + "length": 117, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 29, - "length": 140, + "start": 644, + "length": 354, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 698, - "length": 15, + "start": 751, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 878, - "length": 117, + "start": 820, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 751, - "length": 6, + "start": 58, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 24 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 644, - "length": 354, + "start": 29, + "length": 140, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 820, - "length": 52, + "start": 84, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 644, - "length": 354, + "start": 29, + "length": 140, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json index b57293e93..0c996ec25 100644 --- a/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 57, - "length": 27, + "start": 729, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 91, - "length": 82, + "start": 916, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 729, - "length": 15, + "start": 782, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 916, - "length": 129, + "start": 851, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 782, - "length": 6, + "start": 57, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 851, - "length": 59, + "start": 91, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json index e82e93548..63c5067ce 100644 --- a/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 57, - "length": 27, + "start": 729, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 91, - "length": 82, + "start": 916, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 729, - "length": 15, + "start": 782, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 916, - "length": 129, + "start": 851, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 782, - "length": 6, + "start": 57, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 851, - "length": 59, + "start": 91, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json index a35c50194..c27eb6c1e 100644 --- a/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 57, - "length": 27, + "start": 729, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 91, - "length": 82, + "start": 916, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 729, - "length": 15, + "start": 782, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 916, - "length": 129, + "start": 851, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 782, - "length": 6, + "start": 57, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 851, - "length": 59, + "start": 91, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/unprotected-upgrade/0.4.25/Fixed.sol b/tests/detectors/unprotected-upgrade/0.4.25/Fixed.sol index 3bcf418d6..b3b21f5fe 100644 --- a/tests/detectors/unprotected-upgrade/0.4.25/Fixed.sol +++ b/tests/detectors/unprotected-upgrade/0.4.25/Fixed.sol @@ -21,7 +21,6 @@ contract Fixed is Initializable{ } } - contract Not_Upgradeable{ } @@ -36,4 +35,20 @@ contract UpgradeableNoDestruct is Initializable{ require(owner == address(0)); owner = msg.sender; } +} + +contract Fixed2 is Initializable { + address owner; + + constructor() public initializer {} + + function initialize() external initializer { + require(owner == address(0)); + owner = msg.sender; + } + + function kill() external { + require(msg.sender == owner); + selfdestruct(owner); + } } \ No newline at end of file diff --git a/tests/detectors/unprotected-upgrade/0.5.16/Fixed.sol b/tests/detectors/unprotected-upgrade/0.5.16/Fixed.sol index 1ef89baca..c1e0833ad 100644 --- a/tests/detectors/unprotected-upgrade/0.5.16/Fixed.sol +++ b/tests/detectors/unprotected-upgrade/0.5.16/Fixed.sol @@ -21,7 +21,6 @@ contract Fixed is Initializable{ } } - contract Not_Upgradeable{ } @@ -36,4 +35,20 @@ contract UpgradeableNoDestruct is Initializable{ require(owner == address(0)); owner = msg.sender; } +} + +contract Fixed2 is Initializable { + address payable owner; + + constructor() public initializer {} + + function initialize() external initializer { + require(owner == address(0)); + owner = msg.sender; + } + + function kill() external { + require(msg.sender == owner); + selfdestruct(owner); + } } \ No newline at end of file diff --git a/tests/detectors/unprotected-upgrade/0.6.11/Fixed.sol b/tests/detectors/unprotected-upgrade/0.6.11/Fixed.sol index 1ef89baca..d3936f85a 100644 --- a/tests/detectors/unprotected-upgrade/0.6.11/Fixed.sol +++ b/tests/detectors/unprotected-upgrade/0.6.11/Fixed.sol @@ -36,4 +36,20 @@ contract UpgradeableNoDestruct is Initializable{ require(owner == address(0)); owner = msg.sender; } +} + +contract Fixed2 is Initializable { + address payable owner; + + constructor() public initializer {} + + function initialize() external initializer { + require(owner == address(0)); + owner = msg.sender; + } + + function kill() external { + require(msg.sender == owner); + selfdestruct(owner); + } } \ No newline at end of file diff --git a/tests/detectors/unprotected-upgrade/0.7.6/Fixed.sol b/tests/detectors/unprotected-upgrade/0.7.6/Fixed.sol index 1ef89baca..f9e8d45c3 100644 --- a/tests/detectors/unprotected-upgrade/0.7.6/Fixed.sol +++ b/tests/detectors/unprotected-upgrade/0.7.6/Fixed.sol @@ -3,7 +3,7 @@ import "./Initializable.sol"; contract Fixed is Initializable{ address payable owner; - constructor() public{ + constructor() { owner = msg.sender; } @@ -21,14 +21,13 @@ contract Fixed is Initializable{ } } - contract Not_Upgradeable{ } contract UpgradeableNoDestruct is Initializable{ address payable owner; - constructor() public{ + constructor() { owner = msg.sender; } @@ -36,4 +35,20 @@ contract UpgradeableNoDestruct is Initializable{ require(owner == address(0)); owner = msg.sender; } +} + +contract Fixed2 is Initializable { + address payable owner; + + constructor() initializer {} + + function initialize() external initializer { + require(owner == address(0)); + owner = msg.sender; + } + + function kill() external { + require(msg.sender == owner); + selfdestruct(owner); + } } \ No newline at end of file diff --git a/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json b/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json index 91aed0691..520599b12 100644 --- a/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json +++ b/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json @@ -72,20 +72,20 @@ }, { "type": "node", - "name": "t.f()", + "name": "a.add(0)", "source_mapping": { - "start": 279, - "length": 5, + "start": 353, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.4.25/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.4.25/unused_return.sol", "is_dependency": false, "lines": [ - 18 + 22 ], "starting_column": 9, - "ending_column": 14 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -159,10 +159,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.4.25/unused_return.sol#18)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.4.25/unused_return.sol#L18)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.4.25/unused_return.sol#22)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.4.25/unused_return.sol#L22)\n", "first_markdown_element": "tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29", - "id": "73c54c292f1f2fb8a8d88b230cd0bf2da3bc8fff0d758b009839ca883b36c84e", + "id": "619bba0a79919e4f53e583a88cd4e32f204489c8d86e365a20bf3f9ce4c0f542", "check": "unused-return", "impact": "Medium", "confidence": "Medium" @@ -239,20 +239,20 @@ }, { "type": "node", - "name": "a.add(0)", + "name": "t.f()", "source_mapping": { - "start": 353, - "length": 8, + "start": 279, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.4.25/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.4.25/unused_return.sol", "is_dependency": false, "lines": [ - 22 + 18 ], "starting_column": 9, - "ending_column": 17 + "ending_column": 14 }, "type_specific_fields": { "parent": { @@ -326,10 +326,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.4.25/unused_return.sol#22)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.4.25/unused_return.sol#L22)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.4.25/unused_return.sol#18)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.4.25/unused_return.sol#L18)\n", "first_markdown_element": "tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29", - "id": "619bba0a79919e4f53e583a88cd4e32f204489c8d86e365a20bf3f9ce4c0f542", + "id": "73c54c292f1f2fb8a8d88b230cd0bf2da3bc8fff0d758b009839ca883b36c84e", "check": "unused-return", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json b/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json index 37152b359..65b2400b1 100644 --- a/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json +++ b/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json @@ -72,20 +72,20 @@ }, { "type": "node", - "name": "t.f()", + "name": "a.add(0)", "source_mapping": { - "start": 296, - "length": 5, + "start": 370, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.7.6/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.7.6/unused_return.sol", "is_dependency": false, "lines": [ - 18 + 22 ], "starting_column": 9, - "ending_column": 14 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -159,10 +159,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.7.6/unused_return.sol#18)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.7.6/unused_return.sol#L18)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.7.6/unused_return.sol#22)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.7.6/unused_return.sol#L22)\n", "first_markdown_element": "tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29", - "id": "d5027a5d25ac3528c0d03d48a3bbd9ef6ea582b2a286b47e8e7f741c26c35634", + "id": "3774dfb7de028a13f2945c0e19a075ffb1fb27a7785aaaf79dff863f7f1bbec7", "check": "unused-return", "impact": "Medium", "confidence": "Medium" @@ -239,20 +239,20 @@ }, { "type": "node", - "name": "a.add(0)", + "name": "t.f()", "source_mapping": { - "start": 370, - "length": 8, + "start": 296, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.7.6/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.7.6/unused_return.sol", "is_dependency": false, "lines": [ - 22 + 18 ], "starting_column": 9, - "ending_column": 17 + "ending_column": 14 }, "type_specific_fields": { "parent": { @@ -326,10 +326,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.7.6/unused_return.sol#22)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.7.6/unused_return.sol#L22)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.7.6/unused_return.sol#18)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.7.6/unused_return.sol#L18)\n", "first_markdown_element": "tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29", - "id": "3774dfb7de028a13f2945c0e19a075ffb1fb27a7785aaaf79dff863f7f1bbec7", + "id": "d5027a5d25ac3528c0d03d48a3bbd9ef6ea582b2a286b47e8e7f741c26c35634", "check": "unused-return", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json b/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json index ba44c43a3..2356dda78 100644 --- a/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.4.25/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.4.25/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.4.25/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.4.25/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.4.25/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.4.25/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.4.25/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.4.25/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.4.25/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.4.25/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.4.25/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.4.25/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.4.25/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.4.25/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.4.25/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.4.25/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.4.25/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.4.25/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json b/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json index 5f3f1b7d0..6858e129b 100644 --- a/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.5.16/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.5.16/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.5.16/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.5.16/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.5.16/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.5.16/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.5.16/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.5.16/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.5.16/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.5.16/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.5.16/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.5.16/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.5.16/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.5.16/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.5.16/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.5.16/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.5.16/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.5.16/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json b/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json index ee43e3df6..357b5d4f1 100644 --- a/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.6.11/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.6.11/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.6.11/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.6.11/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.6.11/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.6.11/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.6.11/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.6.11/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.6.11/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.6.11/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.6.11/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.6.11/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.6.11/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.6.11/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.6.11/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.6.11/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.6.11/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.6.11/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json b/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json index 7bf0db31b..7eedbf232 100644 --- a/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.7.6/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.7.6/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.7.6/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.7.6/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.7.6/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.7.6/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.7.6/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.7.6/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.7.6/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.7.6/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.7.6/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.7.6/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.7.6/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.7.6/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.7.6/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.7.6/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.7.6/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.7.6/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json b/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json index baa4240bc..217499938 100644 --- a/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json +++ b/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json @@ -4,20 +4,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "i", "source_mapping": { - "start": 130, - "length": 10, + "start": 199, + "length": 11, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 5 + 8 ], - "starting_column": 9, - "ending_column": 19 + "starting_column": 18, + "ending_column": 29 }, "type_specific_fields": { "parent": { @@ -168,20 +168,20 @@ }, { "type": "node", - "name": "y = x + 9 + z", + "name": "i --", "source_mapping": { - "start": 69, - "length": 13, + "start": 417, + "length": 3, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 4 + 14 ], - "starting_column": 9, - "ending_column": 22 + "starting_column": 29, + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -259,10 +259,10 @@ } } ], - "description": "Variable 'C.f(uint256).x (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#5)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: y = x + 9 + z (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#4)\n", - "markdown": "Variable '[C.f(uint256).x](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [y = x + 9 + z](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L4)\n", - "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5", - "id": "ede1e902fdfe70c5e7cf91f33df8540f1d15952d00f70a9a5dfb9edbcbe49cb6", + "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i -- (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", + "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i --](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", + "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", + "id": "24ed055a29ee9bac066b9a99a36d40f7bd77314605d8f1a6440a5576a38b24fb", "check": "variable-scope", "impact": "Low", "confidence": "High" @@ -702,20 +702,20 @@ }, { "type": "node", - "name": "i > 0", + "name": "x += i", "source_mapping": { - "start": 410, - "length": 5, + "start": 436, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 14 + 15 ], - "starting_column": 22, - "ending_column": 27 + "starting_column": 13, + "ending_column": 19 }, "type_specific_fields": { "parent": { @@ -793,10 +793,10 @@ } } ], - "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i > 0 (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", - "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i > 0](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", + "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: x += i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#15)\n", + "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [x += i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L15)\n", "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", - "id": "ffb778e86e0b11beed38687c3abf9ffd0de948ec4ccc0109a78954741220de9e", + "id": "e346a217ae6931f9fa7ff70302d05db17c0422dd4272f87935b633950239b592", "check": "variable-scope", "impact": "Low", "confidence": "High" @@ -805,20 +805,20 @@ "elements": [ { "type": "variable", - "name": "i", + "name": "x", "source_mapping": { - "start": 199, - "length": 11, + "start": 130, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 8 + 5 ], - "starting_column": 18, - "ending_column": 29 + "starting_column": 9, + "ending_column": 19 }, "type_specific_fields": { "parent": { @@ -969,20 +969,20 @@ }, { "type": "node", - "name": "x += i", + "name": "y = x + 9 + z", "source_mapping": { - "start": 436, - "length": 6, + "start": 69, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 15 + 4 ], - "starting_column": 13, - "ending_column": 19 + "starting_column": 9, + "ending_column": 22 }, "type_specific_fields": { "parent": { @@ -1060,10 +1060,10 @@ } } ], - "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: x += i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#15)\n", - "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [x += i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L15)\n", - "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", - "id": "e346a217ae6931f9fa7ff70302d05db17c0422dd4272f87935b633950239b592", + "description": "Variable 'C.f(uint256).x (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#5)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: y = x + 9 + z (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#4)\n", + "markdown": "Variable '[C.f(uint256).x](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [y = x + 9 + z](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L4)\n", + "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5", + "id": "ede1e902fdfe70c5e7cf91f33df8540f1d15952d00f70a9a5dfb9edbcbe49cb6", "check": "variable-scope", "impact": "Low", "confidence": "High" @@ -1236,10 +1236,10 @@ }, { "type": "node", - "name": "i --", + "name": "i > 0", "source_mapping": { - "start": 417, - "length": 3, + "start": 410, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", @@ -1248,8 +1248,8 @@ "lines": [ 14 ], - "starting_column": 29, - "ending_column": 32 + "starting_column": 22, + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -1327,10 +1327,10 @@ } } ], - "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i -- (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", - "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i --](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", + "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i > 0 (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", + "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i > 0](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", - "id": "24ed055a29ee9bac066b9a99a36d40f7bd77314605d8f1a6440a5576a38b24fb", + "id": "ffb778e86e0b11beed38687c3abf9ffd0de948ec4ccc0109a78954741220de9e", "check": "variable-scope", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json b/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json index c1cb5e048..93950c93c 100644 --- a/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json +++ b/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = uint256(blockhash(uint256)(10000)) % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 216, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6", - "id": "fc717c512384a74aab058df35c032bca15e276f4e03446ad7b52f33acac1a556", + "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#13)\" \n", + "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L13)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14", + "id": "4ac936f85dc1e903d3d6688aaea992d3a5b124bb90eb73eb372dffcc60ccd9dc", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -169,19 +169,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 122, - "length": 56, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -231,42 +231,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = now % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 154, - "length": 17, + "start": 395, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 9 + 21 ], "starting_column": 7, - "ending_column": 24 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 122, - "length": 56, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -316,16 +316,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#9)\" \n", - "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L9)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10", - "id": "b6c45323a90c31dea54db817de9a3d13e40431227ca6240465e43183004f6541", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22", + "id": "9ea8ea8faa26193b33dc2b3be5a338350aa82a076a4b5ec387ad8f5c15b7181f", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -334,19 +334,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 184, - "length": 78, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -396,42 +396,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "i = uint256(blockhash(uint256)(10000)) % 10", + "name": "i = now % 10", "source_mapping": { - "start": 216, - "length": 39, + "start": 154, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 13 + 9 ], "starting_column": 7, - "ending_column": 46 + "ending_column": 24 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 184, - "length": 78, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -481,16 +481,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#13)\" \n", - "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L13)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14", - "id": "4ac936f85dc1e903d3d6688aaea992d3a5b124bb90eb73eb372dffcc60ccd9dc", + "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#9)\" \n", + "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L9)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10", + "id": "b6c45323a90c31dea54db817de9a3d13e40431227ca6240465e43183004f6541", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 395, - "length": 19, + "start": 77, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 5 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22", - "id": "9ea8ea8faa26193b33dc2b3be5a338350aa82a076a4b5ec387ad8f5c15b7181f", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6", + "id": "fc717c512384a74aab058df35c032bca15e276f4e03446ad7b52f33acac1a556", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json b/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json index 06344769b..83e527ab7 100644 --- a/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json +++ b/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 395, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 21 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6", - "id": "5bb9fd5cdaccfeb6303fb8ea676c6aed0164ba2ce3fc8b5c2778cd280afe61b0", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22", + "id": "342f1496b7a91c084d108fd76054672be5ac3a1a5481f907b93d3c72e32f70dc", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -169,19 +169,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 122, - "length": 56, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -231,42 +231,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } }, { "type": "node", - "name": "i = now % 10", + "name": "i = uint256(blockhash(uint256)(10000)) % 10", "source_mapping": { - "start": 154, - "length": 17, + "start": 216, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 9 + 13 ], "starting_column": 7, - "ending_column": 24 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 122, - "length": 56, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -316,16 +316,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } } } } ], - "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#9)\" \n", - "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L9)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10", - "id": "963866d884f65c4552ae10288cc1f92de1050f5f6254d4d2df132c7fbb7ce773", + "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#13)\" \n", + "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L13)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14", + "id": "4769d2b25e78345ad05fa046a989f5f5545739c20e8c2b93c2968cdca69a5501", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -334,19 +334,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 184, - "length": 78, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -396,42 +396,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "i = uint256(blockhash(uint256)(10000)) % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 216, - "length": 39, + "start": 77, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 13 + 5 ], "starting_column": 7, - "ending_column": 46 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 184, - "length": 78, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -481,16 +481,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#13)\" \n", - "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L13)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14", - "id": "4769d2b25e78345ad05fa046a989f5f5545739c20e8c2b93c2968cdca69a5501", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6", + "id": "5bb9fd5cdaccfeb6303fb8ea676c6aed0164ba2ce3fc8b5c2778cd280afe61b0", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 363, - "length": 58, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = now % 10", "source_mapping": { - "start": 395, - "length": 19, + "start": 154, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 9 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 24 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 363, - "length": 58, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22", - "id": "342f1496b7a91c084d108fd76054672be5ac3a1a5481f907b93d3c72e32f70dc", + "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#9)\" \n", + "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L9)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10", + "id": "963866d884f65c4552ae10288cc1f92de1050f5f6254d4d2df132c7fbb7ce773", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json b/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json index acf094666..cd31e5f63 100644 --- a/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json +++ b/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 395, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 21 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6", - "id": "bfdb804ad9a58c4a694182e0f4dff561ffe37a0680f850763136ac57af57cea6", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22", + "id": "211bbc7b73c90c6ae03f3e73c2b306c74699381229a4af6d4687891b024f2189", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 395, - "length": 19, + "start": 77, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 5 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22", - "id": "211bbc7b73c90c6ae03f3e73c2b306c74699381229a4af6d4687891b024f2189", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6", + "id": "bfdb804ad9a58c4a694182e0f4dff561ffe37a0680f850763136ac57af57cea6", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json b/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json index 18a7add1c..3be19474d 100644 --- a/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json +++ b/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 196, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = uint256(blockhash(uint256)(10000)) % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 228, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 196, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6", - "id": "1699e708ab01560cde36ac92caaf0abd7c3de733431340f4719b1dfd3544a6ef", + "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#13)\" \n", + "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L13)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14", + "id": "0afae786715bc7bc677a2525aec172999533a2bc1ee62d9b974c9f13a45755c6", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -169,9 +169,9 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 122, + "start": 45, "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", @@ -179,9 +179,9 @@ "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -231,14 +231,14 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", "name": "i = block.timestamp % 10", "source_mapping": { - "start": 154, + "start": 77, "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", @@ -246,7 +246,7 @@ "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 9 + 5 ], "starting_column": 7, "ending_column": 36 @@ -254,9 +254,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 122, + "start": 45, "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", @@ -264,9 +264,9 @@ "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -316,16 +316,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#8-10) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#9)\" \n", - "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L9)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10", - "id": "e27e978d7016cb26d0d372e84c7f4e1bbd6e45af239e195823b3b138713430a6", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6", + "id": "1699e708ab01560cde36ac92caaf0abd7c3de733431340f4719b1dfd3544a6ef", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -334,19 +334,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 196, - "length": 78, + "start": 375, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -396,42 +396,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = uint256(blockhash(uint256)(10000)) % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 228, - "length": 39, + "start": 407, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 13 + 21 ], "starting_column": 7, - "ending_column": 46 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 196, - "length": 78, + "start": 375, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -481,16 +481,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#13)\" \n", - "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L13)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14", - "id": "0afae786715bc7bc677a2525aec172999533a2bc1ee62d9b974c9f13a45755c6", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22", + "id": "b3e0dbd29c5e74eaae470dcfe1ff523c67da580b1ae0c07559c02ee67d9d4c86", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 375, - "length": 58, + "start": 122, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 407, - "length": 19, + "start": 154, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 9 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 375, - "length": 58, + "start": 122, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22", - "id": "b3e0dbd29c5e74eaae470dcfe1ff523c67da580b1ae0c07559c02ee67d9d4c86", + "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#8-10) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#9)\" \n", + "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L9)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10", + "id": "e27e978d7016cb26d0d372e84c7f4e1bbd6e45af239e195823b3b138713430a6", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/test_ast_parsing.py b/tests/test_ast_parsing.py index 20f92cfc7..d85058973 100644 --- a/tests/test_ast_parsing.py +++ b/tests/test_ast_parsing.py @@ -12,6 +12,9 @@ import pytest from crytic_compile import CryticCompile, save_to_zip from crytic_compile.utils.zip import load_from_zip +from solc_select.solc_select import install_artifacts as install_solc_versions +from solc_select.solc_select import installed_versions as get_installed_solc_versions + from slither import Slither from slither.printers.guidance.echidna import Echidna @@ -26,7 +29,7 @@ ALL_04 = range(0, 27) ALL_05 = range(0, 18) ALL_06 = range(0, 13) ALL_07 = range(0, 7) -ALL_08 = range(0, 12) +ALL_08 = range(0, 13) # these are tests that are currently failing right now XFAIL = ( @@ -70,25 +73,9 @@ XFAIL = ( ) -def get_solc_versions() -> List[str]: - """ - get a list of all the supported versions of solidity, sorted from earliest to latest - :return: ascending list of versions, for example ["0.4.0", "0.4.1", ...] - """ - result = subprocess.run(["solc-select", "versions"], stdout=subprocess.PIPE, check=True) - solc_versions = result.stdout.decode("utf-8").split("\n") - - # there's an extra newline so just remove all empty strings - solc_versions = [version.split(" ")[0] for version in solc_versions if version != ""] - - solc_versions = sorted(solc_versions, key=lambda x: list(map(int, x.split(".")))) - return solc_versions - - -def get_tests(solc_versions) -> Dict[str, List[str]]: +def get_tests() -> Dict[str, List[str]]: """ parse the list of testcases on disk - :param solc_versions: the list of valid solidity versions :return: a dictionary of test id to list of base solidity versions supported """ slither_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -112,6 +99,8 @@ def get_tests(solc_versions) -> Dict[str, List[str]]: tests[key] = sorted(test, key=StrictVersion) # validate tests + solc_versions = get_installed_solc_versions() + missing_solc_versions = set() for test, vers in tests.items(): if len(vers) == 1: if vers[0] != "all": @@ -119,7 +108,9 @@ def get_tests(solc_versions) -> Dict[str, List[str]]: else: for ver in vers: if ver not in solc_versions: - raise Exception("base version not found", test, ver) + missing_solc_versions.add(ver) + if missing_solc_versions: + install_solc_versions(missing_solc_versions) return tests @@ -140,8 +131,8 @@ def get_all_test() -> List[Item]: generate a list of testcases by testing each test id with every solidity version for both legacy and compact ast :return: the testcases """ - solc_versions = get_solc_versions() - tests = get_tests(solc_versions) + tests = get_tests() + solc_versions = get_installed_solc_versions() ret = [] diff --git a/tests/test_detectors.py b/tests/test_detectors.py index 01d1d899a..7b5fd993c 100644 --- a/tests/test_detectors.py +++ b/tests/test_detectors.py @@ -8,6 +8,9 @@ from typing import Type, Optional, List import pytest from deepdiff import DeepDiff # pip install deepdiff +from solc_select.solc_select import install_artifacts as install_solc_versions +from solc_select.solc_select import installed_versions as get_installed_solc_versions + from slither import Slither from slither.detectors.abstract_detector import AbstractDetector from slither.detectors import all_detectors @@ -52,7 +55,7 @@ def id_test(test_item: Test): return f"{test_item.detector}: {test_item.solc_ver}/{test_item.test_file}" -ALL_TESTS = [ +ALL_TEST_OBJECTS = [ Test( all_detectors.UninitializedFunctionPtrsConstructor, "uninitialized_function_ptr_constructor.sol", @@ -1200,6 +1203,20 @@ ALL_TESTS = [ "0.8.0", ), ] + + +def get_all_tests() -> List[Test]: + installed_solcs = set(get_installed_solc_versions()) + required_solcs = {test.solc_ver for test in ALL_TEST_OBJECTS} + missing_solcs = list(required_solcs - installed_solcs) + if missing_solcs: + install_solc_versions(missing_solcs) + + return ALL_TEST_OBJECTS + + +ALL_TESTS = get_all_tests() + GENERIC_PATH = "/GENERIC_PATH"